python - 从现有数据库编码生成 python 的工具?

标签 python mysql postgresql code-generation

请原谅我的无知,我是 Python 开发新手。

是否有工具可以从现有数据库(例如 mySQL、Postgresql)创建 Python 代码

例如,如果我设计了一个内部包含示例数据的数据库(我在数据库中建立了表、函数和数据),是否有任何代码生成器工具可以帮助我生成一些 python 代码(例如类/实体等)

最佳答案

听起来你在描述 Object-relational mapping (ORM)。一种流行的 Python ORM 是 SQLAlchemy .

关于python - 从现有数据库编码生成 python 的工具?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8071632/

相关文章:

python - TensorFlow 自定义估计器在训练后调用评估时卡住

MYSQL 查询 : All records where user=jack from table `B` must be returned with the corresponding color matching `photo_id`

python - 在 postgresql django 中查询 JSONField 的另一种方法

java - PostgreSQL & JDBC 使用 `setArray` 设置整数数组抛出异常 "cannot cast type integer[] to integer"

python - 如何在 Python 脚本中运行另一个 Python 脚本?

Python:更快的正则表达式替换

Python 总结器 Sumy

c# - 如何在 MySQL 中舍入 DateTime?

mysql - 查询中存在冗余数据

sql - 根据连接表中的多次出现从数据库中选择