Dataclass Command-line Interface
Installation
From pip:
pip install dc-cli
Usage
from dataclasses import dataclass, fields
import dataclass_cli
@dataclass_cli.add
@dataclass
class Model:
num_layers: int
learning_rate: float
training: bool
model = Model()
print(model)
Output:
❯ python test.py --help
usage: test.py [-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:
--model_num_layers MODEL_NUM_LAYERS
--model_learning_rate MODEL_LEARNING_RATE
--model_training
--no-model_training
❯ python test.py --model_num_layers 10 --model_learning_rate 0.1 --no-model_training
Model(num_layers=10, learning_rate=0.1, training=False)
License
Metadata
Release files for dc-cli 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dc-cli-0.1.tar.gz | 4.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dc_cli-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / dc-cli-0.1.tar.gz
| Download URL | dc-cli-0.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a66f3f1eee9ea0dc507b160c3ce97c273d4a6d8ba6002f06901460758d20a0e4
|
|
BLAKE2b-256 checksum How to use checksums |
19b5b35264b1b536edb3227b35cc93507eb7bae4a1f27e98b655bfb5f74ee04c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Release files / dc_cli-0.1-py3-none-any.whl
| Download URL | dc_cli-0.1-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d33a0605143eb9ac63a044f9f90c4a12abab681d887a8db4017fd4952c20d12
|
|
BLAKE2b-256 checksum How to use checksums |
d17908e157da001e502a6f0bcf08074e5d287e49a56843625831ee6017f9b577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Security for dc-cli 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.