文件名称:SQLAlchemy-Example:使用SQLAlchemy很棒的工具的python orm示例
文件大小:7KB
文件格式:ZIP
更新时间:2024-06-05 23:43:47
Python
SQLAlchemy示例 引擎API -创建与数据库的连接-发送SQL语句-检索结果参见test_engine.py:- from sqlalchemy.engine import create_engine #create connections to the database engine = create_engine('mysql://user:pass@host/db') #for sqlite #engine = create_engine('sqlite:///:memory:', echo=True) connection = engine.connect() # send SQL statements connection.execute( """ CREATE TABLE employees ( id INT AUTO_INCREME
【文件预览】:
SQLAlchemy-Example-master
----test_session.py(390B)
----test_engine.py(756B)
----README.md(9KB)
----sqlexpression_insert.py(648B)
----use_session(1KB)
----test_metadata.py(716B)
----sqlexpression_updating.py(271B)
----model.py(2KB)
----sqlexpression_selecting.py(626B)
----sqlexpression_deleting.py(237B)