Detect environment type and work within.
Project description
https://github.com/idlesign/envbox
Description
Detect environment type and work within.
Features
Environment type detection (extendable system);
Convenient os.environ proxying (with optional values casting into Python natives);
Automatic submodule-for-environment import tool;
CLI for environment type 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
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)
Note: envbox CLI requires click package available.
Documentation
Project details
Release history Release notifications | RSS feed
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.2.0.tar.gz.
File metadata
- Download URL: envbox-0.2.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d11d73edb6bb5cfed6b8bc1010e93c728cc6b57b97d7bd4e5af698e4a15f2ca6
|
|
| MD5 |
06367b64f03dcd193a4a75fba60b5ed1
|
|
| BLAKE2b-256 |
f2c9b2fc8571f1de17fff8b24106a7e286e91528f83615524a4dd92bc1535810
|
File details
Details for the file envbox-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: envbox-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c189d1a8412f9b2b8b6dcfcf10e32957df6854427b4f0f195f0f736d3db786e
|
|
| MD5 |
547aef2e5c25401114f2355c9721094e
|
|
| BLAKE2b-256 |
dc6a9517e1f0b81b7b924bb58454f5f07f56c53f09db8012b5a54d29ab1706cd
|