# Integration of Django and CrateDB

**URL:** <https://community.cratedb.com/t/integration-of-django-and-cratedb/1756>\
**Category:** CrateDB\
**Tags:** integration\
**Created:** [April 11, 2024, 9:09am UTC](https://community.cratedb.com/t/integration-of-django-and-cratedb/1756 "2024-04-11T09:09:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zamanganji](https://avatars.discourse-cdn.com/v4/letter/z/b4bc9f/32.png) [@zamanganji](https://community.cratedb.com/u/zamanganji)\
**Post date:** [April 11, 2024, 9:09am UTC](https://community.cratedb.com/t/integration-of-django-and-cratedb/1756/1 "2024-04-11T09:09:24Z")

</div>

I want to integrate Django and CrateDB. Unfortunately there is no support for the Django database by CrateDB.

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [April 11, 2024, 10:42am UTC](https://community.cratedb.com/t/integration-of-django-and-cratedb/1756/2 "2024-04-11T10:42:06Z")

</div>

Dear Zaman,

thank you for writing in. We had a feature request about supporting Django almost ten years ago, but apparently, it never materialized.

- [Feature Request: Django ORM driver · Issue #158 · crate/crate-python · GitHub](https://github.com/crate/crate-python/issues/158)
- [[DRAFT] First roughly working Django backend by amotl · Pull Request #430 · crate/crate-python · GitHub](https://github.com/crate/crate-python/pull/430)

We will try to enqueue it into our processes, but we can’t promise any outcome, other that it probably will not happen today or tomorrow.

On the other hand, please let us know about any eventual capacities on your end. We guess that [GH-430](https://github.com/crate/crate-python/pull/430) is not a bad start, and may just need a few refurbishments. We are always happy about contributions from the community.

With kind regards,  
Andreas.

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [July 24, 2025, 9:36pm UTC](https://community.cratedb.com/t/integration-of-django-and-cratedb/1756/3 "2025-07-24T21:36:54Z")

</div>

_Hi again. @surister conceived a proper Django adapter package for CrateDB, `cratedb-django`. Thank you!_

## About

Connector to use CrateDB as a database in Django ORM.

## Sources

- PyPI: [cratedb-django – CrateDB connector for Django](https://pypi.org/project/cratedb-django/)
- GitHub: [GitHub - crate/cratedb-django: CrateDB backend for Django](https://github.com/surister/cratedb-django)

## Setup

Install the package from PyPI.

```shell
pip install cratedb-django

```

## Configure

In your Django project’s `settings.py` you can now use `cratedb_django` in `DATABASES` engine. Later in the models you need to import `CrateModel` and use it like `BaseModel`.

**Examples:** [settings.py](https://github.com/surister/cratedb-django/blob/master/tests/settings.py), [models.py](https://github.com/surister/cratedb-django/blob/master/tests/test_app/models.py)
