pythonsqlalchemycloudant

Using IBM Cloudant with SQLAlchemy


I am trying to connect to my free IBM Cloudant instance using SQLAlchemy but I'm unsure of the notation and I keep getting errors.

I've tried the following but it returns the error sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:cloudant.

engine = create_engine(f"cloudant:///?User={USER}&; Password={PASSWORD}", echo=True)

Any advice will be appreciated.


Solution

  • SQLAlchemy does not have built-in support either for IBM Cloudant itself, or for the CouchDB platform on which it is based. The list of external dialects for SQLAlchemy also makes no mention of either database. So it appears that there is no "officially recognized" dialect for IBM Cloudant at the moment.

    That said, a web search for "sqlalchemy cloudant" did find this:

    https://www.cdata.com/kb/tech/cloudant-python-sqlalchemy.rst

    (The above link is for information purposes only. It is not an endorsement.)