https://github.com/idlesign/envbox
Description
Detect environment type and work within.
Features
Environment type detection (extendable system);
Support for .env files;
Convenient os.environ proxying (with optional values casting into Python natives);
Automatic submodule-for-environment import tool;
Cosy per-thread settings container with environment var support;
CLI for environment probing.
Code sample
from envbox import get_environment
# Detect current environment type
# and get its object.
#
# Default detection sources:
# 1. ``PYTHON_ENV`` env variable
# 2. ``environment`` file contents
#
# By default this function will also try to read env variables from .env files.
env = get_environment()
env.name
# >> development
env.is_production
# >> False
env.get('HOME')
# The same as env['HOME'] and env.HOME
# >> /home/idle/
env.getmany('PYTHON')
# {'UNBUFFERED': '1', 'IOENCODING': 'UTF-8', 'PATH': ...}
Read the docs for more examples.
CLI
$ envbox probe
# >> Detected environment type: development (Development)
$ envbox show
# >> [...]
# >> SHELL = /bin/bash
# >> [...]
Note: envbox CLI requires click package available.
Documentation
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file envbox-0.4.0.tar.gz.
File metadata
- Download URL: envbox-0.4.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6c8f071be4a8b1a5b5315d46ae2c399c470405ffca61ef1f8bcfad634b2022c
|
|
| MD5 |
7e98a4bdd73e59e53a6d7fcd232092df
|
|
| BLAKE2b-256 |
9948752cf9965091e2e0b11f32a972cb9625e8b3160b9d918a2e10596c5341e1
|
File details
Details for the file envbox-0.4.0-py2.py3-none-any.whl.
File metadata
- Download URL: envbox-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b27205fb27ea5672f030be9c9f116c7ed1658933e9759c3810fe7476061498d
|
|
| MD5 |
2dd508a2450cf8d13d908121f3c7b333
|
|
| BLAKE2b-256 |
88c42cca3577f4bafda3418705ce4d8eeb9a24834595cd9c37f490390ea4ba7b
|