Command-line Object Utility Tool
Project description
docs |
|
---|---|
code |
|
tests |
|
package |
Convert dataclasses into a command-line interface.
Quickstart
To install, use
pip install clout
Define some dataclasses and convert them into a command-line interface.
import attr
import click
import clout
@attr.dataclass
class DB:
host: str
port: int
@attr.dataclass
class Config:
db: DB
dry_run: bool
cli = clout.Command(Config)
print(cli.build())
$ myapp --dry-run db --host example.com --port 9999
Config(db=DB(host='example.com', port=9999), dry_run=True)
See the full docs for more information: https://clout.readthedocs.io/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clout-0.1.14.tar.gz
(12.2 kB
view details)
Built Distribution
clout-0.1.14-py3-none-any.whl
(12.5 kB
view details)
File details
Details for the file clout-0.1.14.tar.gz
.
File metadata
- Download URL: clout-0.1.14.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0b4 CPython/3.7.3 Linux/4.15.0-70-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aa0410eec7c5c5ecbac13ee997748184c041ca7364279aff1f44e16dceab3ae |
|
MD5 | fe84ff426403fc72cde58a7cac038aab |
|
BLAKE2b-256 | eb87ade2dc5818e2986853992633f356f9b1359c1b7aa6a418d69a37d0ef69be |
File details
Details for the file clout-0.1.14-py3-none-any.whl
.
File metadata
- Download URL: clout-0.1.14-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0b4 CPython/3.7.3 Linux/4.15.0-70-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c045577302af6c52764766655a0e911fe22e48616667d47bd4adcadf4960f763 |
|
MD5 | 81a7d9b2b40f15f45d31df81a34c738a |
|
BLAKE2b-256 | c5138232288a669a5ea93c85454612446e3c5bc85b6a6ccaa509b348943fb578 |