GBase 8s开发与管理 - 使用sqlalchemy-gbasedbt连接GBase 8s数据库 的评论
type: channel
link: https://www.gbasedbt.com/index.php/archives/450/
description: 测试环境：操作系统：CentOS 7.9 64-bit数据库版本：GBase8sV8.8_AEE_3.0.0_1，对应的CSDK版本为3.0.0_11，确认安装python3确认已经安装pyth...
items: liaosnet
items: 川普
items: lv

liaosnet
type: item
date: 2025-11-17T17:41:18+08:00
description: 上面的那个错误，明显的python版本号是3.10

川普
type: item
date: 2025-11-10T14:14:16+08:00
description: 什么叫python版本太高，就是跟着你的文章建的虚拟环境，python==3.6.8

liaosnet
type: item
date: 2025-08-07T10:44:18+08:00
description: https://dl.gbase8s.com:9088/GSDK%20%28L3%29/GSDK_3.6.3_3_1.1.0_1P20250403_b793cf_RHEL6_x86_64.tar

lv
type: item
date: 2025-08-07T10:39:47+08:00
description: 您好 GSDK可以提供一下吗

liaosnet
type: item
date: 2025-08-07T10:23:37+08:00
description: 参考：https://gbasedbt.com/index.php/archives/692/

lv
type: item
date: 2025-08-07T09:47:06+08:00
description: py312能不能使用gbase-connector-python进行数据库连接，如果不行的话，推荐使用哪种方法

lv
type: item
date: 2025-08-07T09:12:21+08:00
description: 我使用python3.12.10时，连接gabse8s V8.8该使用哪种连接方式，最好还能兼容sqlalchemy

liaosnet
type: item
date: 2025-08-07T09:06:45+08:00
description: 还不支持py3.12。 如果你的数据库是363,可以使用gbase8s-sqlalchemy(依赖gbase8sdb,sqlalchemy~=2.0.0).

liaosnet
type: item
date: 2025-08-07T09:00:49+08:00
description: sqlalchemy-gbasedbt依赖的dbtpy暂时仅支持到3.7，故还不支持py3.12。

lv
type: item
date: 2025-08-06T09:47:11+08:00
description: 连接信息 from sqlalchemy import create_engine from contextlib import contextmanager from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy.dialects import registry from config.finalparam import FinalParamfrom utils.Loging import LOGGINGfrom utils.common import get_yaml registry.register("gbasedbt", "sqlalchemy_gbasedbt.dbtdb", "GBasedbtDialect") # DATABASE_CONFIG_YML = "../config/gw_database_config.yaml" DATABASE_CONFIG_YML = "../config/database_config.yaml" DATABASE_CONFIG_YML = FinalParam.DATABASE_CONFIG_YML cfg = get_yaml(DATABASE_CONFIG_YML) # print(type(cfg)) host = cfg['host'] port = cfg['port'] user = cfg['user'] password = cfg['password'] database = cfg['database'] Base = declarative_base() engine = create_engine( "gbasedbt://%s:%s@%s:%s/%s" % (user, password, host, port, database)+";SERVER=gbase01;DB_LOCALE=zh_CN.utf8;CLIENT_LOCALE=zh_CN.utf8;DELIMIDENT=y", # encoding='utf-8', # echo=True, # SQL 语句及其参数到控制台 pool_pre_ping=True, # 检测断开连接 pool_recycle=1800, # 每30分钟重新创建连接，避免超时 pool_size=3, # 连接池中最多可以保持的连接数 max_overflow=4, # 允许在需要时，连接池外再创建最多 4 个额外的连接，超出连接池大小的部分会在使用后关闭 # pool_recycle=7200, # 表示连接在 7200 秒（2 小时）后会被回收，避免因长时间连接而导致的问题（例如，MySQL 的“互动超时”） # pool_timeout=30 # 连接池的超时时间，表示如果在 30 秒内没有获取到可用的连接，将会抛出异常 )Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) 报错信息 File "/work/audioTrace_screenCorrect0605-kylin/dao/screen_correct_mapper.py", line 2, in from dao.databaseConnector import Connector File "/work/audioTrace_screenCorrect0605-kylin/dao/databaseConnector.py", line 23, in engine = create_engine( ^^^^^^^^^^^^^^ File "", line 2, in create_engine File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/deprecations.py", line 375, in warned return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 518, in create_engine entrypoint = u._get_entrypoint() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/sit…