Skip to content

G4brym/django-d1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-d1

Cloudflare D1 backend engine for Django

This package is still in tests, and issues will probably appear! Please report any issues you find in the Issues tab.

Installation

pip install django-d1db

Usage

DATABASES = {
    'default': {
        'ENGINE': 'django_d1',
        'CLOUDFLARE_DATABASE_ID': '<database_id>',
        'CLOUDFLARE_ACCOUNT_ID': '<account_id>',
        'CLOUDFLARE_TOKEN': '<token>',
    }
}

The Cloudflare token requires D1 Edit permissions.

Limitations

Due to the remote nature of D1, queries can take some time to execute.

Read all Django limitations for SQLite databases here.