Skip to content

vimiix/sqlalchemy

 
 

Repository files navigation

SQLAlchemy

PyPI PyPI - Python Version PyPI - Downloads

The Python SQL Toolkit and Object Relational Mapper

Introduction

本仓库是基于 sqlalchemy commit fb81f9c 基础上进行修改,主要新增两个特性:

  1. 新增 py_opengauss 驱动支持(需安装 pip install py-opengauss==1.3.6
  2. openGauss 数据库支持多主机连接,自动选主库

Usage

这里单独演示 opengauss 数据库多主机连接方式用法:

  1. 检查 py-opengauss 是否安装以及版本大于1.3.6 :

    $ pip list | grep py-opengauss
    py-opengauss  1.3.6
  2. 使用 sqlalchemy 创建连接 :

    from sqlalchemy import create_engine
    # 初始化数据库连接:
    engine = create_engine('postgresql+pyopengauss://user:password@host1:port1,host2:port2/db')

Documentation

Latest documentation is at:

https://www.sqlalchemy.org/docs/

Installation / Requirements

Full documentation for installation is at Installation.

Getting Help / Development / Bug reporting

Please refer to the SQLAlchemy Community Guide.

Code of Conduct

Above all, SQLAlchemy places great emphasis on polite, thoughtful, and constructive communication between users and developers. Please see our current Code of Conduct at Code of Conduct.

License

SQLAlchemy is distributed under the MIT license.

About

The Database Toolkit for Python

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.6%
  • C 0.4%