Command line argument parser for pipen
Usage
from pipen import Proc, Pipen
class Process(Proc):
"""My process
Input:
a: Input data
"""
input = 'a'
input_data = range(10)
script = 'echo {{in.a}}'
Pipen().set_start(Process).run()
$ python example.py --help
Usage: test.py [-h | -h+] [options]
Undescribed process.
Use `@configfile` to load default values for the options.
Pipeline Options:
--name NAME The name for the pipeline, will affect the default workdir and
outdir. [default: pipen-0]
--profile PROFILE The default profile from the configuration to run the pipeline.
This profile will be used unless a profile is specified in the
process or in the .run method of pipen. You can check the
available profiles by running `pipen profile`
--outdir OUTDIR The output directory of the pipeline [default: ./<name>-output]
--forks FORKS How many jobs to run simultaneously by the scheduler
--scheduler SCHEDULER
The scheduler to run the jobs
Namespace <in>:
--in.a A [A ...] Input data
Optional Arguments:
-h, --help, -h+, --help+
show help message (with + to show more options) and exit
See more examples in tests/pipelines/ folder.
Plugin options
args_hide: (process level) Hide the arguments in the help message. Default:Falseargs_group: (pipeline level) The group name for the arguments. Default:pipeline optionsargs_flatten: (pipeline level) Flatten the arguments in the help message when there is only one process in the pipeline. Default:auto(flatten if single process, otherwise not)args_dump: (pipeline level) Whether to dump the arguments to<outdir>/args.tomlfile. Default:False.
Metadata for Proc envs items
The metadata in the docstring of env items determines how the arguments are defined.
class Process(Proc):
"""My process
# other docstring sections
Envs:
a (<metadata>): ...
"""
The metadata could be key-value pairs separated by ;. The separator : or = is used to
separate the key and value. The value is optional. If the value is not specified, it
will be set to True. The keys are valid arguments of argx.ArgumentParser.add_argument, except that hidden will be interpreted as show=False in argx.ArgumentParser.add_argument. If the value of choices is not specified, the subkeys of the env item will be used as the choices.
Metadata
Release files for pipen-args 1.3.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 | |
|---|---|---|---|
| pipen_args-1.3.2.tar.gz | 207.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pipen_args-1.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 226.3 kB
Release files / pipen_args-1.3.2.tar.gz
| Download URL | pipen_args-1.3.2.tar.gz |
|---|---|
| Size | 207.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1745d11424486ec22c676efd98bac487858a477a40242b4fca9c9e369fe8aa29
|
|
BLAKE2b-256 checksum How to use checksums |
22364a4e17a72b49b40b3dcb5d1c8bc6fef596c2a9efc23c57ddb7bd1c8edd40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pipen_args-1.3.2-py3-none-any.whl
| Download URL | pipen_args-1.3.2-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fbbdade056e860c15f3539d7cee446b7bb4c8b834a9ac81581298e414ae4cd5
|
|
BLAKE2b-256 checksum How to use checksums |
36628e76d946a775172bdd80d14bddb76c0cfe9166d685c3532fa6f4a597c752
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|