Skip to main content

Utilize environment variables from JSON file to configure your Python application.

Project description

JSON Environ

.. image::

.. image::
:alt: Documentation Status

Utilize environment variables from JSON file to configure your Python application. Inspired from `django-environ`_.

.. _django-environ:

* Free software: MIT license
* Documentation:

Quick Example

Let's assume we have JSON file like::

"SECRET_KEY": "kminvupn=7dbw70e!#njo8qas2bx$tmw$nv1pt$g30&+f4(8c)",
"DEBUG": true,
"SSL": false,
"NAME": "dbname",
"USER": "dbuser",
"PASSWORD": "dbsecret"

To use `JSON Environ` in a project::

import os

from json_environ import Environ

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
env_path = os.path.join(BASE_DIR, '.my_env.json')
env = Environ(path=env_path)

DEBUG = env("DEBUG")
if env('SSL', default=False) is True:

'default': {
'NAME': env("DATABASE:NAME", default="test"),
'USER': env("DATABASE:USER", default="lms"),
'PASSWORD': env("DATABASE:PASSWORD", default="123456"),


This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter:
.. _`audreyr/cookiecutter-pypackage`:


0.1.0 (2017-10-09)

* First release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for json_environ, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size json_environ-0.1.1-py2.py3-none-any.whl (5.1 kB) File type Wheel Python version 3.5 Upload date Hashes View
Filename, size json_environ-0.1.1.tar.gz (12.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page