Skip to main content

Python .env file made easier

Project description

About

Enviz is a python module that allows you to write and read environment variables from a file.

Installation

pip install enviz

Usage

from enviz import Env

# Read environment variables from a file
env = Env(path='.env.example', autowrite=True)

# We can update the environment variables with a dictionary
env.update({
    'TEST1': '1',
    'TEST2': '2'
})

# We can also update the environment variables by setting them manually
env['TEST3'] = '3'
# env.example
TEST1 = "1"
TEST2 = "2"
TEST3 = "3"

Enviz will automatically write the environment variables to the file if the autowrite parameter is set to True. If you want to write the environment variables manually, you can use the write() method.

Project details


Download files

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

Source Distribution

enviz-0.1.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

enviz-0.1.2-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page