This release is a pre-release and may not be stable for production use.
Clea - A lightweight framework for creating CLI applications in python
Clea is uses type annotations to generate the command/group defintions and parse the arguments at the runtime. To start with clea run
pip3 install clea
Define you first command using
from typing_extensions import Annotated
from clea.params import Integer
from clea.wrappers import command
@command
def add(
n1: Annotated[int, Integer()],
n2: Annotated[int, Integer()],
) -> None:
"""Add two numbers"""
print(f"Total {n1 + n2}")
Invoke the command at runtime using
from clea.runner import run
if __name__ == "__main__":
run(cli=add)
The example is taken from add.py in the examples folder.
You can check the command definition using
$ python add.py --help
Usage: add [OPTIONS] N1 N2
Add two numbers
Options:
--help Show help and exit.
Execute the command using
$ python add.py 2 3
Total 5
Read more about the usage of clea in the docs
Metadata
Release files for clea 0.1.0rc4
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 |
|---|---|---|---|---|
| clea-0.1.0rc4.tar.gz | 20.7 kB | Without provenance | Details for clea-0.1.0rc4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clea-0.1.0rc4-py3-none-any.whl | Python 3 | none | any | Details for clea-0.1.0rc4-py3-none-any.whl |
Total release size: 43.5 kB
Release files / clea-0.1.0rc4.tar.gz
| Download URL | clea-0.1.0rc4.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9d128bab506ab88bae384aa546ff26060e8a64075bffd7ff9e600007e76880d
|
|
BLAKE2b-256 checksum How to use checksums |
a1b6ae418dbf3c37d54394787783879b5526e91ce7fc693c26b1c49ac9fc2d3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / clea-0.1.0rc4-py3-none-any.whl
| Download URL | clea-0.1.0rc4-py3-none-any.whl |
|---|---|
| Size | 22.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5220c52c698cd1936abbe01c5281ea3906bffbefd29e1ffdc913ef5c9b06f444
|
|
BLAKE2b-256 checksum How to use checksums |
7a790bbb288f230bb3e7e320857214e59b2ac585722317596f904df3a8f1ddb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for clea 0.1.0rc4
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.