教程: https://muxuezi.github.io/posts/sqlalchemy-introduce.html
官网文档: http://docs.sqlalchemy.org/en/rel_1_1/
引擎
engine=create_engine('mysql+mysqlconnector://root:123456@127.0.0.1:3306/test')
engine = create_engine('mysql+mysqlconnector://scott:tiger@localhost/foo')
mysql + mysqlconnector :// < user > :< password > @ < host > [:< port > ] / < dbname >
链接: http://docs.sqlalchemy.org/en/rel_1_1/dialects/mysql.html#module-sqlalchemy.dialects.mysql.mysqlconnector
是否需要新声明模型,不需要,直接重数据库生成
链接: http://docs.sqlalchemy.org/en/latest/core/reflection.html
Reflecting Database Objects 反映数据库对象
网友评论