Skip to content

Zheaoli/sqlalchemy-tidb

 
 

Repository files navigation

sqlalchemy-tidb

.github/workflows/ci.yml

This adds compatibility for TiDB to SQLAlchemy.

Supported versions

  • TiDB 4.x and newer
  • SQLAlchemy 1.4.x
  • Python 3.6 and newer

Installation

pip install git+https://github.com/pingcap/sqlalchemy-tidb.git@main

Getting Started

In your Python app, you can connect to the database via:

from sqlalchemy import create_engine
engine = create_engine("tidb://username:password@ip:port/database_name?charset=utf8mb4")

testing

You can run the tests using the following command:

tox

Known issues

  • TiDB does not support FOREIGN KEY constraints(#18209).
  • TiDB does not support SAVEPOINT(#6840).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.9%
  • Shell 1.5%
  • Other 1.6%