Skip to main content

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:
    >>> 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'}) 
    
    For this to work user running above code should have access to the secret manager key.

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)

Uploaded Source

Built Distribution

ohmylamb-0.0.4-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

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