# cfig

The `cfig` package provides a simple but powerful configuration manager for Python applications.

## Pitch

Ever had trouble making your application configurable?
Ever fought with global objects which impeded code reuse?
Ever had a confused user ask you how to configure your application?
In that case, `cfig` is for you!

## Screenshots

An example configuration value is defined.

The previously defined configuration value is used in the program.

An user configuring the program previews the current configuration.

## Table of contents

- Project goals
  - Standards unification
  - Developer-friendliness
  - User-friendliness
  - Developer hints
- Installation
  - From PyPI
    - Using pip
    - Using Poetry
  - From source
    - Using PEP 518
  - For development
- Quickstart
  - Creating a configuration module
  - Creating configurable variables
    - Basics
    - Optional
    - Processing and validation
  - Adding CLI support
  - Use the configuration
  - Validate all variables at once
  - Conclusion
- Advanced usage
  - Fail-fast
  - Access all resolved variables at once
  - Reloading variables
  - Sources selection
    - Sources customization
- API reference
  - `cfig.config`
    - `Configuration`
      - `Configuration.DEFAULT_SOURCES`
      - `Configuration.ProxyDict`
        - `Configuration.ProxyDict.resolve()`
        - `Configuration.ProxyDict.resolve_failfast()`
        - `Configuration.ProxyDict.unresolve()`
      - `Configuration.sources`
      - `Configuration.proxies`
      - `Configuration.docs`
      - `Configuration.optional()`
      - `Configuration.required()`
      - `Configuration.register()`
      - `Configuration.cli()`
  - `cfig.errors`
    - `CfigError`
    - `DeveloperError`
    - `DefinitionError`
    - `UnknownResolverNameError`
    - `ProxyRegistrationError`
    - `DuplicateProxyNameError`
    - `UserError`
    - `ConfigurationError`
    - `MissingValueError`
    - `InvalidValueError`
    - `BatchResolutionFailure`
    - `MissingDependencyError`
  - `cfig.sources.base`
    - `Source`
      - `Source.get()`
  - `cfig.sources.env`
    - `EnvironmentSource`
      - `EnvironmentSource.prefix`
      - `EnvironmentSource.suffix`
      - `EnvironmentSource.environment`
      - `EnvironmentSource.get()`
  - `cfig.sources.envfile`
    - `EnvironmentFileSource`
      - `EnvironmentFileSource.get()`

## Other tables and links

- Index

- Module Index

- Search Page