dmPython-pure
纯 Python 实现的达梦 DM8 数据库驱动接口(dmPython),可直接配合 SQLAlchemy 使用。
底层为 dm-pure(纯 Python 达梦驱动),零 native 依赖。
安装
pip install dmPython-pure
源码版 wheel(
py3-none-any),任何 Python 3.8+ 通用,不区分版本/平台。
配合 SQLAlchemy 使用
from sqlalchemy import create_engine
engine = create_engine("dm+dmPython://SYSDBA:password@127.0.0.1:5236/")
直接使用
import dmPython
conn = dmPython.connect(host="127.0.0.1", port=5236, user="SYSDBA", password="...")
cur = conn.cursor()
cur.execute("SELECT id, name FROM t WHERE id = ?", [1])
print(cur.fetchall())
conn.close()
连接参数
dmPython.connect() 支持:host / port / user / password / autoCommit / local_code / connection_timeout 等,与官方 dmPython 一致。
相关项目
- 源码仓库:https://github.com/zhangtao103239/dm8_python_pure(本包位于
shim/目录) - 底层驱动:https://pypi.org/project/dm-pure/
- Rust 驱动:https://crates.io/crates/dm-pure
- CLI 工具:https://crates.io/crates/dm-pure-cli
MIT License。
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
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 dmpython_pure-1.0.2-py3-none-any.whl.
File metadata
- Download URL: dmpython_pure-1.0.2-py3-none-any.whl
- Upload date:
- Size: 43.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb8de9e3b3cfb668cec5beee69d6380aacc3be0f1a53e073954c965d7167e041
|
|
| MD5 |
243f89ab6c2cb3dde6e01c1ee079d3a7
|
|
| BLAKE2b-256 |
3ca27a7c186731d930543ebb7b275dd3726ca6b9f0ff457f7a63f359ec724103
|