simple-parsing
A small utility to simplify and clean up argument parsing scripts.
Decision gist · record as of 2026-08-14
Yes. Low install friction, no known vulnerabilities, MIT license, and active maintenance make it a safe choice. It genuinely reduces argparse boilerplate for projects using dataclasses, especially those with reusable or nested argument groups. Suitable for both small scripts and larger CLI applications.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction: pure Python wheel with only two runtime dependencies (docstring-parser and typing-extensions).
- Actively maintained with recent release.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal obligations—suitable for any project type.
last release 2026-07-27 (18 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,306,956 downloads/mo, #2,336 on PyPI
Alternatives
Verify before relying
from dataclasses import dataclass
from simple_parsing import ArgumentParser
@dataclass
class Options:
log_dir: str
learning_rate: float = 1e-4
parser = ArgumentParser()
parser.add_arguments(Options, dest="options")
args = parser.parse_args()
print(args.options)- Whether nesting depth has practical limits or performance implications at scale.
- Whether serialization to json/yaml handles all dataclass field types automatically or requires custom handlers.
- Performance characteristics when parsing very large numbers of arguments or deeply nested structures.
What it is and what it does
simple-parsing wraps Python's argparse to let you define command-line arguments as dataclasses instead of repeated add_argument() calls. It generates help text from docstrings and field comments, handles nested and inherited dataclasses, and supports serialization to json/yaml. The core idea is reducing boilerplate: instead of copy-pasting argument definitions, you define an Options dataclass once and reuse it with automatic prefixing for multiple argument groups.
You use it by creating a dataclass with typed fields, then passing it to ArgumentParser.add_arguments() or calling simple_parsing.parse() directly. It depends on docstring-parser to extract help text from comments and typing-extensions for type annotation support. The package requires Python 3.9 or later.
Use it for
- Machine learning projects where you need to parse training, validation, and test configurations with identical structure but different prefixes.
- Reusing argument definitions across multiple CLI tools in the same codebase without copy-pasting argparse boilerplate.
- Generating clean, auto-documented --help output from dataclass field comments and docstrings.
- Saving and loading command-line configurations to/from json or yaml files for reproducibility.
- Building nested argument hierarchies where subcommands or modules each have their own configuration dataclass.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no known vulnerabilities, MIT license, and active maintenance make it a safe choice. It genuinely reduces argparse boilerplate for projects using dataclasses, especially those with reusable or nested argument groups. Suitable for both small scripts and larger CLI applications.
Install
simple-parsing on PyPI
Before you install
Low friction: pure Python wheel with only two runtime dependencies (docstring-parser and typing-extensions). Actively maintained with recent release.
Requires Python 3.9 or later.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal obligations—suitable for any project type.
Quickstart
from dataclasses import dataclass
from simple_parsing import ArgumentParser
@dataclass
class Options:
log_dir: str
learning_rate: float = 1e-4
parser = ArgumentParser()
parser.add_arguments(Options, dest="options")
args = parser.parse_args()
print(args.options)
Verify before relying
- Whether nesting depth has practical limits or performance implications at scale.
- Whether serialization to json/yaml handles all dataclass field types automatically or requires custom handlers.
- Performance characteristics when parsing very large numbers of arguments or deeply nested structures.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesdocstring-parsertyping-extensions |
| Maintenance | Actively maintained 18 days since the last release |
| First released | |
| Downloads | 4,306,956 / month, #2,336 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: simple_parsing-0.1.9-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “dataclass command line arguments”
- simple-parsingTransforms argparse scripts into structured, typed command-line…
- argparse-dataclassBuilds command-line interfaces declaratively by combining Python…
- draccusDraccus parses command-line arguments and configuration files into…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also argparse-dataclass · draccus · jsonargparse · typed-argument-parser · tyro · decli · flexparser · argdantic · coqpit-config · coqpit