Skip to main content

Environment handling to simplify development environments

Project description

MIT License LinkedIn


Logo

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

  1. Search for {prefix}_DB_SECRET_ID
  2. 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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Endurance Idehen - endurance.idehen@kungfu.ai

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

kungfuai-sql-chemistry-0.0.12.tar.gz (25.0 kB view hashes)

Uploaded Source

Built Distribution

kungfuai_sql_chemistry-0.0.12-py3-none-any.whl (10.0 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