Skip to main content

Call child process with custom environment

Project description

envfrom

Kubernetes Secrets or ConfigMap are commonly used to run apps deployed in pods.

But what about running this app locally with those same variables ? envfrom meet this need among others like envdir or .env.

Installation

pip install envfrom

Usage

usage: envfrom [-h] {cli,dir,dotenv,kube,vault} ... child

Call child process with custom environment

positional arguments:
  {cli,dir,kube,vault}  env source
    cli                 Dict values: FOO=BAR BAR=FOO
    dir                 Set environment according to files in a specified path
  dotenv              Set environment according to .env file
    kube                Mirror specified kubernetes ressource volume keys (decoded)
    vault               Fetch secrets from Vault paths
  child                 child process

optional arguments:
    -h, --help            show this help message and exit

Kubernetes secrets example

Assuming that you already have the following secret created on your default namespace :

apiVersion: v1
kind: Secret
metadata:
  name: mysecret
type: Opaque
data:
  username: YWRtaW4=

Running :

env -i envfrom kube secrets mysecret env

Should output :

username=admin

Project details


Download files

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

Source Distribution

envfrom-0.2.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

envfrom-0.2.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file envfrom-0.2.0.tar.gz.

File metadata

  • Download URL: envfrom-0.2.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for envfrom-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4dbd2ea0a3534690f6952ddf331bdb81f1f028142aa0367d262b3b64739588b2
MD5 044f33765b5e12af3e52cd355fc1c767
BLAKE2b-256 a5d8f67b3f9638b9a04f409fdde039080ee5d5cda2450e925c752cc3d4d887a0

See more details on using hashes here.

File details

Details for the file envfrom-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: envfrom-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for envfrom-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a2b5f857af81bea493c367bab5bd8f6ce3a3f7e7920a19658a58d9985274200
MD5 b8a6c5ea30862a54a17d0ee5211c7060
BLAKE2b-256 d3b1efba8636310b5984a0e213a6d78669cd0f403657c17e8a0d7140c745e9fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page