before send to remote

This commit is contained in:
5408 changed files with 652023 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
Credits
=======
``django-environ`` was initially created by `Daniele Faraglia <https://github.com/joke2k>`_
and currently maintained by `Serghei Iakovlev <https://github.com/sergeyklay/>`_.
A full list of contributors can be found in `GitHub <https://github.com/joke2k/django-environ/graphs/contributors>`__.
Acknowledgments
===============
The existence of ``django-environ`` would have been impossible without these
projects:
- `rconradharris/envparse <https://github.com/rconradharris/envparse>`_
- `jazzband/dj-database-url <https://github.com/jazzband/dj-database-url>`_
- `migonzalvar/dj-email-url <https://github.com/migonzalvar/dj-email-url>`_
- `ghickman/django-cache-url <https://github.com/ghickman/django-cache-url>`_
- `dstufft/dj-search-url <https://github.com/dstufft/dj-search-url>`_
- `julianwachholz/dj-config-url <https://github.com/julianwachholz/dj-config-url>`_
- `nickstenning/honcho <https://github.com/nickstenning/honcho>`_
- `rconradharris/envparse <https://github.com/rconradharris/envparse>`_

View File

@@ -0,0 +1 @@
pip

View File

@@ -0,0 +1,20 @@
Copyright (c) 2021, Serghei Iakovlev <egrep@protonmail.ch>
Copyright (c) 2013-2021, Daniele Faraglia <daniele.faraglia@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,275 @@
Metadata-Version: 2.1
Name: django-environ
Version: 0.9.0
Summary: A package that allows you to utilize 12factor inspired environment variables to configure your Django application.
Home-page: https://django-environ.readthedocs.org
Author: Daniele Faraglia
Author-email: daniele.faraglia@gmail.com
Maintainer: Serghei Iakovlev
Maintainer-email: egrep@protonmail.ch
License: MIT
Project-URL: Documentation, https://django-environ.readthedocs.org
Project-URL: Funding, https://opencollective.com/django-environ
Project-URL: Say Thanks!, https://saythanks.io/to/joke2k
Project-URL: Changelog, https://django-environ.readthedocs.org/en/latest/changelog.html
Project-URL: Bug Tracker, https://github.com/joke2k/django-environ/issues
Project-URL: Source Code, https://github.com/joke2k/django-environ
Keywords: environment,django,variables,12factor
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.11
Classifier: Framework :: Django :: 2.0
Classifier: Framework :: Django :: 2.1
Classifier: Framework :: Django :: 2.2
Classifier: Framework :: Django :: 3.0
Classifier: Framework :: Django :: 3.1
Classifier: Framework :: Django :: 3.2
Classifier: Framework :: Django :: 4.0
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.4,<4
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
License-File: AUTHORS.rst
Provides-Extra: develop
Requires-Dist: coverage[toml] (>=5.0a4) ; extra == 'develop'
Requires-Dist: pytest (>=4.6.11) ; extra == 'develop'
Requires-Dist: furo (==2021.8.*,>=2021.8.17b43) ; extra == 'develop'
Requires-Dist: sphinx (>=3.5.0) ; extra == 'develop'
Requires-Dist: sphinx-notfound-page ; extra == 'develop'
Provides-Extra: docs
Requires-Dist: furo (==2021.8.*,>=2021.8.17b43) ; extra == 'docs'
Requires-Dist: sphinx (>=3.5.0) ; extra == 'docs'
Requires-Dist: sphinx-notfound-page ; extra == 'docs'
Provides-Extra: testing
Requires-Dist: coverage[toml] (>=5.0a4) ; extra == 'testing'
Requires-Dist: pytest (>=4.6.11) ; extra == 'testing'
==============
django-environ
==============
``django-environ`` is the Python package that allows you to use
`Twelve-factor methodology <https://www.12factor.net/>`_ to configure your
Django application with environment variables.
.. -teaser-end-
For that, it gives you an easy way to configure Django application using
environment variables obtained from an environment file and provided by the OS:
.. -code-begin-
.. code-block:: python
import environ
import os
env = environ.Env(
# set casting, default value
DEBUG=(bool, False)
)
# Set the project base directory
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Take environment variables from .env file
environ.Env.read_env(os.path.join(BASE_DIR, '.env'))
# False if not in os.environ because of casting above
DEBUG = env('DEBUG')
# Raises Django's ImproperlyConfigured
# exception if SECRET_KEY not in os.environ
SECRET_KEY = env('SECRET_KEY')
# Parse database connection url strings
# like psql://user:pass@127.0.0.1:8458/db
DATABASES = {
# read os.environ['DATABASE_URL'] and raises
# ImproperlyConfigured exception if not found
#
# The db() method is an alias for db_url().
'default': env.db(),
# read os.environ['SQLITE_URL']
'extra': env.db_url(
'SQLITE_URL',
default='sqlite:////tmp/my-tmp-sqlite.db'
)
}
CACHES = {
# Read os.environ['CACHE_URL'] and raises
# ImproperlyConfigured exception if not found.
#
# The cache() method is an alias for cache_url().
'default': env.cache(),
# read os.environ['REDIS_URL']
'redis': env.cache_url('REDIS_URL')
}
.. -overview-
The idea of this package is to unify a lot of packages that make the same stuff:
Take a string from ``os.environ``, parse and cast it to some of useful python
typed variables. To do that and to use the `12factor <https://www.12factor.net/>`_
approach, some connection strings are expressed as url, so this package can parse
it and return a ``urllib.parse.ParseResult``. These strings from ``os.environ``
are loaded from a ``.env`` file and filled in ``os.environ`` with ``setdefault``
method, to avoid to overwrite the real environ.
A similar approach is used in `Two Scoops of Django <https://www.feldroy.com/books/two-scoops-of-django-3-x>`_
book and explained in `12factor-django <https://wellfire.co/learn/easier-12-factor-django>`_
article.
Using ``django-environ`` you can stop to make a lot of unversioned
``settings_*.py`` to configure your app.
See `cookiecutter-django <https://github.com/cookiecutter/cookiecutter-django>`_
for a concrete example on using with a django project.
**Feature Support**
- Fast and easy multi environment for deploy
- Fill ``os.environ`` with .env file variables
- Variables casting
- Url variables exploded to django specific package settings
- Optional support for Docker-style file based config variables (use
``environ.FileAwareEnv`` instead of ``environ.Env``)
.. -project-information-
Project Information
===================
``django-environ`` is released under the `MIT / X11 License <https://choosealicense.com/licenses/mit/>`__,
its documentation lives at `Read the Docs <https://django-environ.readthedocs.io/en/latest/>`_,
the code on `GitHub <https://github.com/joke2k/django-environ>`_,
and the latest release on `PyPI <https://pypi.org/project/django-environ/>`_.
Its rigorously tested on Python 3.5+, and officially supports
Django 1.11, 2.2, 3.0, 3.1, 3.2 and 4.0.
If you'd like to contribute to ``django-environ`` you're most welcome!
.. -support-
Support
=======
Should you have any question, any remark, or if you find a bug, or if there is
something you can't do with the ``django-environ``, please
`open an issue <https://github.com/joke2k/django-environ>`_.
Contributing
============
If you would like to contribute to ``django-environ``, please take a look at the
`current issues <https://github.com/joke2k/django-environ/issues>`_. If there is
a bug or feature that you want but it isn't listed, make an issue and work on it.
How to Contribute
-----------------
1. Check for open issues or open a fresh issue to start a discussion around a
feature idea or a bug.
2. Fork `the repository <https://github.com/joke2k/django-environ>`_ on GitHub
to start making your changes to the **develop** branch (or branch off of it).
3. Write a test which shows that the bug was fixed or that the feature works as
expected.
4. Send a pull request and bug the maintainer until it gets merged and published.
Release Information
===================
v0.9.0 - 15-June-2022
------------------------------
Added
+++++
- Added support for Postgresql cluster URI
`#355 <https://github.com/joke2k/django-environ/pull/355>`_.
- Added support for Django 4.0
`#371 <https://github.com/joke2k/django-environ/issues/371>`_.
- Added support for prefixed variables
`#362 <https://github.com/joke2k/django-environ/issues/362>`_.
- Amended documentation.
Deprecated
++++++++++
- ``Env.unicode()`` is deprecated and will be removed in the next
major release. Use ``Env.str()`` instead.
Changed
+++++++
- Attach cause to ``ImproperlyConfigured`` exception
`#360 <https://github.com/joke2k/django-environ/issues/360>`_.
Fixed
+++++
- Fixed ``_cast_urlstr`` unquoting
`#357 <https://github.com/joke2k/django-environ/issues/357>`_.
- Fixed documentation regarding unsafe characters in URLs
`#220 <https://github.com/joke2k/django-environ/issues/220>`_.
- Fixed ``environ.Path.__eq__()`` to compare paths correctly
`#86 <https://github.com/joke2k/django-environ/issues/86>`_,
`#197 <https://github.com/joke2k/django-environ/issues/197>`_.
`Full changelog <https://django-environ.readthedocs.org/en/latest/changelog.html>`_.
Security Policy
===============
Reporting a Vulnerability
-------------------------
If you discover a security vulnerability within ``django-environ``, please
send an e-mail to Serghei Iakovlev via egrep@protonmail.ch. All security
vulnerabilities will be promptly addressed.
Credits
=======
``django-environ`` was initially created by `Daniele Faraglia <https://github.com/joke2k>`_
and currently maintained by `Serghei Iakovlev <https://github.com/sergeyklay/>`_.
A full list of contributors can be found in `GitHub <https://github.com/joke2k/django-environ/graphs/contributors>`__.
Acknowledgments
===============
The existence of ``django-environ`` would have been impossible without these
projects:
- `rconradharris/envparse <https://github.com/rconradharris/envparse>`_
- `jazzband/dj-database-url <https://github.com/jazzband/dj-database-url>`_
- `migonzalvar/dj-email-url <https://github.com/migonzalvar/dj-email-url>`_
- `ghickman/django-cache-url <https://github.com/ghickman/django-cache-url>`_
- `dstufft/dj-search-url <https://github.com/dstufft/dj-search-url>`_
- `julianwachholz/dj-config-url <https://github.com/julianwachholz/dj-config-url>`_
- `nickstenning/honcho <https://github.com/nickstenning/honcho>`_
- `rconradharris/envparse <https://github.com/rconradharris/envparse>`_

View File

@@ -0,0 +1,15 @@
django_environ-0.9.0.dist-info/AUTHORS.rst,sha256=rLyl-fxsjwu0T7Q_MqXPdVLz_53Zh_qgBpwidqRExpw,1027
django_environ-0.9.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
django_environ-0.9.0.dist-info/LICENSE.txt,sha256=9tJkv1KMKXXY8mVA2SZREkV5mY45aR29nnxo6y9274s,1154
django_environ-0.9.0.dist-info/METADATA,sha256=66YXMB8IDCaAX_wZ4XazpQfycCgSOvjBdsakntym_YM,10074
django_environ-0.9.0.dist-info/RECORD,,
django_environ-0.9.0.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
django_environ-0.9.0.dist-info/top_level.txt,sha256=vLrvR0rjlfzn--WLv_InBUvf9Lhd-VZIisjM2eBC9QE,8
environ/__init__.py,sha256=ZI6Kqp2msSGD3QixjzfcHzQ4QK4IHAsVgak4RP-zkj4,1473
environ/__pycache__/__init__.cpython-38.pyc,,
environ/__pycache__/compat.cpython-38.pyc,,
environ/__pycache__/environ.cpython-38.pyc,,
environ/__pycache__/fileaware_mapping.cpython-38.pyc,,
environ/compat.py,sha256=Fyd1d1EVKBq4m3WiCZQ35MyT41xUe0tZDPJNBCxHPfU,1682
environ/environ.py,sha256=f7z7sg4JzSyqNbrwYz_T4rFhsrYdFJp6YSS8j48EAQw,35269
environ/fileaware_mapping.py,sha256=W-bZGMwPrcembOF3bXpvDBFASYJ-vXrudxyklGYpDfI,3113

View File

@@ -0,0 +1,6 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.37.1)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any

View File

@@ -0,0 +1 @@
environ