Skip to main content

dm-pure:纯 Python 达梦 DM8 数据库驱动

PyPI version PyPI - Python License

零 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()

环境要求

  • Python >= 3.8
  • 可达的达梦 DM8 服务器(TCP 5236 端口)

开源协议

MIT。源码:https://github.com/zhangtao103239/dm8_python_pure

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

If you're not sure about the file name format, learn more about wheel file names.

dm_pure-1.2.2-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file dm_pure-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: dm_pure-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 41.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for dm_pure-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d6555bc1372599c90f75d2857f6bf6a092bc55b59feacb3e091568591b24d415
MD5 dec8b0f15d5d8e9b14de6c6d04217e18
BLAKE2b-256 a3ab5fc794704b3f77a83e0924d9dbcaca75d5a04396d8fa2214c73390e92f13

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.5

1 file

1.3.4

1 file

1.3.3

1 file

1.3.2

1 file

1.3.1

1 file

1.3.0

1 file

This release

1.2.2 This release

1 file

1.2.1

1 file

1.2.0

5 files

1.1.0

5 files

1.0.2

5 files

1.0.1

5 files

1.0.0

5 files

0.1.5

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page