Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

No project description provided

Project description

JSON Schema Application Environment Configuration and Validation

This package allows you to validate application environment variables that are used for configuration with JSON schemas.

It is extremely useful to use with Docker/kubernetes where you might have quite a bit of configuration originating from environment variables; however, it also provides a nice generic way to define and validate any application configuration with JSON Schema.


First, define a JSON Schema file(env-schema.json):

    "$schema": "", 
    "type": "object",
    "properties": {
        "db_uri": {
            "type": "string",
            "title": "AMQP host"
    "required": ["db_uri"]

Then, validate your environment config(export DB_URI=postgresql://localhost:5432):

import enviral
settings = enviral.validate_env('env-schema.json')

Validate with multiple files:

import enviral
settings = enviral.validate_env('env-schema.json', 'package:validation-file.json')

You can also validate existing objects against JSON schema files:

import enviral
enviral.validate_object({"db_uri": "postgresql://localhost:5432"}, 'env-schema.json')

Or command line validate:

json-schema-env-validator env-schema.json package:validation-file.json


pip install -r requirements.txt
pip install -e .
./bin/pre-commit install

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-schema-env-validator, version 1.0.6
Filename, size File type Python version Upload date Hashes
Filename, size json-schema-env-validator-1.0.6.tar.gz (6.9 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