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 hashes)
Built Distribution
clout-0.1.14-py3-none-any.whl
(12.5 kB
view hashes)