devel/py-python-decouple 3.6_1 DragonFly
Strict separation of settings from code
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- MIT
- Categories
- devel, python
- Package size
- 14.2 KiB, 54.3 KiB installed
Description
Decouple helps you to organize your settings so that you can change parameters without having to redeploy your app.
It also makes it easy for you to:
* store parameters in ini or .env files; * define comprehensive default values; * properly convert values to the correct data type; * have only one configuration module to rule all your instances. * It was originally designed for Django, but became an independent generic too for separating settings from code.
Import the config object:
from decouple import config
Retrieve the configuration parameters:
SECRET_KEY = config('SECRET_KEY') DEBUG = config('DEBUG', default=False, cast=bool) EMAIL_HOST = config('EMAIL_HOST', default='localhost') EMAIL_PORT = config('EMAIL_PORT', default=25, cast=int)
In the other systems
| System | Port | Version |
|---|---|---|
| DragonFly | devel/py-python-decouple | 3.6_1 |
| FreeBSD | devel/py-python-decouple | 3.8 |
| HardenedBSD | devel/py-python-decouple | 3.8 |
| GhostBSD | devel/py-python-decouple | 3.8 |
Install
Binary package:
pkg install py311-python-decouple
From DPorts:
cd /usr/dports/devel/py-python-decouple && make install clean
Dependencies
Run dependencies 1
No port depends on this one.