--- id: gin-config version: "0.5.0" license: Apache 2.0 license_treatment: permissive maintenance: active --- # gin-config — Gin-Config: A lightweight configuration library for Python License: permissive · Maintenance: active · Downloads: 578.7K/mo ## What it is and what it does Gin is a configuration framework built on dependency injection principles that lets you externalize function and class parameters into config files rather than hardcoding them. You decorate functions with @gin.configurable, then supply values via a simple config syntax in files or on the command line. This is especially useful for machine learning experiments where you have many nested parameters that change frequently between runs. The package has no runtime dependencies and installs cleanly. It's designed to reduce boilerplate around configuration management and parameter passing, making it easier to experiment with different settings without modifying code. The framework is particularly well-suited for projects with complex, hierarchical parameter structures. Use it for: - Configure machine learning model hyperparameters from external config files for experiments - Manage nested configuration for complex applications without writing factory or parameter-plumbing code - Run the same script with different parameter sets by changing only the config file, not the code - Share reproducible experiment configurations across team members by version-controlling config files - Simplify parameter handling by reading structured configuration from files instead of manual argument parsing ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Gin provides a lightweight configuration framework that lets you decorate Python functions and classes to accept parameter values from config files or command-line arguments, eliminating the need for manual configuration object management. Yes, if you run machine learning experiments or manage complex nested configurations. Gin eliminates boilerplate and makes experiments reproducible and shareable. The permissive Apache 2.0 license and zero runtime dependencies make adoption low-risk. The stable maintenance status is appropriate for a mature configuration library. Install it if parameter management is a pain point in your workflow. ## Install pip install gin-config uv add gin-config poetry add gin-config ## Installing gin-config Before you install: Installation is straightforward with no runtime dependencies. The package is actively maintained with recent commits, though the latest release dates to 2021-11-03, suggesting the project may be in a stable maintenance phase rather than active development. License in practice: Gin is licensed under Apache 2.0, a permissive license that allows commercial and private use with minimal restrictions, making it safe to adopt in most projects. Quickstart: pip install gin-config import gin @gin.configurable def train(learning_rate=None, batch_size=None): pass gin.parse_config_file('config.gin') train() Verify before relying: - Whether the package supports modern Python versions beyond 3.7 (classifiers list only up to 3.7) - Current maintenance status and whether the 2021 release date indicates active development or stable maintenance mode - Specific example parameter values for typical machine learning configurations ## Package facts - License: Apache 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 578.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python configuration framework, dependency injection config, function parameter configuration, machine learning experiment config, gin config decorator, config file parameter injection, experiment hyperparameter management, configuration-management, dependency-injection, ml-experiments [View on SkillFed](https://skillfed.io/packages/gin-config) · [View on PyPI](https://pypi.org/project/gin-config/)