Metadata-Version: 2.1
Name: ohmylamb
Version: 0.0.4
Summary: A simple library to use AWS resources. And speedup development for lambda projects.
Home-page: https://gitlab.com/rewatiraman/ohmylamb/
Author: Rewati Raman
Author-email: rewati.raman@allergan.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.7
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: snowflake-connector-python
Requires-Dist: boto3
Requires-Dist: pandas

***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.



