Skip to main content

Command-line Object Utility Tool

Project description

docs

Documentation Status

code

Last commit

tests

Travis-CI Build Status
Coverage

package

PyPI Package latest release
PyPI Wheel
Supported versions
Supported implementations
Commits since latest release

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


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.10.tar.gz (11.2 kB view hashes)

Uploaded source

Built Distribution

clout-0.1.10-py3-none-any.whl (11.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page