Is there a lightweight database wrapper in Python that I can use for SQLite. I would like something like Django's ORM, but that I can just point to a database file and it'll make the required API for me (i.e handle all the CRUD).
APSW is a Python wrapper for the SQLite embedded relational database engine. It focuses translating between the complete SQLite C API and Python's C API. It is recommended to use the builtin sqlite3 module, unless you want SQLite specific functionality.
SQLite3 can be integrated with Python using sqlite3 module, which was written by Gerhard Haring. It provides an SQL interface compliant with the DB-API 2.0 specification described by PEP 249. You do not need to install this module separately because it is shipped by default along with Python version 2.5.
The default build is less than a megabyte of code and requires only a few megabytes of memory. With some adjustments, both the library size and memory use can be significantly reduced. Transactional. SQLite transactions are fully ACID-compliant, allowing safe access from multiple processes or threads.
There is no 2 GB limit. SQLite database files have a maximum size of about 140 TB. On a phone, the size of the storage (a few GB) will limit your database file size, while the memory size will limit how much data you can retrieve from a query. Furthermore, Android cursors have a limit of 1 MB for the results.
Yeah, SQLAlchemy is great, but there are also other options. One of them is Peewee. Very lightweight and it may fits perfectly with what you are looking for.
https://github.com/coleifer/peewee
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With