{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/5"}],"enrichment":{"capability":"Builds command-line interfaces declaratively by combining Python dataclasses with argparse, eliminating boilerplate argument definition code.","skillfed_tags":["cli-builder","argparse-wrapper","dataclass-integration"],"use_cases":["Define a tool's CLI arguments as a single dataclass, reducing argument parser setup code and improving type safety.","Build scripts that need both positional and optional arguments with clear type hints and default values.","Create command-line tools where the argument structure is stable and you want a single source of truth for CLI schema.","Parse CLI arguments into a typed object for easier downstream validation and use in your application logic.","Migrate existing argparse code to a more declarative style without rewriting the entire parser."],"what_it_does":"argparse_dataclass bridges dataclasses and argparse to let you define CLI arguments as typed dataclass fields instead of writing repetitive argparse setup code. When you decorate a dataclass with its ArgumentParser, the library automatically generates argument definitions from field types, defaults, and metadata\u2014booleans become flags, integers and strings become typed options, and Literal types create choice constraints. You call parse_args() as you would with standard argparse, but get back a populated dataclass instance instead of a Namespace object.\n\nThe package handles positional arguments, boolean flags, simple scalar types, default values, and choice-based options. It supports custom type converters via field metadata, optional fields, required flags, and parse_known_args() for partial parsing. Subcommands and mutually exclusive groups are not yet implemented. With no runtime dependencies and low install friction, it's a lightweight alternative to heavier CLI frameworks when you want argparse's simplicity with less boilerplate.","worth_installing":"Yes, if you are starting a new CLI project or refactoring an existing one and want to reduce argparse boilerplate. The library is stable, has no dependencies, and works with modern Python versions. However, be aware that maintenance is minimal\u2014the last release was in mid-2023 and the repository shows no recent activity. If you need active support, subcommands, or mutually exclusive groups, consider whether a more actively maintained alternative suits your needs."},"id":"argparse-dataclass","links":{"html":"https://skillfed.io/packages/argparse-dataclass","md":"https://skillfed.io/packages/argparse-dataclass.md","pypi":"https://pypi.org/project/argparse-dataclass/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2023-06-11","license_spdx":null,"license_treatment":"permissive","name":"argparse-dataclass","python_support":"supports_current","summary":"Declarative CLIs with argparse and dataclasses"},"popularity":{"monthly_downloads":1482283,"position":3848,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.0.0"}
