So, Django doesn't support abstraction for NOSQL databases. In fact, it has an internal Object Relation Mapper (ORM) library to interpret objects in real code an SQL database.
What you would need is an Object Data Mapper (ODM), as NOSQL databases are composed of raw data, like MongoDB which is document based.
In my experience, a few months ago I used this python library (https://github.com/MatteoGuadrini/nosqlapi - https://nosqlapi.readthedocs.io/en/latest/) to build my library with a certain abstraction precisely for working with databases in the cloud.
In your case, you should build your module based on document databases, such as MongoDB or CouchDB and then deploy it to your cloud accounts.
Here you can find an example (test) of a document database based on MongoDB: https://github.com/MatteoGuadrini/nosqlapi/blob/main/tests/test_docdb.py
If you follow me, you start creating these classes:
import nosqlapi.docdb
# MongoDB like database
class MongoConnection(nosqlapi.docdb.DocConnection):...
class MongoSession(nosqlapi.docdb.DocSession):...
class MongoResponse(nosqlapi.docdb.DocResponse):...
class MongoBatch(nosqlapi.docdb.DocBatch):...
class MongoSelector(nosqlapi.docdb.DocSelector):...
so that you can then use the databases you want:
# Use MongoDB library
conn = MongoConnection(host='server.local', username='admin', password='pass')
sess = conn.connect() # return MongoSession object
# Create a new database
conn.create_database('new_db')
# CRUD operation
C = sess.insert(path='db/doc1', doc={"_id": "5099803df3f4948bd2f98391", "name": "Arthur", "age": 42}) # Create
R = sess.get(path='db/doc1') # Read
U = sess.update(path='db/doc1', doc={"_id": "5099803df3f4948bd2f98391", "name": "Arthur", "age": 43}, rev=2) # Update
D = sess.delete(path='db/doc1', rev=2) # Delete
print(R) # {"_id": "5099803df3f4948bd2f98391", "rev"= 2, "name": "Arthur", "age": 42}
print(type(R)) # <class 'MongoResponse'>
print(isinstance(R, nosqlapi.Response)) # True
# Extended CRUD operations
sess.insert_many(database='db', docs=[{"_id": "5099803df3f4948bd2f98391", "name": "Arthur", "age": 42},
{"_id": "5099803df3f4948bd2f98392", "name": "Arthur", "age": 43}])
sess.update_many(database='db', docs=[{"_id": "5099803df3f4948bd2f98391", "name": "Arthur", "age": 42, "rev": 2},
{"_id": "5099803df3f4948bd2f98392", "name": "Arthur", "age": 43, "rev": 2}])
# Complex select operation
sel = MongoSelector(selector={"name": "Arthur"}, fields=['_id', 'name', 'age'], limit=2)
sess.find(sel)
Also, the library has a nice set of ODM objects to map your code to the database: https://nosqlapi.readthedocs.io/en/latest/build.html#odm-classes
such as Mongo documents and PermissionDocuments ...
In my opinion it is the best way.
Addition: furthermore, by searching on google, I saw that discussions are underway to make this library a real standard: https://discuss.python.org/t/request-for-comment-making-pep-for-nosql-databases/14772