Metadata-Version: 2.4
Name: dmPython-pure
Version: 1.0.5
Summary: dmPython 兼容层（纯 Python）：包装 dm-pure 纯 Python 达梦驱动，供 dmSQLAlchemy 等依赖官方 dmPython 的库零修改使用
Author-email: zhangtao <zhangtao103239@163.com>
License: MIT
Project-URL: Homepage, https://github.com/zhangtao103239/dm8_python_pure/tree/main/shim
Project-URL: Repository, https://github.com/zhangtao103239/dm8_python_pure
Project-URL: Documentation, https://github.com/zhangtao103239/dm8_python_pure#readme
Project-URL: Bug Tracker, https://github.com/zhangtao103239/dm8_python_pure/issues
Keywords: dameng,dm8,dmPython,sqlalchemy,database,纯Python
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Topic :: Database
Classifier: Topic :: Database :: Front-Ends
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: sqlalchemy
Requires-Dist: SQLAlchemy>=1.4; extra == "sqlalchemy"

# dmPython-pure

纯 Python 实现的达梦 DM8 数据库驱动接口（`dmPython`），可直接配合 SQLAlchemy 使用。
底层为 [dm-pure](https://pypi.org/project/dm-pure/)（纯 Python 达梦驱动），零 native 依赖。

## 安装

```bash
pip install dmPython-pure
```

源码版 wheel（`py3-none-any`），任何 Python 3.8+ 通用。

## 配合 SQLAlchemy 使用

```python
from sqlalchemy import create_engine

engine = create_engine("dm+dmPython://SYSDBA:password@127.0.0.1:5236/")
```

## 直接使用

```python
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 一致。

## 开源协议

MIT License。源码：https://github.com/zhangtao103239/dm8_python_pure/tree/main/shim
