No project description provided
Project description
pydargs
Pydargs converts a dataclass to command line arguments in argparse.
Installation
Pydargs can be installed with your favourite package manager. For example:
pip install pydargs
Usage
A minimal usage example would be:
from dataclasses import dataclass
from pydargs import parse
@dataclass
class Config:
number: int
some_string: str = "abc"
if __name__ == "__main__":
config = parse(Config)
After which this entrypoint can be called with
entrypoint --number 42
or
entrypoint --number 42 --some-string abcd
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
pydargs-0.2.1.tar.gz
(7.6 kB
view hashes)