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.0.x / master

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.0.3.tar.gz (57.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.0.3-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_firebird-5.0.3.tar.gz
  • Upload date:
  • Size: 57.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.0.3.tar.gz
Algorithm Hash digest
SHA256 61edeb760538503d5612cae80034bfa4d1c54584cfab0e44159a905a89a0cfa1
MD5 ebbf77aaa8171e728815e678af0e058b
BLAKE2b-256 bbec1da763b21e64f5f21bfbf152afdb08f88a37ae96601a4f054ce4ae3ea10b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_firebird-5.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d5d9be99d844e0ea78976f111fa19d3952ab61e4cd6ad5e2ab6c218e47fe6363
MD5 5b98f2d9edbd77f97e5134c349756ec5
BLAKE2b-256 ba97d26c3cab6810ee389e30090ccb93d1d7d54207177f51c08c3e33d456d966

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