Skip to main content

The Settings and Configuration on ideal practices for app development.

Project description

ConfigAlchemy

https://img.shields.io/pypi/v/configalchemy.svg CI Test Status Documentation Status https://img.shields.io/pypi/pyversions/configalchemy.svg https://codecov.io/gh/GuangTianLi/configalchemy/branch/master/graph/badge.svg https://img.shields.io/badge/code%20style-black-000000.svg

The Settings and Configuration on ideal practices for app development and package building.

Installation

$ pipenv install configalchemy
✨🍰✨

Only Python 3.6+ is supported.

Example

from configalchemy import BaseConfig

class DefaultConfig(BaseConfig):
    NAME = "test"

config = DefaultConfig()
config.NAME
>>> 'test'

Features

  • Base on The Twelve-Factor App Configuration.

  • Configurable dynamic configurator

  • Configuration-Oriented Development

    • Define default config value and its type which is used in your project

    • Use class to support inheritance to explicitly define configurable config

  • Override config value from multiple source with priority supported

    • Callable function return value

    • File (default: json)

    • Environment Variables

  • Proper Typecast before overriding

  • Generic Config Type Support by custom typecast

  • Lazy and Proxy Object Support.

  • Extension

TODO

  • IOC - Injector, Singleton

History

0.5.* (2020-12)

  • Support SingletonMetaClass

  • Remove unpack feature in BaseConfig by removing Mapping Class

  • Support nested config for large modular purpose

  • Support local object

  • Support generic pool object

  • Support Dot Notation to update BaseConfig object

0.4.* (2020-06)

  • Refatory configure function

  • Support property configuration

0.3.* (2020-03)

  • Add proxy and lazy module.

  • Add find_caller to trace source of config value

  • Refactory ConfigMeta data structure

0.2.* (2019-08)

  • Change global variable to weak reference

  • Remove Lock (Prepare to implement optimistic raw lock if necessary)

  • Improve Priority Data Structure

  • Improve Field Validation

  • Use OOP to define call function

  • Properer validation and typecast

  • Improve Type Annotations

  • Import JSON type

0.1.0 (2019-08-01)

  • Init Project.

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

configalchemy-0.5.5.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

configalchemy-0.5.5-py2.py3-none-any.whl (13.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file configalchemy-0.5.5.tar.gz.

File metadata

  • Download URL: configalchemy-0.5.5.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for configalchemy-0.5.5.tar.gz
Algorithm Hash digest
SHA256 f2ebb8fb85ba9a3ad9eed235ed1503ddb3f97cc5fdcf3163977755619cf3a37f
MD5 6f5f9101afb28265a5a3f912b9db7dc9
BLAKE2b-256 6b8eab15b3a5b3b058bf4e21aa72518edf3a706028e758d1a6f7106c3a8b08ce

See more details on using hashes here.

File details

Details for the file configalchemy-0.5.5-py2.py3-none-any.whl.

File metadata

  • Download URL: configalchemy-0.5.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for configalchemy-0.5.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e43dd8a027d18d24829cd9d96f2eac7007e2328c701a1b4c383dd35d90393b1e
MD5 132f6bd1b924e2fa832323fa276972b0
BLAKE2b-256 54e9befe94485ab3e69b6a766b11112b7124c025c46f1c30e8bbf682e59ba335

See more details on using hashes here.

Supported by

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