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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

integ_db-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file integ_db-0.1.1.tar.gz.

File metadata

  • Download URL: integ_db-0.1.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for integ_db-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b2dde2d0319bc87c9cf68000a07d8341505d07a48f0a42611e5cc932a91895dd
MD5 5256c280bbe6356d8570d34b13be9683
BLAKE2b-256 0170564d379b470ed57ef1b0d19b8f544ab503a15ed9e546e0ac3e247def10b6

See more details on using hashes here.

File details

Details for the file integ_db-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: integ_db-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for integ_db-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c29dea8915148380de65488260cd019c3ada247aae22cd8a442dd339cf23775
MD5 f17666b4de239cd36acf93b138654f4a
BLAKE2b-256 5f878b66afaee723997868677eccab344dc9306353555d68f97210311fcb5eae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page