随笔分类 -  SQLAlchemy

摘要:sqlacodegen --noviews --noconstraints --noindexes --outfile d:\\models.py mysql://root:123.com@localhost/firewalldev 阅读全文
posted @ 2018-04-13 09:29 丫丫625202 阅读(249) 评论(0) 推荐(0)
摘要:MySQL-Python pymysql MySQL-Connector 阅读全文
posted @ 2018-04-03 10:06 丫丫625202 阅读(117) 评论(0) 推荐(0)
摘要:sqlacodegen只支持Python2.x https://pypi.python.org/packages/27/06/596ae3afeefc0cda5840036c42920222cb8136c101ec0f453f2e36df12a0/MySQL python 1.2.5.win32 p 阅读全文
posted @ 2018-03-30 10:36 丫丫625202 阅读(213) 评论(0) 推荐(0)
摘要:数据增加#实例话User对象user = User(name='Huangy',fullname='Huangya', password='123.com')#在会话中添加新实例session.add(user)#提交到数据库session.commit()数据回滚session.rollback()数据查询 阅读全文
posted @ 2018-02-06 11:43 丫丫625202 阅读(85) 评论(0) 推荐(0)
摘要:SQLAlchemy版本信息检查import sqlalchemyprint(sqlalchemy.__version__)数据库链接创建enginefrom sqlalchemy import create_engineengin=create_engine("dialect+driver://username:password@host:port/database")数据库URL支持Postg... 阅读全文
posted @ 2018-02-02 18:49 丫丫625202 阅读(172) 评论(0) 推荐(0)