I’m looking into options for a Python 3.6+ compatible database abstraction layer for NoSQL which supports Couchbase. There’s extensive support for SQL databases with the likes of SQLAlchemy and PonyORM, and MongoDB has some coverage in modules such as PyDAL (https://github.com/web2py/pydal), but does anyone know if there’s a project out there for Couchbase?
Any support would be greatly appreciated!
Hi, interesting question. We are primarily focused on providing efficient and standardised access to our libraries, but many of the other SDKs already support some level of ORM/POCO type mapping. It’s something we’d like to address further although there are a number of projects providing generic access layers for Couchbase Python Client, e.g.:
The usual disclaimer applies that these are not Couchbase approved or supported.
Looking at the respective ‘drivers’ in PyDAL, they seem to be pretty simple, so might be a nice starting point. I suspect there isn’t a huge amount of coverage for anything beyond basic KV operations in the rest, but I guess that should make it fairly simple to implement.
Would this be your preferred data access interface or are there others that attracted your attention?
Thanks for your reply.
From my research, there are not many non-Mongo database abstraction options out there and pyDAL seems to be the most full-fledged solution available. As such, that would be the preference to interface with Couchbase. I’ve submitted a feature request to the project.
I recognise that the use of a database abstraction layer potentially reduces the ability to leverage the full functionality of Couchbase as opposed to using the Python SDK directly. In case where this is needed, use of the SDK directly would be employed.
Would the same disclaimer regarding support or approval apply to a project such as pyDAL? Would the Couchbase development team consider contributing to pyDAL to open up opportunity to allow developers using pyDAL the flexibility to switch from Mongo to Couchbase?
Hi - thanks for adding the request to the PyDAL project. We’re busy working on a new version of the SDK due this month but I’ll be sure to pass this on to the product managers, and hopefully attempt a driver for it soon.
I’ve raised a JIRA for it here (although it might be moved to a separate project ultimately).