Skip to main content

modern local environment management

Project description

      _
  ___| |__   ___ _ ____   __
 / __| '_ \ / _ | '_ \ \ / /
| (__| | | |  __| | | \ V /
 \___|_| |_|\___|_| |_|\_/ . modern local environment management

Project Status PyPI Python Version License

Read the documentation at https://chenv.readthedocs.io/ Tests Codecov

pre-commit Black

This command-line interface creates and manages local .env files from various sources.

Coupled with python-dotenv for python, or dotenv for node.js development, it provides better, more consistent environment variable management and developement.

Installation

To install chenv, run this command in your terminal:

$ pip install --user chenv

Also make sure that your $PATH includes $HOME/.local/bin. If not, add this line to your .bashrc / .zshrc:

export PATH=$HOME/.local/bin:$PATH;

Usage

chenv’s usage looks like:

$ chenv COMMAND [ARGS]

Commands currently include:

blank

Choose to set .env as a new, blank, .env.blank file.

heroku

Choose to set .env from a remote heroku app config-vars, as .env.[app-name].

  • -t <team>, --team <team>

    Pre-fill team name

  • -a <app>, --app <app>

    Pre-fill app name

local

Choose to set .env from a local, pre-exsiting .env.* file.

  • filename

    Pre-fill file-suffix name

Project Configurations

chenv also provides two file types that manipulate the output of new .env.* files being set.

.envignore

Specifies intentionally unwanted environment-variables. Each line in a envignore file specifies a pattern.

When deciding whether to ignore an environment variable, chenv checks it’s key against the list of patterns described in this file.

Pattern:

.envignore uses the unix filename pattern matching, similar to .gitignore’s, and as specified at https://docs.python.org/3/library/fnmatch.html

.envmerge

Sepecifies environment variables to merge / override after any input is chosen. This provides consistency to preffered settings such as the logging-level, or NODE_ENV for local development usage in node.js.

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

chenv-0.2.4.dev1611748339.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

chenv-0.2.4.dev1611748339-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file chenv-0.2.4.dev1611748339.tar.gz.

File metadata

  • Download URL: chenv-0.2.4.dev1611748339.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for chenv-0.2.4.dev1611748339.tar.gz
Algorithm Hash digest
SHA256 6e4336678d19dfcec03de16c06b177f186accdb6491579426e7d9f7f4d8e5cde
MD5 d33164744b559307779777d4c804376b
BLAKE2b-256 8da2edb791d11c0d6cadf5574a4bac5d1e70384e4fdb87ab52e79a93bcc9c2d4

See more details on using hashes here.

File details

Details for the file chenv-0.2.4.dev1611748339-py3-none-any.whl.

File metadata

  • Download URL: chenv-0.2.4.dev1611748339-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for chenv-0.2.4.dev1611748339-py3-none-any.whl
Algorithm Hash digest
SHA256 ef7b03ae93333f6ba0d20aebbc0ca2931ce8bb9cb5233a9544af96a9f5c74d27
MD5 56f64c0f7554fb2c2cf336b96ad5d237
BLAKE2b-256 8b164aaf992be76f4fb67a964a19ccb6c6c401390aa3a5cc13c505278bf2b920

See more details on using hashes here.

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