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);
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': ...}
CLI
$ envbox probe
# >> Detected environment type: development (Development)
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
envbox-0.1.0.tar.gz
(12.5 kB
view details)
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.1.0.tar.gz.
File metadata
- Download URL: envbox-0.1.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
852d1f3a1cc5560248cb80a8404f621fc3efb6f564cc05df3cfd63d4fc0667e7
|
|
| MD5 |
16695875dd934959470692a3333bb9c9
|
|
| BLAKE2b-256 |
64627dae96e579b95a15ce3044c25241b13ecde86aa3dad1181342feaed22305
|
File details
Details for the file envbox-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: envbox-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb37540dad1f0cfa98acc2428e45e6127416e4a858e062658891d0f12fa3dc36
|
|
| MD5 |
8799a3445612a450141a267581e80384
|
|
| BLAKE2b-256 |
ea182384d8cc559ab7c291cdfe155f1b7c0c486b9bac51c995c591f805d71835
|