Pypyr

Latest version: v5.9.1

Safety actively analyzes 638699 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 14

2.4.0

- The new _pypyr.steps.pathcheck_ step allows you see if a path exists on the filesystem. It supports literal paths and glob expansions. It writes handy values into `pathCheckOut`with bool for existence and count of files found for the given path. 114
- deprecate old style multi context inputs for fetchjson and fetchyaml, 118. this is not just arbitrary: reason is when step is used multiple times in same pipeline, it becomes easy to have left-over values from previous step run left in context that then cause surprising behaviour with the downstream step. the old style is still supported by virtue of pypyr creating the new style inputs under the hood if it finds the old style arguments - but you can expect this to go away by the next major release.
- add info output logging to envget

2.3.0

- add new step _pypyr.steps.getenv_ Whereas _pypyr.steps.env_ raises an error if you are getting an environment variable that doesn't exist, the new _envget_ allows you to specify a default value to use instead. ref 111
- some documentation updates to demonstrate how to use py strings for ternary assignments
- built-in pypes use _comment_ rather than _description_ where output is not meant for operator consumption ref 109
- alias the `--loglevel` switch with `--log`, so you can now do `pypyr mypipe --log 10` think of the savings just on keyboard wear and tear!

2.2.0

This release is all Reskov! 🎉 Much thanks for your excellent contributions to some tricky bits of the pypyr core!
- Context KeyNotInContextError now also derives from KeyError. This makes it easier to catch missing key exceptions in scenarios where Context keys contain other dicts.
- Allow dynamic loading of pipeline loaders. This allows core extensibility to load pipelines differently and from other places than the default file loader. Plugins can now do things like `myplugin.pypeloaders.getpypefromsomewhere` closes 106

2.1.1

- write step description to INFO output on step execution, if it exists. this should help with debugging.
- minor bug fix: legacy support for envs, recreate env key on legacy key found

2.1.0

- ATTENTION, FUTURE WARNING: all built-in steps that used to take multiple input keys now instead take a dict input. This makes life significantly easier if you re-run the step in the same pipeline in that you don't have to clear down context before the subsequent step runs anymore.
- The old-style is now deprecated - for the moment pypyr will make the old-style work seamlessly for you by creating the new keys under the hood for you and raising a warning without stopping, but be aware legacy support will be removed on the next major release.
- Affected steps are:
- assert
- env
- fileformat
- fileformatjson
- fileformatyaml
- filereplace
- tar
- enable globbing on file format and file replace style steps. ref 58
- pypyr.steps.debug for easy pretty print debugging to the console ref 95
- contextsetf allows formatting on key now too, not just value, ref 96
- pypyr.parser.dict to parse input key value pairs into a specified context key. ref 97
- pypyr.steps.shell/safeshell can save return code, stdout and stderr. ref 71
- rename pypyr.steps.safeshell to pypyr.steps.cmd
- the old name (safeshell) will keep on working as an alias for the new name.
- the functionality is exactly the same, so this is not a breaking change.
- hopefully "cmd" is less confusing than "safeshell" as to what it does, especially with contrast to pypyr.steps.shell
- make built-in context parsers input arguments optional to allow pipelines with context_parsers to be executed with or without the 2nd argument from the cmd line. ref 69

2.0.0

- BREAKING CHANGES:
- [sic] strings are now a lot better. Instead of relying on string-parsing on "[sic]" and the tricky use of quotes and double-quotes, now a structural yam tag identifies sic string, making it a whole lot simpler to write sic strings with special characters in them without escape sequences or having to deal with "'\'{blah}\''" style eye-bleeding messes. This does mean, however, that old style "[sic]" strings won't work anymore.
- new features:
- Py Strings. These allow dynamic eval of python expressions anywhere you can use a string formatting expression in a pipeline. Thank you to Reskov for the idea, and working through the scenarios and options!
- Write yaml or json to disk using `pypyr.steps.filewriteyaml` and `pypyr.steps.filewritejson`
- The yaml and json fetchers can now write their payloads to a specified context key, rather than to the root of context.
- the usual updates to README and examples.

Page 7 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.