python-decouple
Advanced tools
+7
-12
@@ -7,4 +7,5 @@ # coding: utf-8 | ||
| from io import open | ||
| from collections import OrderedDict | ||
| from distutils.util import strtobool | ||
| # Useful for very coarse version differentiation. | ||
@@ -41,4 +42,2 @@ PY3 = sys.version_info[0] == 3 | ||
| """ | ||
| _BOOLEANS = {'1': True, 'yes': True, 'true': True, 'on': True, | ||
| '0': False, 'no': False, 'false': False, 'off': False, '': False} | ||
@@ -53,7 +52,4 @@ def __init__(self, repository): | ||
| value = str(value) | ||
| if value.lower() not in self._BOOLEANS: | ||
| raise ValueError('Not a boolean: %s' % value) | ||
| return bool(value) if value == '' else bool(strtobool(value)) | ||
| return self._BOOLEANS[value.lower()] | ||
| @staticmethod | ||
@@ -160,6 +156,6 @@ def _cast_do_nothing(value): | ||
| """ | ||
| SUPPORTED = { | ||
| 'settings.ini': RepositoryIni, | ||
| '.env': RepositoryEnv, | ||
| } | ||
| SUPPORTED = OrderedDict([ | ||
| ('settings.ini', RepositoryIni), | ||
| ('.env', RepositoryEnv), | ||
| ]) | ||
@@ -214,3 +210,2 @@ encoding = DEFAULT_ENCODING | ||
| # Helpers | ||
@@ -217,0 +212,0 @@ |
+1
-1
| Metadata-Version: 1.1 | ||
| Name: python-decouple | ||
| Version: 3.2 | ||
| Version: 3.3 | ||
| Summary: Strict separation of settings from code. | ||
@@ -5,0 +5,0 @@ Home-page: http://github.com/henriquebastos/python-decouple/ |
| Metadata-Version: 1.1 | ||
| Name: python-decouple | ||
| Version: 3.2 | ||
| Version: 3.3 | ||
| Summary: Strict separation of settings from code. | ||
@@ -5,0 +5,0 @@ Home-page: http://github.com/henriquebastos/python-decouple/ |
+1
-1
@@ -9,3 +9,3 @@ # coding: utf-8 | ||
| setup(name='python-decouple', | ||
| version='3.2', | ||
| version='3.3', | ||
| description='Strict separation of settings from code.', | ||
@@ -12,0 +12,0 @@ long_description=open(README).read(), |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
53851
-0.27%206
-0.96%