Skip to main content

A simple, yet capable configuration library for Python

Project description

pyfig

A Python configuration system that's powerful enough to meet complex requirements, while being simple enough so new contributors to your software can confidently make changes without worrying how to get everything setup.

Features

  • 📂 Hierarchical overrides
  • ✅ Validation powered by pydantic
  • 📝 Extensible templating for variables
  • 🛠️ Types, defaults, validation, and docs: all in one place directly in your code

Note: pyfig does not inherently support changes to the config at runtime. This feature is not planned.

Installation

pip install jpyfig

Requirements

Strictly, only pydantic is required.

To make full use of the all features, you may also need some of:

These can be independently installed as necessary.

Usage

  1. Install pyfig
  2. Create a class tree of subclasses of Pyfig (*). Provide all attributes, types, docs, and defaults in your .py's
  3. Create overriding configs that can be applied hierarchically based on your requirements
  4. Load your configuration:
    • Using either the built-in 'metaconf' feature, or
    • By creating your own implementation and calling pyfig.load_configuration(...) appropriately

Tutorial

There is a small tutorial ready to walk you through the features and patterns when using Pyfig. Click me

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jpyfig-0.2.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jpyfig-0.2.0-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file jpyfig-0.2.0.tar.gz.

File metadata

  • Download URL: jpyfig-0.2.0.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jpyfig-0.2.0.tar.gz
Algorithm Hash digest
SHA256 060b4c90f036b532c184219ab480372b2e04cbe91de3ee251acc754680833b80
MD5 00cdec76dd27d55e2f4d290c6428be07
BLAKE2b-256 71ba9bbfa4f448edfe41854652f28542832919993121306dc92350b7f41a7df2

See more details on using hashes here.

File details

Details for the file jpyfig-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: jpyfig-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jpyfig-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b3338d881bd734f545ff97d1084acd7d6f3c7d2ea0a7c74a2255659fc28d4bb
MD5 7be2cecda2ad6b4a6379a9d11256a994
BLAKE2b-256 0ca392c491cf93c809715b8d80093809d81f88f3a0ff9a1fa290c15521de6af7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page