Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Django with Azure's CosmosDB?

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

like image 350
nehem Avatar asked Jul 25 '17 02:07

nehem


2 Answers

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.

like image 107
Thiago Custodio Avatar answered Nov 14 '22 22:11

Thiago Custodio


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.

like image 20
kas Avatar answered Nov 15 '22 00:11

kas