Skip to main content

django-firebird

Firebird database backend for Django.

This package provides a Django database backend for Firebird, supporting versions 2.5, 3.0, 4.0, and 5.0+. It uses the firebird-driver library for connectivity.

Features

Feature Firebird 2.5 Firebird 3.0+ Firebird 4.0+ Firebird 5.0+
Basic ORM operations Yes Yes Yes Yes
Migrations Yes Yes Yes Yes
inspectdb command Yes Yes Yes Yes
Native BOOLEAN No Yes Yes Yes
Window functions No Yes Yes Yes
FILTER clause No Yes Yes Yes
Timezone support No No Yes Yes
SKIP LOCKED No No No Yes

Requirements

  • Python 3.11+
  • Django 5.0, 5.1, or 6.0
  • firebird-driver 1.10.0+
  • Firebird Server 2.5+

Installation

pip install django-firebird

Configuration

Configure your Django DATABASES setting:

DATABASES = {
    'default': {
        'ENGINE': 'django_firebird',
        'NAME': '/path/to/database.fdb',
        'USER': 'SYSDBA',
        'PASSWORD': 'masterkey',
    }
}

Remote Database

For remote connections, specify HOST and optionally PORT:

DATABASES = {
    'default': {
        'ENGINE': 'django_firebird',
        'NAME': '/path/to/database.fdb',
        'USER': 'SYSDBA',
        'PASSWORD': 'masterkey',
        'HOST': 'localhost',
        'PORT': '3050',
    }
}

Connection Options

Option Description Default
charset Character set for connection UTF8
fb_client_library Path to Firebird client library System default
DATABASES = {
    'default': {
        'ENGINE': 'django_firebird',
        'NAME': '/path/to/database.fdb',
        'USER': 'SYSDBA',
        'PASSWORD': 'masterkey',
        'OPTIONS': {
            'charset': 'UTF8',
            'fb_client_library': '/usr/lib/libfbclient.so',
        },
    }
}

Timezone Support (Firebird 4.0+)

DATABASES = {
    'default': {
        'ENGINE': 'django_firebird',
        'NAME': '/path/to/database.fdb',
        'USER': 'SYSDBA',
        'PASSWORD': 'masterkey',
        'TIME_ZONE': 'America/New_York',
    }
}

Notes on Django Fields

  • AutoField/BigAutoField: Uses Firebird generators (sequences) with triggers
  • BooleanField: Uses native BOOLEAN in Firebird 3.0+, SMALLINT in 2.5
  • TextField: Uses BLOB SUB_TYPE TEXT
  • JSONField: Not supported (Firebird has no native JSON type)
  • UUIDField: Uses CHAR(36) storage

Known Limitations

  • No JSON support: Firebird does not have a native JSON data type
  • No DISTINCT ON: Use other approaches for similar functionality
  • Single-row RETURNING: Bulk inserts with RETURNING not supported
  • DDL auto-commit: Schema changes cannot be rolled back within a transaction
  • Identifier length: 31 characters max in Firebird < 4.0, 63 in 4.0+

Using inspectdb

To inspect an existing Firebird database:

python manage.py inspectdb

For better results with foreign key ordering, use the enhanced command:

python manage.py inspectdb_firebird

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.

Acknowledgments

Release files for django-firebird-backend 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-firebird-backend 0.1.1
File Size Uploaded
django_firebird_backend-0.1.1.tar.gz 43.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-firebird-backend 0.1.1
File Interpreter ABI Platform
django_firebird_backend-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 72.6 kB

Release files / django_firebird_backend-0.1.1.tar.gz

Download URL django_firebird_backend-0.1.1.tar.gz
Size 43.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5395d9d8eac9cfa6fc75be9acfdefa88834b0db493a1e3bbde6ed9fe54546410
BLAKE2b-256 checksum
How to use checksums
81dd50392239ba540f524ff416f574a1e414b19d03b9c71ba9a9a6bb20d2ffba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 7, 2026.

Transparency log

Release files / django_firebird_backend-0.1.1-py3-none-any.whl

Download URL django_firebird_backend-0.1.1-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
203ff1df6df8dffc6c671427100fa62dee2b49164d5adc3181b4ff2d617dab85
BLAKE2b-256 checksum
How to use checksums
51934b61f89b2629a535054ad68d6ae449404a99509306cdbfc607b01c0bab76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page