Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

configureme

Build Status Code style: black codecov Total alerts Language grade: Python GitHub license

Set up configuration for your application or library with ease.

Features

configureme gives you a few key features that make your life easy when creating libraries or applications:

  • Easily create configuration following the config.py pattern
  • Use environment variables in your configuration and change them dynamically at runtime
  • Use a .env file and follow the twelve-factor app methodology

Example

Get up and running with full configuration quickly:

from configureme import Config

class Config(object):
    DEBUG = False

config = Config()
# load from a simple object
config.from_object(Config)
# add and watch environment variables
config.from_envar("DEBUG")
# use a dotenv file
config.from_dotenv("/path/to/.env/")
# config works like a dict!
config["DEBUG"] # True

Installation

Installation is easy using pip:

pip install configureme

Advanced Usage

Usage with pipenv

If your using a dev workflow tool like Pipenv, you can easily pair configureme with it. Pipenv will automatically load .env files for you out of the box. To track variables loaded from a .env file when using Pipenv, simply use this pattern:

# .env file
DEBUG=true
from configureme import Config
config = Config()
# watch each variable loaded by Pipenv
config.from_envar("DEBUG")
config["DEBUG"]  # True

Usage with python-dotenv

python-dotenv is a useful tool for managing .env files in multiple environments. As with the previous example, it's easy to pair with configureme.

# .env file
DEBUG=true
from dotenv import load_dotenv
from configureme import Config

load_dotenv()
config = Config()
# watch each variable loaded by python-dotenv
config.from_envar("DEBUG")
config["DEBUG"]  # True

How to contribute

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.

  2. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).

  3. Write a test which shows that the bug was fixed or that the feature works as expected. Make sure to use pre-commit too!

  4. Send a pull request and bug the maintainer until it gets merged and published. Make sure to add yourself to AUTHORS.

Release files for configureme 0.1.2a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for configureme 0.1.2a0
File Size Uploaded
configureme-0.1.2a0.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for configureme 0.1.2a0
File Interpreter ABI Platform
configureme-0.1.2a0-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / configureme-0.1.2a0.tar.gz

Download URL configureme-0.1.2a0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d61082c5f7b5336ecad0417a1d6b24ea537bf6b6054071294ba50c8d7e79a1d0
BLAKE2b-256 checksum
How to use checksums
430e3033df16acdc269903b6981997c3e46cdeaa5a5680704a44a066096ec390
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

Release files / configureme-0.1.2a0-py3-none-any.whl

Download URL configureme-0.1.2a0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71d53e60a3b87a45c3e3d30debac84b77c83f31e75d0b200d72a9556dff9f5c3
BLAKE2b-256 checksum
How to use checksums
58ed8fd44396cbbfd86fc0eaf9af4b01c0439dbae176e27292e135beea9c64f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page