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.
pip install django-d1db
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.
A simple tutorial is available here for you to read.
Due to the remote nature of D1, queries can take some time to execute.
Read all Django limitations for SQLite databases here.