Stacked environment variable management system.
Project description
envstack
Stacked environment variable management system.
Environment variables are declared in namespaced .env files using yaml syntax.
The default namespace is stack
and variables are declared in stack.env
files.
Quickstart
To create a new environment stack, create a new namespaced .env file.
For example, here is a simple thing.env
file (namespace is "thing"):
all: &default
FOO: bar
To see the resolved environment for the thing
environment stack, run:
$ envstack thing
FOO 'bar'
Environment stacks are hierarchical, so values for $FOO
defined in .env files lower
in the filesystem (lower in scope) override those defined higher up (higher in scope):
/show/thing.env
/show/seq/thing.env
/show/seq/shot/thing.env
/show/seq/shot/task/thing.env
Variables can reference other variables defined elsewhere (but cannot be circular):
all: &default
BAR: $FOO
Variables can be platform specific (and inherit the defaults):
linux:
<<: *default
HELLO: world
Environment files can include other namespaced environments:
include: ['other']
Installation
The easiest way to install:
$ pip install envstack
Usage
To see the default resolved environment for any given scope (directory):
$ envstack
To see the resolved environment for a given namespace.
$ envstack <namespace> [OPTIONS]
To resolve a $VAR
declaration for a given namespace:
$ envstack <namespace> -r <VAR>
To trace where a $VAR
declaration is being set:
$ envstack <namespace> -t <VAR>
To see an environment stack on another platform:
$ envstack <namespace> -p <platform>
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
File details
Details for the file envstack-0.1.1.tar.gz
.
File metadata
- Download URL: envstack-0.1.1.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 187a0035e92195d18f5ad24a00e1d071a0d1490713d4b8069b67cdad31d8b422 |
|
MD5 | 754d656d5ee2017c301d65c9ea841e3d |
|
BLAKE2b-256 | 738c034a82e0b7d84d02e132373e52264291c0e403abb04bdd954df8f621ae77 |