# django-composed-configuration
[![PyPI](https://img.shields.io/pypi/v/django-composed-configuration)](https://pypi.org/project/django-composed-configuration/)
Turnkey Django settings for data management applications.
## Installation
Add to your project's requirements:
```
django-composed-configuration[dev,prod]
```
In your project's `settings.py`:
```python
from composed_configuration import (
ComposedConfiguration,
ConfigMixin,
DevelopmentBaseConfiguration,
ProductionBaseConfiguration,
)
class _ProjectMixin(ConfigMixin):
# Define additional project-specific settings or overrides here
pass
@staticmethod
def mutate_configuration(configuration: ComposedConfiguration) -> None:
# Perform any non-overriding mutation of existing settings here
# The "configuration" variable contains the flattened settings
# For example:
# configuration.INSTALLED_APPS += ['my_extra_app']
pass
class DevelopmentConfiguration(_ProjectMixin, DevelopmentBaseConfiguration):
pass
class ProductionConfiguration(_ProjectMixin, ProductionBaseConfiguration):
pass
```
At runtime:
* continue to set the `DJANGO_SETTINGS_MODULE` environment variable (pointing to `settings.py`)
* also set `DJANGO_CONFIGURATION`, with a value of
either `DevelopmentConfiguration` or `ProductionConfiguration`
Raw data
{
"_id": null,
"home_page": null,
"name": "django-composed-configuration",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "\"Kitware, Inc.\" <kitware@kitware.com>",
"keywords": "configuration, configurations, django, resonant, setting, settings",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e1/ba/2a8d3302c849bbb45983aa7123b07eee987ef6fdfb5817b8f28034a2b52d/django_composed_configuration-0.25.0.tar.gz",
"platform": null,
"description": "# django-composed-configuration\n[![PyPI](https://img.shields.io/pypi/v/django-composed-configuration)](https://pypi.org/project/django-composed-configuration/)\n\nTurnkey Django settings for data management applications.\n\n## Installation\nAdd to your project's requirements:\n```\ndjango-composed-configuration[dev,prod]\n```\n\nIn your project's `settings.py`:\n```python\nfrom composed_configuration import (\n ComposedConfiguration,\n ConfigMixin,\n DevelopmentBaseConfiguration,\n ProductionBaseConfiguration,\n)\n\n\nclass _ProjectMixin(ConfigMixin):\n # Define additional project-specific settings or overrides here\n pass\n\n @staticmethod\n def mutate_configuration(configuration: ComposedConfiguration) -> None:\n # Perform any non-overriding mutation of existing settings here\n # The \"configuration\" variable contains the flattened settings\n # For example:\n # configuration.INSTALLED_APPS += ['my_extra_app']\n pass\n\n\nclass DevelopmentConfiguration(_ProjectMixin, DevelopmentBaseConfiguration):\n pass\n\n\nclass ProductionConfiguration(_ProjectMixin, ProductionBaseConfiguration):\n pass\n```\n\nAt runtime:\n* continue to set the `DJANGO_SETTINGS_MODULE` environment variable (pointing to `settings.py`)\n* also set `DJANGO_CONFIGURATION`, with a value of\n either `DevelopmentConfiguration` or `ProductionConfiguration`\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Turnkey Django settings for data management applications.",
"version": "0.25.0",
"project_urls": {
"Bug Reports": "https://github.com/kitware-resonant/django-composed-configuration/issues",
"Repository": "https://github.com/kitware-resonant/django-composed-configuration"
},
"split_keywords": [
"configuration",
" configurations",
" django",
" resonant",
" setting",
" settings"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7dad7b6b1e87be84785ecc872130ea67c113391de1ee880e4265e8f80d7615d0",
"md5": "65d6408b14f28ca9931cdf50c1396042",
"sha256": "0b161f349f043611305c60494e88b1a8eed371ca71cc6ae5e40e7efd2f6c04ef"
},
"downloads": -1,
"filename": "django_composed_configuration-0.25.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "65d6408b14f28ca9931cdf50c1396042",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 34494,
"upload_time": "2024-04-16T20:43:15",
"upload_time_iso_8601": "2024-04-16T20:43:15.647476Z",
"url": "https://files.pythonhosted.org/packages/7d/ad/7b6b1e87be84785ecc872130ea67c113391de1ee880e4265e8f80d7615d0/django_composed_configuration-0.25.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e1ba2a8d3302c849bbb45983aa7123b07eee987ef6fdfb5817b8f28034a2b52d",
"md5": "0f3112ddf72e1ce6c1eca73ca4e104eb",
"sha256": "f7ccb08bbced9dd93c39cbf9c0da5b463e8e76df061a650f1c2f0421364b7dbf"
},
"downloads": -1,
"filename": "django_composed_configuration-0.25.0.tar.gz",
"has_sig": false,
"md5_digest": "0f3112ddf72e1ce6c1eca73ca4e104eb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 23344,
"upload_time": "2024-04-16T20:43:17",
"upload_time_iso_8601": "2024-04-16T20:43:17.020220Z",
"url": "https://files.pythonhosted.org/packages/e1/ba/2a8d3302c849bbb45983aa7123b07eee987ef6fdfb5817b8f28034a2b52d/django_composed_configuration-0.25.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-16 20:43:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kitware-resonant",
"github_project": "django-composed-configuration",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "django-composed-configuration"
}