Command-line Object Utility Tool
Project description
docs |
|
---|---|
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(type=Config)
print(cli.build())
$ myapp config --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.7.post3.tar.gz
(16.2 kB
view details)
Built Distribution
File details
Details for the file clout-0.1.7.post3.tar.gz
.
File metadata
- Download URL: clout-0.1.7.post3.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.17 CPython/3.7.3 Linux/4.15.0-65-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4e284157bdf2507ee5e58cfb10f9a0232a61078bfab3b81db8671e7332f53539
|
|
MD5 |
847b65aadb535f6594ff5bb09892e162
|
|
BLAKE2b-256 |
09fb02aa13ff52b4d97e6b840264609485b513ce428761c9678e05411aba5d95
|
File details
Details for the file clout-0.1.7.post3-py3-none-any.whl
.
File metadata
- Download URL: clout-0.1.7.post3-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.17 CPython/3.7.3 Linux/4.15.0-65-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d987f8429e4a9c2e276e255d7084c95335a87dfd56922b1878e179acbd490f27
|
|
MD5 |
c191012d95eaaffb632ea63b69b7412a
|
|
BLAKE2b-256 |
12f79f69e9e9f04f551cd0c3497db3daa07e382c9dde984165b9bcb5f26787ad
|