Pypyr

Latest version: v5.9.1

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

Scan your dependencies

Page 2 of 14

5.5

**Full Changelog**: https://github.com/pypyr/pypyr/compare/v5.4.0...v5.5.0

5.5.0

summary
- `cmdOut` for `pypyr.steps.cmd` & `pypyr.steps.shell` gets dotted attribute access.
- instead of `cmdOut[returncode]` access value like this: `cmdOut.returncode`
- backwards compatible - the old-style dict-like accessors will still work.
- closes 272
- Introduce `pypyr.steps.cmds` & `pypyr.steps.shells` to run programs or shell statements asynchronously as parallel (concurrent) sub-processes.
- `cmdOut` for these works as with the serial versions of the steps using the new dotted attribute access introduced in this release.
- closes 273
- Set default encoding for all the cmd/shell steps using `default_cmd_encoding` in config. You can use the $env variable `PYPYR_CMD_ENCODING` to initialize this value, in addition to the usual config files.
- closes 275

what's changed
* async cmds + shells by yaythomas in https://github.com/pypyr/pypyr/pull/274

5.4.0

Summary
- `pypyr.steps.cmd` & `pypyr.steps.shell` now also takes a list input to run multiple commands/shell statements in the same step!
yaml
- name: pypyr.steps.cmd
in:
cmd:
- echo 1
- echo 2

- name: pypyr.steps.cmd
in:
cmd:
run:
- echo 3
- echo 4
save: False
cwd: mydir/subdir

- Both the `cmd` and `shell` steps expanded to allow:
- decode output in different encodings
- save output as raw bytes or as encoded text.
- File output for stdout/stderr.
- File create mode of append or overwrite.
- `stderr` can redirect to `/dev/stdout`
- Both `stdout` & `stderr` can redirect to `/dev/null`

yaml
when save: True
- name: pypyr.steps.cmd
comment: when save is True
in:
cmd:
run: curl https://myurl.blah/diblah
save: True
cwd: .
bytes: False
encoding: utf-8

when save: False (this is default)
- name: pypyr.steps.cmd
comment: when save is False (the default when `save` not set)
in:
cmd:
run: curl --cert certfile --key keyfile https://myurl.blah/diblah
cwd: ..
stdout: ./path/out.txt
stderr: ./path/err.txt
append: False


What's Changed
* cmd & shell list input by yaythomas in https://github.com/pypyr/pypyr/pull/271


**Full Changelog**: https://github.com/pypyr/pypyr/compare/v5.3.0...v5.4.0

5.3.0

Summary
Create shortcuts to your pypyr run commands & their input args. This is handy for creating short & sweet aliases for longer pipeline run commands.

So if you have a pipeline you normally run like this:
console
$ pypyr arb/my-pipeline arg1=1234 arg2="/path/to long/annoying path to type/x" arg3="arb'hello"


You can create a shortcut alias for this like so:
yaml
shortcuts:
my-shortcut:
pipeline: arb/my-pipeline
args:
arg1: 1234
arg2: /path/to long/annoying path to type/x
arg3: "arb'hello"


And now for the same pipeline + inputs you can just run:


$ pypyr my-shortcut


You can create your shortcut definition in `pyproject.toml` or in the pypyr yaml config file.

You can make your shortcuts project specific, or for the entire user profile, or globally for your entire system.

What's Changed
* Shortcuts by yaythomas in https://github.com/pypyr/pypyr/pull/268
* Bump version: 5.2.0 → 5.3.0 by yaythomas in https://github.com/pypyr/pypyr/pull/269


**Full Changelog**: https://github.com/pypyr/pypyr/compare/v5.2.0...v5.3.0

5.2.0

Summary
- pypyr is now configurable with yaml or `pyproject.toml`!
- Explicitly over-ride encoding on any filesystem steps

What's Changed
* friendly err on malformed pipeline. by yaythomas in https://github.com/pypyr/pypyr/pull/250
* config & encoding by yaythomas in https://github.com/pypyr/pypyr/pull/255
* file encoding from config by yaythomas in https://github.com/pypyr/pypyr/pull/259
* windows tests & config platform indicators by yaythomas in https://github.com/pypyr/pypyr/pull/261
* typings for config, platform by yaythomas in https://github.com/pypyr/pypyr/pull/262
* `FakePath` `PathLike` & parent also fake by yaythomas in https://github.com/pypyr/pypyr/pull/264
* `pypyr.steps.python` & version bump 5.2.0 by yaythomas in https://github.com/pypyr/pypyr/pull/266


**Full Changelog**: https://github.com/pypyr/pypyr/compare/v5.1.0...v5.2.0

5.1.0

Finally, toml, has come, to pypyr! 🎆
- `pypyr.parser.tomlfile` to initialise pipeline context with a toml file
- `pypyr.steps.fetchtoml` to read toml file into context as an object with typing
- `pypyr.steps.filewritetoml` to write specified context to output toml file - lets you create toml files on-the-fly programmatically.
- `pypyr.steps.fileformattoml` to read input tomls specified by path, glob or list of paths, replace {formatting expressions} and write to output file(s).

Working with files:
- `pypyr.steps.fileread` to read files in text or binary mode into context.
- `pypyr.steps.filewrite` to write or append to file in text or binary modes.

What's Changed
* pypyr.steps.fileread by yaythomas in https://github.com/pypyr/pypyr/pull/244
* pypyr.steps.filewrite by yaythomas in https://github.com/pypyr/pypyr/pull/245
* toml by yaythomas in https://github.com/pypyr/pypyr/pull/246


**Full Changelog**: https://github.com/pypyr/pypyr/compare/v5.0.0...v5.1.0

Page 2 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.