Skip to main content

This package Integrated Database library

Project description

integdb

This package Integrated Database library, based on PyMySQL, pymssql, mariadb, SQLAlchemy.

Requirements

  • MySQL
  • MSSQL(SQL Server)
  • MariaDB

Controller Object

  • MySQL
  • MariaDB
  • MSSQL
  • SQLAlchemy

Object that provides a pool

  • MySQL
  • MariaDB

Special Feature

  • The SQLAlchemy sql_export(to_sql) function support duplicate keys

Install

From PIP

pip install integ-db

Example

from integdb import Controller

host = "localhost"
user = "usrname"
password = "password"
port = 3306
schema = "database_name"
controller = Controller(
                    host=host,
                    user=user,
                    password=password,
                    port=port,
                    schema=schema,
                    connection_pool=False)
try:
    controller.MySQL.connect()
    sql_context = "SELECT * FROM TEST_DB"
    rows = controller.MySQL.sql_executer(sql_context)
    print (rows)
except Exception as e:
    print (e)
finally:
    controller.MySQL.close()

Reference

  1. duplicate SQLAlchemy Github : https://gist.github.com/tombohub/0c666583c48c1686c736ae2eb76cb2ea

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

integ_db-0.1.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

integ_db-0.1.1-py3-none-any.whl (7.1 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