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 |
|---|---|---|---|---|
stable/5.0.x |
5.2 (LTS) |
3.0, 4.0, 5.0 [1] |
2.x |
3.11–3.14 |
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_firebird-5.0.4.tar.gz.
File metadata
- Download URL: django_firebird-5.0.4.tar.gz
- Upload date:
- Size: 58.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25847f8572ec59c83ac0a90e7b26883835fc4b71fb32f4ebfed5bbb0a34ee6c3
|
|
| MD5 |
ae8dbc17aafc4ff60961942a5e04728e
|
|
| BLAKE2b-256 |
3b54a170ccd6dca0e044bed34d310dee42eb6295780552e0402bec764d2b9dac
|
File details
Details for the file django_firebird-5.0.4-py3-none-any.whl.
File metadata
- Download URL: django_firebird-5.0.4-py3-none-any.whl
- Upload date:
- Size: 46.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3bc457029120d47a319e93ef5603175420ea4ad9fd58514118fec07f32c37fb
|
|
| MD5 |
8ba4d7616bf844d567317c95171fc1a9
|
|
| BLAKE2b-256 |
975fcf462106cc6696f482713b720b3fbdea73ead993ffa9814d76eb0e137fdd
|