简体   繁体   中英

Python ORM for MS-Access

I need to use a Python ORM with a MS-Access database (in Windows). My first searches are not really succesfull :

  • SQLAlchemy : no MS Access support in the two last versions.
  • DAL from Web2Py : no Access (??)
  • Storm : no MS Access
  • sqlobject: no MS Access
  • dejavu : seems OK for MS Access but is the project alive ?

Any ideas or informations are welcome ...

Web2py recently updated their DAL making it much easier to add support for new db engines. I don't believe there is currently native Jet (MS Access) support, but the existing SQL Server support could probably be modified without much effort to provide MS Access support. The latest version of the web2py DAL is a single stand-alone .py file, so it's not a "heavy" package.

For what it's worth, I've successfully used the web2py DAL as a stand-alone module with SQL Server after initially trying and giving up on SQLAlchemy. In fairness to SQLAlchemy, I had used the web2py DAL as part of the framework and was already comfortable with it.

Since Sep 2019 there is a Microsoft Access dialect for SQLAlchemy, called sqlalchemy-access . It uses the package pyodbc .

Installation:

pip install pyodbc sqlalchemy sqlalchemy-access

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM