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 hashes)
Built Distribution
Close
Hashes for clout-0.1.7.post3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d987f8429e4a9c2e276e255d7084c95335a87dfd56922b1878e179acbd490f27 |
|
MD5 | c191012d95eaaffb632ea63b69b7412a |
|
BLAKE2b-256 | 12f79f69e9e9f04f551cd0c3497db3daa07e382c9dde984165b9bcb5f26787ad |