Skip to main content

https://github.com/idlesign/envbox

LBC Python 2

release lic ci coverage

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

http://envbox.readthedocs.org/

Download files

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

Source Distribution

envbox-1.0.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

envbox-1.0.0-py2.py3-none-any.whl (11.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file envbox-1.0.0.tar.gz.

File metadata

  • Download URL: envbox-1.0.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for envbox-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1ec49f882ecd3a887e0ee0514354303fd0d6408ec4186c0cefb574970e7f7c07
MD5 f476f2d1b1b19f8cf36e8f2e13e8c0c3
BLAKE2b-256 2614e4a4ebe5a8e3b5718b3788fdb8e564336b76f41213c4f0af197e4ea68c37

See more details on using hashes here.

File details

Details for the file envbox-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: envbox-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for envbox-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6a7b3cfe9fbb86a6538c9959a40999d4053e46405d2e37cf47bc261eb31d3b00
MD5 464b2441cbfb038a4ffd3a7db7bf9d6e
BLAKE2b-256 73dbc18a716b9648d13a06c993ebc2a893f2ca293bd8572136db6d971fbc0b36

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.1

1 file

2.0.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

This release

1.0.0 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page