Metadata-Version: 2.1
Name: django-environment-config
Version: 0.2.1
Summary: Configure django settings for multiple environments.
Home-page: https://mrthearman.github.io/django-environment-config
License: MIT
Keywords: django,configuration,settings,environment,env,config
Author: Matti Lamppu
Author-email: lamppu.matti.akseli@gmail.com
Requires-Python: >=3.10,<4
Classifier: Environment :: Web Environment
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Provides-Extra: cache
Provides-Extra: db
Requires-Dist: Django (>=4.2)
Requires-Dist: dj-database-url (>=2.1.0,<3.0.0) ; extra == "db"
Requires-Dist: django-cache-url (>=3.4.5,<4.0.0) ; extra == "cache"
Requires-Dist: python-dotenv (>=1.0.1)
Requires-Dist: typing-extensions (>=4.11.0) ; python_version < "3.12"
Project-URL: Bug Tracker, https://github.com/MrThearMan/django-environment-config/issues
Project-URL: Repository, https://github.com/MrThearMan/django-environment-config
Description-Content-Type: text/markdown

# Django Environment Config

[![Coverage Status][coverage-badge]][coverage]
[![GitHub Workflow Status][status-badge]][status]
[![PyPI][pypi-badge]][pypi]
[![GitHub][licence-badge]][licence]
[![GitHub Last Commit][repo-badge]][repo]
[![GitHub Issues][issues-badge]][issues]
[![Downloads][downloads-badge]][pypi]
[![Python Version][version-badge]][pypi]

```shell
pip install django-environment-config
```

---

**Documentation**: [https://mrthearman.github.io/django-environment-config/](https://mrthearman.github.io/django-environment-config/)

**Source Code**: [https://github.com/MrThearMan/django-environment-config/](https://github.com/MrThearMan/django-environment-config/)

**Contributing**: [https://github.com/MrThearMan/django-environment-config/blob/main/CONTRIBUTING.md](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.

```python
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.

```shell
DJANGO_SETTINGS_ENVIRONMENT=Example python manage.py runserver
```

Check out the [docs] for more information.

[django-configurations]: https://github.com/jazzband/django-configurations
[docs]: https://mrthearman.github.io/django-environment-config/

[coverage-badge]: https://coveralls.io/repos/github/MrThearMan/django-environment-config/badge.svg?branch=main
[status-badge]: https://img.shields.io/github/actions/workflow/status/MrThearMan/django-environment-config/test.yml?branch=main
[pypi-badge]: https://img.shields.io/pypi/v/django-environment-config
[licence-badge]: https://img.shields.io/github/license/MrThearMan/django-environment-config
[repo-badge]: https://img.shields.io/github/last-commit/MrThearMan/django-environment-config
[issues-badge]: https://img.shields.io/github/issues-raw/MrThearMan/django-environment-config
[version-badge]: https://img.shields.io/pypi/pyversions/django-environment-config
[downloads-badge]: https://img.shields.io/pypi/dm/django-environment-config

[coverage]: https://coveralls.io/github/MrThearMan/django-environment-config?branch=main
[status]: https://github.com/MrThearMan/django-environment-config/actions/workflows/test.yml
[pypi]: https://pypi.org/project/django-environment-config
[licence]: https://github.com/MrThearMan/django-environment-config/blob/main/LICENSE
[repo]: https://github.com/MrThearMan/django-environment-config/commits/main
[issues]: https://github.com/MrThearMan/django-environment-config/issues

