Skip to main content

Dataclass command line interface

Project description

Dataclass Command-line Interface

Code style: black image


From pip:

pip install dc-cli


from dataclasses import dataclass, fields
import dataclass_cli

class Model:
    num_layers: int
    learning_rate: float
    training: bool

model = Model()


❯ python --help
usage: [-h] --model_num_layers MODEL_NUM_LAYERS --model_learning_rate MODEL_LEARNING_RATE (--model_training | --no-model_training)

optional arguments:
  -h, --help            show this help message and exit

  --model_num_layers MODEL_NUM_LAYERS
  --model_learning_rate MODEL_LEARNING_RATE
❯ python --model_num_layers 10 --model_learning_rate 0.1 --no-model_training
Model(num_layers=10, learning_rate=0.1, training=False)



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dc-cli, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size dc_cli-0.1-py3-none-any.whl (5.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dc-cli-0.1.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

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