joke2k / django-environ

Django-environ allows you to utilize 12factor inspired environment variables to configure your Django application.
https://django-environ.rtfd.org
MIT License
3.01k stars 318 forks source link

db support for CockroachDB #509

Open stevewilliamsuk opened 10 months ago

stevewilliamsuk commented 10 months ago

I would like to propose a feature that django-eviron's db() parser shall support CockroachDB

CockroachDB is a distributed quorum based database. Cockroach Labs have provided an idiomatic driver for Django.

This driver does under the hood use psycopg, so in theory a postresql:// connection string could be used with Env().db_url() (I have not tried!) it is preferable to use the Cockroach driver as this improves resiliency and retry logic.

I am all too happy to submit the PR for this myself.

stevewilliamsuk commented 10 months ago

Would also add that it is worth considering support for djongo as well: https://www.mongodb.com/compatibility/mongodb-and-django#connect-django-and-mongodb-using-djongo