dmpython-jdbc
macOS 上的达梦 dmPython 兼容层。官方驱动没有 macOS 版,这里用 JayDeBeApi + 达梦 JDBC 实现 DBAPI 子集,让 dmSQLAlchemy 的 dm+dmPython:// 方言能在本机跑起来。
发行名是 dmpython-jdbc,import 名仍是 dmPython。 业务代码不用改。
- macOS:使用本包的 JDBC shim
- 其它平台:把
import dmPython转发给已安装的官方驱动
安装
PyPI:
pip install dmpython-jdbc
跨平台项目(Linux/Windows 用官方驱动,macOS 用本包):
[project]
dependencies = [
"dmpython>=2.5.32; sys_platform != 'darwin'",
"dmpython-jdbc>=2.5.32; sys_platform == 'darwin'",
]
从 GitHub 安装:
pip install "dmpython-jdbc @ git+https://github.com/Darley-Wey/dmpython-jdbc.git"
uv:
[tool.uv.sources]
dmpython-jdbc = { git = "https://github.com/Darley-Wey/dmpython-jdbc.git" }
需要钉到某个提交或 tag 时,在 URL 后加 @<ref>,例如 @main 或 @v2.5.32。
运行依赖
- Python >= 3.12
- JDK(macOS 可用
brew install openjdk)。JAVA_HOME会自动探测/opt/homebrew/opt/openjdk和/usr/local/opt/openjdk - 达梦 JDBC 驱动已打包进 wheel;也可用环境变量
DM_JDBC_JAR覆盖
限制
不支持存储过程出参(cursor.var)、LOB 流式读写等高级特性,覆盖 ORM CRUD 即可。
许可证
Python 兼容层使用 MIT。仓库中的 DmJdbcDriver18-*.jar 是达梦官方 JDBC 驱动,版权归达梦数据库所有,不受 MIT 覆盖。
Metadata
Release files for dmpython-jdbc 2.5.32
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dmpython_jdbc-2.5.32.tar.gz | 1.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dmpython_jdbc-2.5.32-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.7 MB
Release files / dmpython_jdbc-2.5.32.tar.gz
| Download URL | dmpython_jdbc-2.5.32.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75b36f6bacfd8821cd671b1e6a03b1db168e2c8f947b5cd222caa3ffba261763
|
|
BLAKE2b-256 checksum How to use checksums |
ddf352bdda127a506f300ef5e6e1117a481ec19b456d78bbd97f6fb29a43c1b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / dmpython_jdbc-2.5.32-py3-none-any.whl
| Download URL | dmpython_jdbc-2.5.32-py3-none-any.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a88b41f5868172af85769a4a5f78389511f2d1169cc4eba5ddc9b2980889a5f0
|
|
BLAKE2b-256 checksum How to use checksums |
453ee84e043ceb4744616b4dd29ce5c780aa09c3df4151c29bc0d0491ea6e858
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency log