Skip to main content

CrateDB connector for Django

Project description

CrateDB django connector.

PyPI - Version PyPI - Python Version PyPI - License PyPI - Status 🛠🐍 Unit tests

Connector to use CrateDB as a database in Django ORM.

Documentation

How to install

uv

uv add cratedb-django

pipx

pipx install cratedb-django

Install

Once the library is installed, use it in your settings.py, e.g.

DATABASES = {
    "default": {
        "ENGINE": "cratedb_django",
        "SERVERS": ["localhost:4200"],
    }
}

After that, for a model to be used in CrateDB, you need to use CrateDBModel as a base class.

from django.db import models
from cratedb_django.models import CrateDBModel
from cratedb_django.models import functions

class Metrics(CrateDBModel):
    id = models.TextField(primary_key=True, db_default=functions.UUID())
    value = models.IntegerField()

Django migrations can be run in CrateDB, default django migrations are tested. In spite of that, we recommend that you run anything transactional in a transactional database, like PostgresSQL and use CrateDB as your analytical database.

License

This project is open-source under a MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cratedb_django-0.1.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cratedb_django-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file cratedb_django-0.1.0.tar.gz.

File metadata

  • Download URL: cratedb_django-0.1.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cratedb_django-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a52bbabfd9d3e9ec4d0de5e88bd2cc6bf49bb24acf764a38516a32ba44c4a5dc
MD5 b4535158971acbe93679539ace8bf269
BLAKE2b-256 86d7fda7ecdae28f936876de1610598b84645fc5e566d52486391e4a3f264906

See more details on using hashes here.

File details

Details for the file cratedb_django-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cratedb_django-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cratedb_django-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8a7d6661ea6716867ce355e7d921424215d3b5a2ec2cdc5ac41ce7adff7af89
MD5 c4d28207bd18d19b32401bf22be1ecc8
BLAKE2b-256 ae60cca03dc899bb76eb50e23107ff635dc9a174b928eb34b0dbdeb3480d472a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page