--- id: dargs version: "0.5.0.post0" license: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) license_treatment: copyleft maintenance: active --- # dargs — Process arguments for the deep modeling project. License: copyleft · Maintenance: active · Downloads: 134.7K/mo ## What it is and what it does dargs is a Python argument validation and documentation library that examines input dictionaries against a schema you define using the Argument class. It checks types, validates nested keys and sub-argument types, and supports a special variant mode where dictionary contents can be determined by the value of a flag key. The library provides three main methods: check (validates structure), normalize (adds defaults and resolves aliases), and gendoc (outputs documentation with optional HTML anchors for cross-reference). The package integrates with PEP 484 type annotations and offers native support for Sphinx, Jupyter Notebook, and DP-GUI. It can generate JSON schema from an Argument definition for use with JSON editors, and supports loading dictionary values from external JSON or YAML files via a $ref key. It's designed for projects that need declarative, reusable argument schemas with built-in documentation generation. Use it for: - Define and validate configuration dictionaries for scientific computing or deep learning pipelines with nested parameters and type safety - Generate documentation and JSON schemas from argument definitions for use in web UIs or IDE integrations - Normalize user input by applying default values and resolving aliases before passing to downstream functions - Handle variant argument structures where the allowed keys depend on the value of a discriminator flag - Integrate argument validation into Sphinx-based documentation or Jupyter notebooks for interactive parameter exploration ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Validates, normalizes, and documents structured argument dictionaries with type checking, default values, and variant support for Python programs. Yes, if you need declarative argument validation with built-in documentation. The package is actively maintained, has low install friction, and solves a real problem for projects with complex nested configuration. The LGPLv3 license requires careful review if you're building proprietary software, but the library itself is stable and dependency-light. ## Install pip install dargs uv add dargs poetry add dargs ## Installing dargs Before you install: Low install friction with a pure-Python wheel and only two lightweight runtime dependencies (typeguard, typing_extensions). Repository is active with recent commits and no archived status. License in practice: LGPLv3 copyleft license requires that derivative works and modifications be distributed under the same license; proprietary applications using this as a library may need to comply with linking and disclosure obligations. Quickstart: pip install dargs from dargs import Argument arg_def = Argument('config', dict, [Argument('key', str)]) arg_def.check({'key': 'value'}) Verify before relying: - Whether JSON schema generation integrates with external JSON editors as claimed in the description - Scope and maturity of Sphinx and Jupyter Notebook integration features - Performance characteristics when validating deeply nested or large argument structures ## Package facts - License: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 134.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags argument validation python, dict type checking, argument schema definition, input validation framework, argument documentation generator, variant argument handling, parameter validation library, validation, configuration, schema [View on SkillFed](https://skillfed.io/packages/dargs) · [View on PyPI](https://pypi.org/project/dargs/)