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.2.0.tar.gz (17.3 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.2.0-py2.py3-none-any.whl (10.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for envbox-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2692536c64adfe7d6b05643478db13bec9b6573fbf34d20c5c9d6af27e2972c7
MD5 807e76bd9b09166f0c8d40ee8ef072c2
BLAKE2b-256 706d446e4b1e2a0a527b521066cc84af8b6d28cad17665738cccea86c64c0274

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for envbox-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 446d7f5fa88a18275e3e33c29f2cb198635765d31c3aedd43e8f5a6b8a0b7ae8
MD5 802793be956b0b27a09c715dee877a51
BLAKE2b-256 8ff8cf7194f7d06788fef11b750da2725c3c8f2ceb4eb4e8b37b3eaa64963afc

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

This release

1.2.0 This release

2 files

1.1.0

2 files

1.0.0

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