genbu
Genbu is a library for creating composable command-line interfaces.
Features
- Infer shell arguments parser from type hints.
- Override inferred parsers using shell parser combinators.
- Compose command-line interfaces declaratively (subcommands).
- Dispatch automatically to the appropriate command callback.
- Generate usage messages by using
genbu.usage.
Install
pip install genbu
Usage
# hello.py
from genbu import Genbu
print(Genbu(lambda name: f"Hello, {name}!").run())
# Usage example: python hello.py --name "world"
See examples.
License
Metadata
Release files for genbu 0.2.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 | |
|---|---|---|---|
| genbu-0.2.1.tar.gz | 21.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| genbu-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.5 kB
Release files / genbu-0.2.1.tar.gz
| Download URL | genbu-0.2.1.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a11cffdbaa2d655c077f9cfd9a3bb208f79a32ab153689a6a30d34660e3ebaed
|
|
BLAKE2b-256 checksum How to use checksums |
12ae7b0923c752af0d9c13e97386d38c67d025a7cf675c80bd8009875302cc40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|
Release files / genbu-0.2.1-py3-none-any.whl
| Download URL | genbu-0.2.1-py3-none-any.whl |
|---|---|
| Size | 25.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50d46c0f9b962b627f433da13d072ff9096b643dfcbe8209cad1c57f1b8d2b9c
|
|
BLAKE2b-256 checksum How to use checksums |
ae19e6e197857a8ca8dbe9ec9dedc245d278b8390d651bb4ffeb8b455cbdb635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|