Skip to main content

pypdm-db

mysql/sqlite 的 PDM 生成器


运行环境

安装说明

执行脚本:

python -m pip install --upgrade pip
python -m pip install pypdm-db

使用指引

示例代码可参考单元测试:

通过以下函数可生成对应数据库的连接对象:

  • from pypdm.dbc._sqlite import SqliteDBC
  • from pypdm.dbc._mysql import MysqlDBC

通过函数 from pypdm.builder import build 可生成指定数据表的 PDM 文件。

例如数据库中已有表 t_teachers ,会在指定的 package 目录生成两个代码文件:

其中 Bean 文件与表 t_teachers 的表结构一一对应, DAO 文件则封装了针对表 t_teachers 的增删改查函数。利用这两个文件,就可以方便地对表 t_teachers 进行操作。

Metadata

Release files for pypdm-db 1.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypdm-db 1.1.6
File Size Uploaded
pypdm_db-1.1.6.tar.gz 15.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pypdm-db 1.1.6
File Interpreter ABI Platform
pypdm_db-1.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 29.4 kB

Release files / pypdm_db-1.1.6.tar.gz

Download URL pypdm_db-1.1.6.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
208efdae1d5d03015afe3128c4eed18f04cc6a6d9488ebb44fcd7ee17b891a69
BLAKE2b-256 checksum
How to use checksums
d0d481dadb43c0fb64236e2a18013e40c046229f18f21c45758628b5d3f73f16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / pypdm_db-1.1.6-py3-none-any.whl

Download URL pypdm_db-1.1.6-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d06ed20ed5538729ee07bdb9791d19de38fc3b14db008f8fc6790b21f98efe77
BLAKE2b-256 checksum
How to use checksums
bf549a02efb3908e533fc09fd20b93e585a96447a39475e3774ee3c5bf0b8132
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release history Release notifications | RSS feed

This release

1.1.6 This release

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

1 release file

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