Skip to main content

Django Environment Config

Coverage Status GitHub Workflow Status PyPI GitHub GitHub Last Commit GitHub Issues Downloads Python Version

pip install django-environment-config

Documentation: https://mrthearman.github.io/django-environment-config/

Source Code: https://github.com/MrThearMan/django-environment-config/

Contributing: https://github.com/MrThearMan/django-environment-config/blob/main/CONTRIBUTING.md


Inspired by django-configurations, this library aims to provide a simple way to configure settings for different environments in Django applications. For example, you might want to have different settings for local development compared to production, and different still when running automated tests or in checks in you CI.

Overview

Environments are defined with a simple class-based configuration in the settings.py module.

from env_config import Environment, values

class Example(Environment):
    DEBUG = True
    SECRET_KEY = values.StringValue()
    ALLOWED_HOSTS = values.ListValue(default=["*"])
    DATABASES = values.DatabaseURLValue()

The Environment must be selected by setting the DJANGO_SETTINGS_ENVIRONMENT environment variable to the name of the class.

DJANGO_SETTINGS_ENVIRONMENT=Example python manage.py runserver

Check out the docs for more information.

Metadata

Release files for django-environment-config 0.2.3

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

Source distribution (sdist)

Source distribution for django-environment-config 0.2.3
File Size Uploaded
django_environment_config-0.2.3.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-environment-config 0.2.3
File Interpreter ABI Platform
django_environment_config-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 24.9 kB

Release files / django_environment_config-0.2.3.tar.gz

Download URL django_environment_config-0.2.3.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
17d8b338686045a73cb6a7a4784ba88e892bccfd1e8cf9bef6d3a59a68514fc6
BLAKE2b-256 checksum
How to use checksums
01b9f5f06010d099ae13b6538ffbbf98ba7e7e36dc80d1f8b22028e0e420fb87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.0 CPython/3.13.5 Linux/6.11.0-1018-azure

Release files / django_environment_config-0.2.3-py3-none-any.whl

Download URL django_environment_config-0.2.3-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
401eb6670a4316e4e7c87623d847040bbe35d58321404a61c4d6ddfc44aa7ce0
BLAKE2b-256 checksum
How to use checksums
4cb8e03b4fbc52fc37c371bde1657c329a3a4711096ee78ad3d926072e96793f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.0 CPython/3.13.5 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

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