runp
runp exports Python functions from files to the command line. You don’t need to change your existing code.
If you have a file named myfile.py with:
def foo():
"""beeps a lot"""
print "beep beep"
def bar(text):
"""Prints things
Args:
text (str): The text to print
"""
print text
And you want to run it in the command line just do:
$ runp myfile.py foo beep beep
You can also pass arguments to your functions:
$ runp myfile.py bar:"this is sweet!" this is sweet!
Functions with names starting with _ are hidden.
You can list available functions with:
$ runp myfile.py -l Available functions: foo beeps a lot bar Prints things
And get info on a specific function:
$ runp myfile.py -d bar
Displaying docstring for function bar in module myfile
bar(text)
Prints things
Args:
text (str): The text to print
Syntax for calling functions is:
$ runp myfile.py function_name:arg1value,arg2=arg2value
The concept, syntax for commands and initial code are heavily inspired by fabric’s task system.
Metadata
Release files for runp 0.0.2
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 | |
|---|---|---|---|---|
| runp-0.0.2.tar.gz | 3.9 kB | Without provenance | Details |
Release files / runp-0.0.2.tar.gz
| Download URL | runp-0.0.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d799011a3ef7a07f4a6e8215d8006b27f897c0da8e3ca67d1e73472756ef9488
|
|
BLAKE2b-256 checksum How to use checksums |
842b9efc0f65925b56d97439a7a01be78e822a63ff90bd458aaf782ddf183318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for runp 0.0.2
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.