Typed Command Line Interfaces powered by Click and Pydantic
Project description
clidantic
Typed Command Line Interfaces powered by Click and Pydantic.
:warning: Library in early alpha stage
Documentation
The first draft of documentation is available here: https://edornd.github.io/clidantic/
Installing
The safest path is to install the latest release using pip:
pip install clidantic
Optionally, you can install the latest updates through GitHub:
pip install git+https://github.com/edornd/clidantic.git
or, if that doesn't work, with multiple steps (this last step might require poetry):
git clone https://github.com/edornd/clidantic.git
cd clidantic
pip install .
Quickstart
Here's a quick example to get you started:
from typing import Optional
from pydantic import BaseModel
from clidantic import Parser
class Arguments(BaseModel):
field_a: str
field_b: int
field_c: Optional[bool] = False
cli = Parser()
@cli.command()
def main(args: Arguments):
print(args)
if __name__ == "__main__":
cli()
Contributing
We are not quite there yet!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clidantic-0.1.0.tar.gz
(11.6 kB
view details)
Built Distribution
clidantic-0.1.0-py3-none-any.whl
(12.3 kB
view details)
File details
Details for the file clidantic-0.1.0.tar.gz
.
File metadata
- Download URL: clidantic-0.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0b3 CPython/3.8.10 Linux/5.4.0-121-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01316a757f747475afafb84c3842f2eccff8236e49dc76f815c3ba7b7be8db32 |
|
MD5 | 13d2399dc81ba2505bdb8d99db81d226 |
|
BLAKE2b-256 | ca4ee4608a4432a0023b707c96085b4e2148f2126fcc416631aad24b5bef6040 |
File details
Details for the file clidantic-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: clidantic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0b3 CPython/3.8.10 Linux/5.4.0-121-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59262183d7ab7f5fc8babe18dc047bbd26be4551c8cff20fb08706bd86f4ec28 |
|
MD5 | a7d8f7357685a99ad6b607cdb01a6539 |
|
BLAKE2b-256 | 2a563ed816dfd4de8e59957329dcfe3c766e88e915968260f696a6ade3f322dc |