Skip to main content
https://img.shields.io/pypi/v/django-firebird.svg https://github.com/maxirobaina/django-firebird/actions/workflows/tests.yml/badge.svg

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.13

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:

https://github.com/maxirobaina/django-firebird

There is also a mailing list:

http://groups.google.com/group/django-firebird-dev

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

django_firebird-5.1.tar.gz (58.9 kB view details)

Uploaded Source

Built Distribution

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

django_firebird-5.1-py3-none-any.whl (47.7 kB view details)

Uploaded Python 3

File details

Details for the file django_firebird-5.1.tar.gz.

File metadata

  • Download URL: django_firebird-5.1.tar.gz
  • Upload date:
  • Size: 58.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for django_firebird-5.1.tar.gz
Algorithm Hash digest
SHA256 b0fb38c2f7ee852fd4158186f287314b9e2cef1e19c29db3741a23e95aef0f70
MD5 d63d3fa02b923034df5c3d7ec9ce33aa
BLAKE2b-256 09419e79ee2e0509ed1ce50ca5eb7ea6077bc31058c2eb0b6a4a117fe40caac6

See more details on using hashes here.

File details

Details for the file django_firebird-5.1-py3-none-any.whl.

File metadata

  • Download URL: django_firebird-5.1-py3-none-any.whl
  • Upload date:
  • Size: 47.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for django_firebird-5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd07c08833b6bb9cf8d8e5075abda2a91396bb3127d42e8ae7f84e3c11f002e5
MD5 42122e712e83cb2bb17c5f6198bcb47a
BLAKE2b-256 35849ae185e6336c11494fdf0a920dee3eedc301cd5c6f3af24b4189bfcabaa6

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 Sentry Error logging StatusPage Status page