Build one-off Python scripts via stored code at the command line.
pip install epy
Store code defining a function shell that runs code via your shell. -d makes it run by default. -k shell gives the code a unique key "shell". save stores this in a default bundle. A bundle is an ordered dict of named code blocks.
epy set -d -k shell "import subprocess; import functools; shell = functools.partial(subprocess.run, shell=True)" save
Execute code using the shell command defined above. The code defining the shell statement is loaded and run from the default bundle before the exec statements.
epy exec "shell('echo hello world')" exec shell "('echo sincerely, epy')
Display code to be run, but don't execute. -b "*" also prints all loaded bundles.
epy exec "shell('echo dry run')" dump -b "*"
Create a new bundle, which will NOT be loaded by default.
epy create --path my_bundle.json my_bundle set -n my_bundle -k greet "print('hello from my bundle')" save
Load the bundle and execute the greet statement. greet is not run by default because it was not generated with -d. In the exec statement, my_bundle is attached with -n. The greet statement is the first argument. epy searches all explicitly attached bundles
epy load my_bundle.json exec -a my_bundle -r greet -r "shell('echo hello from the default bundle')"
Metadata
Release files for epy-scripts 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| epy_scripts-0.1.1.tar.gz | 3.5 kB | Without provenance | Details for epy_scripts-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| epy_scripts-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for epy_scripts-0.1.1-py3-none-any.whl |
Total release size: 7.8 kB
Release files / epy_scripts-0.1.1.tar.gz
| Download URL | epy_scripts-0.1.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4e0945883b50fbf73d6766ae757e137cef1f7bbd08332efd8e10a1971e29518
|
|
BLAKE2b-256 checksum How to use checksums |
477f9409fe81aefeb77333cbf107b6490944de578c84e5b10b21e30859af9b00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / epy_scripts-0.1.1-py3-none-any.whl
| Download URL | epy_scripts-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bac388c8911f86567f6f3b7c7222c068e63989516916f2afbf0c2c30f3d020dc
|
|
BLAKE2b-256 checksum How to use checksums |
7accbff788fb7274cf475eb7b7c8c33d14c04554a2605690dafdcc7a8386668a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Security for epy-scripts 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.