A simple library to use AWS resources. And speedup development for lambda projects.
Project description
To install
pip install ohmylamb
To Configure
To configure define team name, application name and environment name in app.ini file.
echo "[app]" >> app.ini
echo "name = adl-common-pytools" >> app.ini
echo "team = adl-dse" >> app.ini
echo "env = dev" >> app.ini
To import into code add following
from ohmylamb import ohmylamb as oml
Configuration handling Configuration management has been split into two areas.
- Application configuration. This comes from aap.ini file. This configuration can be accessed using following code.
>>> oml.app_configuration("team") 'adl-dse'
- Infrastructure resources configurations. This comes from aws secret manager. In secret manager resource configuration are stored as key value pair under a key. Key convention: {team}/{env}/{resourcename}. Now team and env come from application configuration. And resource is the name of resource. Example:
For this to work user running above code should have access to the secret manager key.>>> oml.app_resource_conf("snowflake") (None, {'url': 'agn_com_ci_us.us-east-1.snowflakecomputing.com', 'username': '******', 'password': '*****', 'account': 'agn_com_ci_us', 'account_region': 'us-east-1', 'adm_warehouse_db_schema': 'AES_ELT_WH_DEV:::AES_DW_DEV:::ADL', 'bd_warehouse_db_schema': 'AES_ELT_WH_DEV:::AES_DW:::BD'})
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
ohmylamb-0.0.4.tar.gz
(3.6 kB
view hashes)