mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
devel/py-python-decouple: Add new port: Separation of settings from code
Decouple helps you to organize your settings so that you can change parameters without having to redeploy your app. re: https://github.com/henriquebastos/python-decouple/
This commit is contained in:
parent
494cfc7c54
commit
eb231fa7d7
4 changed files with 45 additions and 0 deletions
|
@ -5112,6 +5112,7 @@
|
|||
SUBDIR += py-python-bugzilla
|
||||
SUBDIR += py-python-dbusmock
|
||||
SUBDIR += py-python-distutils-extra
|
||||
SUBDIR += py-python-decouple
|
||||
SUBDIR += py-python-dtrace
|
||||
SUBDIR += py-python-easyconfig
|
||||
SUBDIR += py-python-editor
|
||||
|
|
17
devel/py-python-decouple/Makefile
Normal file
17
devel/py-python-decouple/Makefile
Normal file
|
@ -0,0 +1,17 @@
|
|||
PORTNAME= python-decouple
|
||||
DISTVERSION= 3.5
|
||||
CATEGORIES= devel python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= dvl@FreeBSD.org
|
||||
COMMENT= Strict separation of settings from code
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
USES= python:3.6+
|
||||
USE_PYTHON= distutils autoplist
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
.include <bsd.port.mk>
|
3
devel/py-python-decouple/distinfo
Normal file
3
devel/py-python-decouple/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1641484322
|
||||
SHA256 (python-decouple-3.5.tar.gz) = 68e4b3fcc97e24bc90eecc514852d0bf970f4ff031f5f7a6728ddafa9afefcaf
|
||||
SIZE (python-decouple-3.5.tar.gz) = 11655
|
24
devel/py-python-decouple/pkg-descr
Normal file
24
devel/py-python-decouple/pkg-descr
Normal file
|
@ -0,0 +1,24 @@
|
|||
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)
|
||||
|
||||
WWW: https://github.com/henriquebastos/python-decouple/
|
Loading…
Add table
Reference in a new issue