python-jsonargparse
Port variant v15
Summary JSON argument and config file parser (3.15)
Package version 4.53.0
Homepage https://pypi.org/project/jsonargparse/
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v14
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 13 NOV 2026, 13:25:52 UTC
Port created 08 JAN 2023, 04:18:24 UTC
Subpackage Descriptions
single jsonargparse ============ Docs: https://jsonargparse.readthedocs.io/ | Source: https://github.com/mauvilsa/jsonargparse/ jsonargparse is a library for creating command-line interfaces (CLIs) and making Python apps easily configurable. It is a well-maintained project with frequent releases, adhering to high standards of development: semantic versioning, deprecation periods, changelog, automated testing, and full test coverage. Although jsonargparse might not be widely recognized yet, it already boasts a [substantial user base ]. Most notably, it serves as the framework behind pytorch-lightning's [LightningCLI ]. The documentation is a reference that describes each feature in isolation, which is not always the best way to learn. If you would rather see the *why* behind the features and complete use cases built end to end, have a look at the [talks and articles] page, which collects presentations, blog posts and example projects. Teaser examples --------------- CLI with minimal boilerplate: .. code-block:: python from jsonargparse import auto_cli def main_function(...): # your main parameters with type hints here ... # your main code here if __name__ == "__main__": auto_cli(main_function) # parses arguments and runs main_function Minimal boilerplate but manually parsing: .. code-block:: python from jsonargparse import auto_parser parser = auto_parser(main_function) cfg = parser.parse_args() ... Powerful argparse-like low level parsers: .. code-block:: python from jsonargparse import ArgumentParser parser = ArgumentParser() parser.add_argument("--config", action="config") # support config files parser.add_argument("--opt", type=int | Literal["off"]) # complex arguments via type hints parser.add_function_arguments(main_function, "function") # add function parameters parser.add_class_arguments(SomeClass, "class") # add class parameters ... cfg = parser.parse_args() init = parser.instantiate(cfg) ... Features -------- jsonargparse is user-friendly and encourages the development of **clean, high-quality code**. It encompasses numerous powerful features, some unique to jsonargparse, while also combining advantages found in similar packages: - **Automatic** creation of CLIs, like [Fire ], [Typer ], [Clize ] and [Tyro ]. - Use **type hints** for argument validation, like [Typer ], [Tap ] and [Tyro ]. - Use of **docstrings** for automatic generation of help, like [Tap ], [Tyro ] and [SimpleParsing ]. - Parse from **configuration files** and **environment variables**, like
Configuration Switches (platform-specific settings discarded)
PY314 OFF Build using Python 3.14 PY315 ON Build using Python 3.15
Package Dependencies by Type
Build (only) python315:dev:std
python-pip:single:v15
autoselect-python:single:std
Build and Runtime python315:primary:std
Runtime (only) python-PyYAML:single:v15
Download groups
main mirror://PYPIWHL/a8/2f/77a50c590181e0da3fc857622a163c7d66f5f43d9dba0e8d609c97b86f1c
Distribution File Information
3e78dfd4e02ef00c899e85a9b0593347d730c7d551411568438a294cf1d39959 177603 python-src/jsonargparse-4.53.0-py3-none-any.whl
Ports that require python-jsonargparse:v15
python-netbox-agent:v15 NetBox agent for server (3.15)