MBQ Env
Project description
Installation
$ pip install mbq.env
🚀✨
Guaranteed fresh.
Getting started
$ env
...
MY_VAR=bacon
MY_INT_VAR=123
MY_BOOL_VAR=1
MY_CSV_VAR=a,b,c
MY_TOKEN_VAR=a b c
MY_KEY_VAR=-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----
...
In [1]: from mbq import env
In [2]: env.get('MY_VAR', default='BACON')
Out[2]: 'bacon'
In [3]: env.get_int('MY_INT_VAR', default=12)
Out[3]: 123
In [4]: env.get_bool('MY_BOOL_VAR', default=False)
Out[4]: True
In [5]: env.get_csv('MY_CSV_VAR', default=['abc', '123'])
Out[5]: ['a', 'b', 'c']
In [6]: env.get_tokens('MY_TOKEN_VAR', default=['abc', '123'])
Out[6]: ['a', 'b', 'c']
In [7]: env.get_key('CERTIFICATE', 'MY_KEY_VAR')
Out[7]: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----'
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
mbq.env-2.0.1.tar.gz
(8.2 kB
view details)
File details
Details for the file mbq.env-2.0.1.tar.gz
.
File metadata
- Download URL: mbq.env-2.0.1.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0741ff42faea3e57ff76bb16d1ba22aff653174e2059a03d8425885d450ec1d2 |
|
MD5 | fdac3f2d7ede99814d599c2c54b4ea43 |
|
BLAKE2b-256 | 7ca43747942554f6a65ddc48c4343ffc343de4bc22aabd667904c4aa52f1652e |