dm-pure:纯 Python 达梦 DM8 数据库驱动
零 native 依赖、100% Python 实现的达梦 DM8 数据库驱动,适合无编译环境的机器。
源码版 wheel(py3-none-any),任何 Python 3.8+ 通用。
功能
参数化查询(含 NULL)/ 中文(自动检测服务器编码)/ 大结果集分批 fetch / CLOB·BLOB / 事务 / 存储过程 / 批量插入 executemany / 连接池 / DB-API 2.0 兼容层。
安装
pip install dm-pure
零依赖:加密(DES/AES/RC4)内置纯 Python 实现;若安装 pycryptodome 会自动优先使用(性能更优)。
快速上手
from dmpy import DMClient
c = DMClient("127.0.0.1", 5236, "SYSDBA", "password") # 自动检测服务器字符集
c.connect()
c.execute("SELECT id, name FROM t WHERE id = ?", [1]) # → (cols, rows)
c.execute("INSERT INTO t VALUES (?, ?)", [1, "x"]) # → (None, 影响行数)
c.close()
DB-API 2.0(sqlite3/pymysql 风格)
import dmpy.dbapi as dm
conn = dm.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()
SQLAlchemy 集成:请使用 dmPython-pure(shim 兼容层), 它内置 SQLAlchemy 方言
sqlalchemy.dialects:dm,可直接create_engine("dm://...")。 本包(dm-pure)保持纯核心驱动,不捆绑 API 适配层。
环境要求
- Python >= 3.8
- 可达的达梦 DM8 服务器(TCP 5236 端口)
开源协议
Metadata
Release files for dm-pure 1.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dm_pure-1.3.5-py3-none-any.whl | Python 3 | none | any | Details |
Release files / dm_pure-1.3.5-py3-none-any.whl
| Download URL | dm_pure-1.3.5-py3-none-any.whl |
|---|---|
| Size | 42.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42330227b139e332d28e6035f4d3f1f658c573f07c196ae465ab9ca3439761b7
|
|
BLAKE2b-256 checksum How to use checksums |
9e3e903b6393ab48db0d22279d4bd1efa07d410de7b2d5ae52e4288417b507f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for dm-pure 1.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.