Firebird SQL backend for Django
django-firebird lets Django applications use Firebird as their database, on top of the official firebird-driver.
Since version 5.0 the Python package is called django_firebird (the previous firebird package name conflicted with the namespace used by firebird-driver itself, see issue #130).
Compatibility
Every push is tested by continuous integration against the official Firebird Docker images.
django-firebird |
Django |
Firebird server |
firebird-driver |
Python |
|---|---|---|---|---|
5.1.x / master |
6.1 |
3.0, 4.0, 5.0 [1] |
2.x |
3.12–3.14 |
stable/5.0.x |
5.2 (LTS) |
3.0, 4.0, 5.0 [1] |
2.x |
3.11–3.12 |
stable/2.2.x |
2.2 |
2.x (fdb driver) |
fdb |
3.x |
[1] Firebird 6 development snapshots are also exercised in CI, as an informational (non-blocking) target.
Installation
Using pip:
pip install django-firebird
This installs the django_firebird package and pulls in firebird-driver. The driver loads the Firebird client library (libfbclient) at runtime; install it from your distribution (e.g. apt install libfbclient2) or a Firebird server/client package. Note that a Firebird 3 era client cannot describe the INT128-backed NUMERIC types of Firebird 4+ servers — use a client at least as new as your newest server (see docs/troubleshooting.rst).
From the repository:
git clone https://github.com/maxirobaina/django-firebird.git cd django-firebird pip install .
Configuration
Add a database to your settings.py:
DATABASES = {
'default': {
'ENGINE': 'django_firebird',
'NAME': '/var/lib/firebird/data/mydb.fdb', # path or alias on the server
'USER': 'SYSDBA',
'PASSWORD': '*****',
'HOST': '127.0.0.1',
'PORT': '3050', # empty string uses the default 3050
'OPTIONS': {
'charset': 'UTF8', # connection character set
'lock_timeout': 10, # seconds to wait on record locks
# (optional; default: wait forever)
},
},
}
All settings, including the test-database options and the environment variables understood by the test suite, are documented in docs/settings.rst.
Then create your schema as usual:
python manage.py migrate
Documentation
docs/settings.rst — every supported setting and OPTIONS key.
docs/limitations.rst — Firebird capabilities and their consequences for the ORM (regex lookups, timestamp resolution, identifier case, decimal precision per server version, time zones, …).
docs/internals.rst — how the backend maps Django concepts to Firebird: auto-increment fields, type mapping, introspection conventions, connection recovery.
docs/testing.rst — running the test suite locally and in CI, including ready-made Docker commands.
docs/troubleshooting.rst — common errors and what they mean.
docs/changelog.txt — release history.
Upgrading from django-firebird 4.x or earlier
Set 'ENGINE': 'django_firebird' (the old firebird / django.db.backends.firebird values no longer exist).
firebird-driver 2.x replaces fdb; Firebird 3.0 is the minimum server.
BooleanField uses the native BOOLEAN type on new columns and no longer creates check constraints. Existing columns keep working.
Contributing
Code and issues live on GitHub:
There is also a mailing list:
License
BSD. See LICENSE.
Release files for django-firebird 5.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_firebird-5.1.1.tar.gz | 59.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_firebird-5.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 106.9 kB
Release files / django_firebird-5.1.1.tar.gz
| Download URL | django_firebird-5.1.1.tar.gz |
|---|---|
| Size | 59.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
debc98b6bd21661d4c0a18e0707f3c7227a73bc1eb5213f1dd0cf79596229d95
|
|
BLAKE2b-256 checksum How to use checksums |
ad37ffdb3dcf1c964e5c5cc6b550e1fcd06a623e29d33931b83f5cd2d41a1474
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / django_firebird-5.1.1-py3-none-any.whl
| Download URL | django_firebird-5.1.1-py3-none-any.whl |
|---|---|
| Size | 47.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
caf8e34a346def5e1e21a397a2b4e8a88781e413a75c033b224125c0e39c8706
|
|
BLAKE2b-256 checksum How to use checksums |
a74d4c3c7302da7ab922ec792d119000121aa9c89fe0bb13f4f4713710ff260c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|