# 26-北邮冲呀 **Repository Path**: openeuler2020/team-1068111676 ## Basic Information - **Project Name**: 26-北邮冲呀 - **Description**: 一个打十个 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-30 - **Last Updated**: 2021-04-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # py-opengauss #### 介绍 OpenGauss数据库的Python驱动,支持原生Sql、SqlAlchemy以及Django.db,具备完善的Python数据库驱动开发功能。 文档介绍:[py-opengauss](https://wjmcat.gitee.io/py-opengauss/index.html) py-opengauss具备以下特性: - [x] 支持[DB API specification](https://www.python.org/dev/peps/pep-0249/) - [x] 能够正常执行SQL语句。 - [x] 线程池特征能够支持线程安全和线程安全 - [x] Async 协程异步阻塞IO,提升应用程序性能 - [x] 将数据库字段对象转化成Python数据对象 - [ ] SSL 加密传输 #### 安装教程 1. 安装pypi包 ```shell pip install opengauss ``` #### 使用说明 1. 使用Sql ```python import opengauss # 连接数据库 conn = opengauss.connect("dbname=test user=opengauss") # 打开数据库相关操作的游标对象 cur = conn.cursor() # 执行一个查询 cur.execute("SELECT * FROM my_data") # 获取所有查询结果 records = cur.fetchall() ``` ## 可运行的Demo应用程序 1. Simple Examples 1. [./examples/1.simple-sql-op.py](./examples/1.simple-sql-op.py) 2. [./examples/2.oop-sql-op.py](./examples/2.oop-sql-op.py) 3. [./examples/3.async-application-sql-op.py](./examples/3.async-application-sql-op.py) 4. [./examples/4.thread-pool-sql-op.py](./examples/4.thread-pool-sql-op.py) 2. SQL CRUD Demo 1. [gitee project](./examples) 2. [B 站视频](https://www.bilibili.com/video/BV1G54y1b7g4/) 为了演示完整功能,我录制了视频来讲解其内容:[B-站-opengauss使用之python驱动](https://www.bilibili.com/video/BV1G54y1b7g4/) ## 项目功能说明书 > 为了更加良好的阅读体验,在此我将使用Gitee Page来展示 > 由于我没有这个repo的管理员权限,没有办法开启Gitee Page,所以我发布到我的另外一个repo当中了 请翻阅:[Gitee Pages py-opengauss](https://wjmcat.gitee.io/py-opengauss/index.html) ## 作者 - [@wj-Mcat](https://gitee.com/wjmcat) - Jingjing WU (吴京京) ## Copyright & License - Code & Docs © 2021 wjmcat - Code released under the Apache-2.0 License - Docs released under Creative Commons