This release is a pre-release and may not be stable for production use.
python-argufy
Overview
Inspection based parser built on argparse. Build complex CLI interfaces by writing more code-complete applications.
Motivation
Argufy is designed to be an alternative to decorator based parsers such as Click. Decorators have limitations that prevent effective use of inspection without drawbacks. This parser easilly allows a CLI to be created with minimal effort while enabling inspection.
Install
pip install argufy
Create CLI module with a command and an argument.
def example(argument: bool = False):
"""Provide an example command.
Parameters
----------
argument: bool, optional
Provide an example argument.
"""
if argument:
print('This is a true argument')
else:
print('This is a false argument')
Create a parser
from argufy import Parser
from . import cli
def main():
"""Do main function for CLI."""
parser = Parser()
parser.add_commands(cli)
parser.dispatch()
if __name__ == '__main__':
main()
Example help message.
$ command --help
usage: command [-h] {example} ...
positional arguments:
{example}
example Provide an example command.
optional arguments:
-h, --help show this help message and exit
Example command help message.
$ command example --help
usage: command [-h] [--argument ARGUMENT]
optional arguments:
-h, --help show this help message and exit
--argument ARGUMENT Provide an example argument.
Metadata
Release files for argufy 0.1.2b4
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 | |
|---|---|---|---|---|
| argufy-0.1.2b4.tar.gz | 27.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| argufy-0.1.2b4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.7 kB
Release files / argufy-0.1.2b4.tar.gz
| Download URL | argufy-0.1.2b4.tar.gz |
|---|---|
| Size | 27.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83acea11240414390df0714bbc4bcb1f035425938fd1807eeeeaca92bde7d9cf
|
|
BLAKE2b-256 checksum How to use checksums |
2b8ec844bdc60de40a71286f128cdce923fbabcd0b4350e1f79b94a7f813f096
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.11.9
|
Release files / argufy-0.1.2b4-py3-none-any.whl
| Download URL | argufy-0.1.2b4-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dbac13e5d21065a9edc1255e453884064c3db40bb9bc5c953469350fb54216d9
|
|
BLAKE2b-256 checksum How to use checksums |
23baabc8a127151d58393f4415b647e67523605f6d25bf62c29cda82f59ef5b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.11.9
|
Security for argufy 0.1.2b4
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.