Sesam microservice utils
Project description
SesamUtils
Python module to simplify common tasks when developing microservices for the Sesam integration platform.
Usage examples
Environment Variables
from sesamutils import VariablesConfig
required_env_vars = ["username", "password", "hostname"]
optional_env_vars = ["debug", ("auth_type", "user")] # Default values can be given to optional environment variables by the use of tuples
config = VariablesConfig(required_env_vars, optional_env_vars=optional_env_vars)
if not config.validate():
sys.exit(1)
print(config.username)
Dotdictify
from sesamutils import Dotdictify
example_dict = {
"test": {
"my_thing": "hello"
}
}
dot_dict = Dotdictify(example_dict)
print(dot_dict.test.my_thing)
# hello
Installation
pip install sesamutils
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
sesamutils-0.1.3.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for sesamutils-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f827ddc76d51970999e6c986b9f39c61534c3107b6eb1330e19132735510e50 |
|
MD5 | 072c7da29eab7de5d124c28d7bae32f6 |
|
BLAKE2b-256 | 421279e2fc69ff15c6e09e8edd23c044e5beade95ba2307550680eece6b174a2 |