How to use Django with Azure's CosmosDB? - django

I'm curious if it is possible to use CosmosDB as the database backend for Django projects.

There's a fork that supports MongoDB as a Django database:
https://github.com/django-nonrel/mongodb-engine
You just need to select the MongoDB Api in your Azure Cosmos DB.

mongodb-engine seems dead, but I found djongo, which seems to be active:
https://github.com/nesdis/djongo
It's a connector that lets you use Django with MongoDB without changing the Django ORM.
You would need to configure your Azure Cosmos DB for MongoDB.

Related

Migrate from internal database to MSSQL

I am testing WSO2 API Manager locally and using the in-built database. I want to change the database form the internal database to MSSQL. Is there a way I can do this easily? Any tools/ scripts?
Trying to migrate from internal database to MSSQL
WSO2 doesn't provide any tools to do Cross Database data migrations. But there are third-party tools that can do Data migration between H2 and MSSQL, but attempting a direct Data migration may be tricky, you may have to perform the migration and test the deployment thoroughly.
The most straightforward option is to create a new deployment with MSSQL and use API Controller to Migrate the APIs and Applications from the old environment to the new one.

How to connect coldfusion with azure cosmos db

We have an application developed with coldfusion. We want to use cosmos database as backend. Please help me with this.
Azure Cosmos DB is No-SQL database like MongoDB which doesn't have a JDBC driver. So please do not treat it the same as a relational database.
Now, Cosmos DB has several quickstarts. These are the SDK options:
However, it also supports REST API to satisfy any development languages, as long as you can build an http request. You can refer to these two REST samples:
Using REST for CRUD operations in Azure Cosmos DB
How do I generate the rest authorization token for cosmos db in python?
BTW,the most important thing in Cosmos DB REST API is the authorization header. Please refer to this detailed document.
Cosmos DB is accessed by an API, so it is possible to write a interface for Cosmos DB to make it easier to use it as a data source.
I've written a little demo for this: https://github.com/dominicr/CFCosmosDB

Can I use Django's administration interface with a non-sql database?

I'm hoping to use Amazon's dynamoDB with a Django application. I know that the administration interface is relying on a relational DB like MySql or SqlLite. Can I use the administration interface on a non-relational DB such as dynamoDB?
Thanks
Your best bet is http://django-nonrel.org/. But that only supports MongoDB & Google App Engine.
A Django session backend for DynamoDB
https://github.com/gtaylor/django-dynamodb-sessions

Django: Using a Relational and Nosql database in same project

Can we use relational and nosql database in same django project.
As django package for relational and no-sql(django-nonrel) are different. Is there a way we can use both kind of databases in same project ?
Yes, although it depends on the backend for the NoSQL database. Django-nonrel is not necessarily required for a NoSQL database backend. From my experience, it is possible to use SQLite and Cassandra in the same project. We don't use django-nonrel because the Cassandra backend for Django works fine on vanilla Django.

django on google app engine with relational database

So is there any other way to use mysql database with django app on app engine? I found nice solution but it is not free - Google SQL Cloud seem to work great. But how about, moving django app to appengine and connecting to other hosting with mysql db? Or do you have any other solutions?
So to sum up - is there any way to work GAE with outside database?
Actually I have found the answer:
The Python Development Server in the Google App Engine SDK can use a locally-installed MySQL server instance to closely mirror the Google Cloud SQL environment during development.
More info here-> https://developers.google.com/appengine/docs/python/cloud-sql/developers-guide