Environment handling to simplify development environments
Project description
KUNGFU.AI SQL Chemistry
Simplified Database Management on top of SQL Alchemy
Table of Contents
Built With
Getting Started
This repo aims to simplify the usage of Session, and connection management against Cloud Database Resources.
Dependencies
Python 3.8
Installation
pip install kungfuai-sql-chemistry
Database Registration
Simply create a database dictionary, and call the register_database
entrypoint.
def db_init():
database_map = {
"main": AwsDbConfig().detect_db_config("main")
}
register_databases(database_map)
Engine access
- Use this import to access all engines
from kfai_sql_chemistry.db.main import engines
- Use
AppSession().get_bind()
to access the connectable directly (likely an engine)
Configuration Identification
AwsDbConfig searches by the following convention
- Search for {prefix}_DB_SECRET_ID
- Search for {prefix}_DB_HOST / PORT / NAME / etc...
where prefix
is a name like "MAIN".
Check the examples in the repo for more information.
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Endurance Idehen - endurance.idehen@kungfu.ai
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
Built Distribution
File details
Details for the file kungfuai-sql-chemistry-0.0.12.tar.gz
.
File metadata
- Download URL: kungfuai-sql-chemistry-0.0.12.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 160045a65bd889e9d39a94d2a0778ffe5a552b50db8b7b1110f706ec3d67c106 |
|
MD5 | ab62aaf7ad3837d87d91074c85e519af |
|
BLAKE2b-256 | 24dc9576e1ea16c15e190b19bfc9544d635578e54b3f59eee41630f4766f3393 |
File details
Details for the file kungfuai_sql_chemistry-0.0.12-py3-none-any.whl
.
File metadata
- Download URL: kungfuai_sql_chemistry-0.0.12-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a31172a3016fff1c6703e9c497773c76e6146165f73924ec67086aaf2cf08e42 |
|
MD5 | 455906b5eb906d992b163b2fcdc4e1b8 |
|
BLAKE2b-256 | f2c29f3ea6af5f17a960f106f348336cba18ac052705c155af88674bfc951af0 |