pypyr release v4.3.0 permalink

streamlined api main() entry-point permalink

Release Date: 2020-11-12T20:36:36Z

This one is for all the API consumers! The new API entry-point is likely to be useful to anyone who wants to pass regular Python objects directly to pypyr, rather than have to mediate through a string-based cli-orientated context_parser first.

  • Streamline main entrypoint API. close #201.
    • main() allows consumer to set pype loader, rather than having to drop further down into api to load_and_run_pipeline()
    • new main_with_context() allows you to use a standard Python dict to initialize context and bypass the pipeline’s context_parser entirely.
      • Also returns the Context object after pipeline run completes. This allows api consumers to interact directly with the context objects created by the pipeline.
    • make all non-essential args optional to allow minimal calls to the main entry-points without having to add optional=None style inputs.
    • All of this is fully backwards compatible.
  • Some improvements to pypyr.steps.pype
    • defaults useParentContext to False is pipeArgs specified.
    • pipeArgs shlex-es input string under the hood.
    • set pipeline_name on child pipeline rather than use parent pipeline name
  • working_dir on pypyr.moduleloader uses Path object rather than string. This is not something that a pipeline author or api consumer should even notice.
  • pypyr.steps.echo remove redundant string check. This is a slight performance improvement, but you’re unlikely to notice the difference.

You can find pypyr release v4.3.0 on github, where you can click through to associated Issues, Pull Requests and Users.

Released by yaythomas.

last updated on .