Python interface to GBase 8s Database
Project description
python-gbase8sdb
python-gbase8sdb 是一个 [Python 编程语言][python] 扩展模块,允许 Python 程序连接到 GBase 8s 数据库。
该模块符合 [Python 数据库 API 2.0 规范][pep249],并且包含大量扩展和少数排除项。
安装
运行 python -m pip install gbase8sdb 安装。
依赖和互操作性
-
支持的 Python 版本:3.8 至 3.13 。
-
支持的 GBase 8s 数据库版本:GBase 8s V8.8_3.6.2版本及以上。
-
支持的操作系统:Linux x86_64、 Windows 64位操作系统 。
-
依赖 GSDK 1.1 版本。
使用说明
- gbase8sdb驱动连接数据库依赖GSDK,所以您需要联系GBase 8s技术支持或通过官方渠道获取相应版本的GSDK,并安装到您的机器上, 并设置如下环境变量:
- Linux系统:
GSDK_PATH=/path/to/gsdk
export LD_LIBRARY_PATH=${GSDK_PATH}/lib:$LD_LIBRARY_PATH
export GBASEDBTDIR=${GSDK_PATH}/lib
- Windows系统:
GSDK_PATH=\path\to\gsdk
set PATH=%GSDK_PATH%\lib;%PATH%
set GBASEDBTDIR=%GSDK_PATH%\lib
入门
在您的Python应用程序中,可以通过以下方式连接到数据库:
import gbase8sdb
# 生成dsn
dsn = gbase8sdb.makedsn(
server_name="ol_gbasedbt1210_2", # 数据库实例名称
db_name="testdbutf8", # 数据库名称
host="192.168.xxx.xxx", # 数据库实例所在服务器的IP地址或域名
port=9088, # 数据库实例的端口号
db_locale='zh_CN.utf8' # 数据库字符集
)
user = "gbasedbt" # 数据库用户名
password = "xxxxxx" # 数据库用户密码
# 连接数据库
conn = gbase8sdb.connect(dsn, user, password)
# 创建游标
cursor = conn.cursor()
# 执行SQL语句
cursor.execute("drop table if exists t")
cursor.execute("create table t (id int, name varchar(20))")
cursor.execute("insert into t values (?, ?)", (1, "zhangsan"))
cursor.execute("select * from t")
# 获取查询结果
print(cursor.fetchall())
# 关闭游标和连接
cursor.close()
conn.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gbase8sdb-0.2.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 361.9 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5d8d1529ca2d222579eecdff635c6cf73dd709fa29ab698065815ef7726eac3
|
|
| MD5 |
003c80caaaf747a0ec055992f940c97b
|
|
| BLAKE2b-256 |
6adb55403a0c1806f9e42f0f71b1d0a2879149c917ca5b668a276b655bf7e4b0
|
File details
Details for the file gbase8sdb-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9efd6927c0449c0878e0d31fdc65733092d8518ae61e66376e8f98b374acca0
|
|
| MD5 |
e398e01a940ca662b7e9d0265b8bd06c
|
|
| BLAKE2b-256 |
c10731ba59d03afc1427cf250b5b046699bd58a2ff06180050196347b1dfce31
|
File details
Details for the file gbase8sdb-0.2.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a103915a48971bd64692f59cc8ce1a526e843ce0840dec64a91ac164465ae60
|
|
| MD5 |
36881697d71e0a751b519c347eb99a0b
|
|
| BLAKE2b-256 |
5d800ae962da354f2043cdddf0375062aa647b2332bd3cd675b734e45a4146ca
|
File details
Details for the file gbase8sdb-0.2.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 361.1 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39e0106f9836003e870515b181ce8a360b06b5a96b621b1136baf34c27a26587
|
|
| MD5 |
845b565cff60195c64e3ee8b4b065414
|
|
| BLAKE2b-256 |
a16887502186a2ed7c97102427662a4e2a31d64001bacbf158595ca5dfee8c85
|
File details
Details for the file gbase8sdb-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa85d4bbb429850fc285393086d1916e559bb0a2e05b275524566f0eafb9ec01
|
|
| MD5 |
74301a61c963124330b9f69935672b20
|
|
| BLAKE2b-256 |
caa98d9e12af90b75898e8c8f6ca173e29686cdd578f41be44596e64f2440dd1
|
File details
Details for the file gbase8sdb-0.2.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ec7ac2f7dc69f29a806a72c7f834eb33ad1b3a1b3d33eb4b803e526f7f9c495
|
|
| MD5 |
e6d4410c6de40852a1af5dfd16f1783e
|
|
| BLAKE2b-256 |
4cea5f7bd758899eb909d65a46c7155123be6d34c784b30ebbe010e6d69db97d
|
File details
Details for the file gbase8sdb-0.2.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 368.1 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72a56f93d02df7e06e49e70e520f3d94fde8a96dd2faa0424ec567c13f2ab324
|
|
| MD5 |
d31ed32782d3fb59254d272af3f98c1c
|
|
| BLAKE2b-256 |
e6dfb68fade6df9652daa7fc4d35d55845c2aa7120e96ce967f37a9feec45b2d
|
File details
Details for the file gbase8sdb-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c120ed236e900f69558b368fccdcae3540c5fe6346dbf7ec37e348e53a665e9c
|
|
| MD5 |
9bb8c925ce1fcfb329cd80b51847ab48
|
|
| BLAKE2b-256 |
3d67ad3f944563e1deadca3e21f7c9209fd125e05c06ef6bdbea4bd6662aba55
|
File details
Details for the file gbase8sdb-0.2.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9974664a167046652377093a93edf341772471c02fae6588f2ff1486b4db66a9
|
|
| MD5 |
df084aa62b410e4650de7451c14b89a4
|
|
| BLAKE2b-256 |
bdae818f95d713d422ca9017e38f1bd5ef94db52e9268814b6c3e91fd8d6f078
|
File details
Details for the file gbase8sdb-0.2.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 367.9 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ba36d211b4f22d31c820a08b17ab7d4a2e6cc76bdc5d26cea4929781fd37cd4
|
|
| MD5 |
086d067104e227d89ada609a9c9ed036
|
|
| BLAKE2b-256 |
bbfa8f4bd520e045e7d489372ff43fad47d914665976803c93a36539dced6322
|
File details
Details for the file gbase8sdb-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a35232d68657e64cbe9b3b66311a001623ac60cc9db327ddd8acf9e15fbae45
|
|
| MD5 |
6f6aec597b320e714301db5edc5b5a7e
|
|
| BLAKE2b-256 |
ceecaaef196c588b5faae560b83b5eaa293e62151ae3bfa17c08794f3a3d36b0
|
File details
Details for the file gbase8sdb-0.2.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67c9a73e753931bdd8557a208b3d4fa3fecfe1dac330fb865f590b8cff97c07c
|
|
| MD5 |
9c898fd386d4c8ee7a2e5ba667cb4363
|
|
| BLAKE2b-256 |
fb0f0cbf75e9e51b4c0ebf7e8814e8d9ccc78cb86d4fa8fd79970c149d86e3df
|
File details
Details for the file gbase8sdb-0.2.1-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 395.7 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46ac356bd9d06ecdf0fc9978664f19deac5322a1ffae5e029a8ab588a888015d
|
|
| MD5 |
78d21ea0d9031d036ccf7a311d284f91
|
|
| BLAKE2b-256 |
4acf8aabc912c748f23ba9b9a1c8a4de655cfb217e6a8a739f43ac75d6241967
|
File details
Details for the file gbase8sdb-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ebcd62cc951397bf4b36a0b8af6d9041e767d839316c85dceee5c4c21b683b7
|
|
| MD5 |
880f78f89134fee5a1b6928684a5d11a
|
|
| BLAKE2b-256 |
828ccef9eaad8a5ad20a43186406f85b394c92a387e31da7c1b72a9a16a33b11
|
File details
Details for the file gbase8sdb-0.2.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
413440c46a3d78f737b3e9ac92100d6abc2a10d56ee4086ada41b50cb711f384
|
|
| MD5 |
6ea0077c06df2446e776b2c7dcc47247
|
|
| BLAKE2b-256 |
558faf1c6daed578ddfcbd05a2396b819bab1a3c833e2284eda2f03dde60f157
|
File details
Details for the file gbase8sdb-0.2.1-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 398.6 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
219395776c789022f4f1be56fcc218716fc367adddb5f1388902f751d0f60895
|
|
| MD5 |
ec6cb537bba399c5714eda60aaa77977
|
|
| BLAKE2b-256 |
202cc0faa2f79339d81e8ca0be009615adbc76737236806ca644d3f2c9dca221
|
File details
Details for the file gbase8sdb-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a698707e0bdc9097b430d0a705c37f9d8bb93bf2143cf920e9e074e324f0957
|
|
| MD5 |
5dea79112a2783029a03932c178ab175
|
|
| BLAKE2b-256 |
e347a661fcb566c8747df4a0ba923c62c7383bd102712498b36bdc32e7abfc1a
|
File details
Details for the file gbase8sdb-0.2.1-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9c4bfd9afd8859c9558134477443a563c008a58125777b9f2f063a0a960d748
|
|
| MD5 |
0b04cd65107cadb67887643cd0c690e7
|
|
| BLAKE2b-256 |
70718c641c3719c3f5c130ab6fc664668e0132db90cf3a145baf32292b1c9778
|
File details
Details for the file gbase8sdb-0.2.1-cp27-cp27mu-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: gbase8sdb-0.2.1-cp27-cp27mu-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 984.4 kB
- Tags: CPython 2.7mu, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
603dc466fa88108b84132c789ebcf11c4160f69f29436c13446389c8ef91eec9
|
|
| MD5 |
f5bad98945902802822c0d9c3776dd6f
|
|
| BLAKE2b-256 |
52c0f8aaad4a8a476c688a0f16a75253a3170847177b75f82670eef027504c77
|