Skip to main content

env-config

https://img.shields.io/pypi/v/env_config.svg https://img.shields.io/travis/timmartin19/env_config.svg Documentation Status Updates

A tool for configuring your application via environment variables

Features

Gets configuration from environment variables that start with app_name optionally allowing you to load the environment variables as json

Example with load_as_json=True

from env_config import get_envvar_configuration

# Assuming that there are the following environment variables
# MYAPP_BOOL=false
# MYAPP_DICT={"some_key": "some_value"}
# MYAPP_STRING=blahblahblah
# NOTMYAPP_VARIABLE=this wont be recognized

config = get_envvar_configuration('myapp')
print(config)

# prints out {'BOOL': False, 'DICT': {'some_key': 'some_value'}, 'STRING': 'blahblahblah'}

Example with load_as_json=False

config = get_envvar_configuration('myapp', load_as_json=False)
print(config)

# prints out {'BOOL': 'false', 'DICT': '{"some_key": "some_value"}', 'STRING': 'blahblahblah'}

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2016-07-11)

  • First release on PyPI.

Metadata

Release files for py-env-config 0.1.2

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

Source distribution (sdist)

Source distribution for py-env-config 0.1.2
File Size Uploaded
py-env-config-0.1.2.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-env-config 0.1.2
File Interpreter ABI Platform
py_env_config-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 16.9 kB

Release files / py-env-config-0.1.2.tar.gz

Download URL py-env-config-0.1.2.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8001c4774cac6bc623602bec1316bc74aacfc4e963df26acc406fe96caaad750
BLAKE2b-256 checksum
How to use checksums
537a3724d2448dddd516016ce13649a8a4ade133b4791fc1371c2dcf95ff3104
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / py_env_config-0.1.2-py2.py3-none-any.whl

Download URL py_env_config-0.1.2-py2.py3-none-any.whl
Size 4.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fec7f4e14cf570dde57d9eb74b6045698219870f1e20567e07a01a85c1f0d528
BLAKE2b-256 checksum
How to use checksums
90ce1ef9f974510c7e833b182f12bdc2754bf08db593212ccf470f7927c9b98f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

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