Firebird database backend for Django 5.0+
Project description
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
BOOLEANin Firebird 3.0+,SMALLINTin 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
- Inspired by django-cockroachdb and mssql-django
- Built on firebird-driver
Project details
Release history Release notifications | RSS feed
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_backend-0.1.1.tar.gz.
File metadata
- Download URL: django_firebird_backend-0.1.1.tar.gz
- Upload date:
- Size: 43.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5395d9d8eac9cfa6fc75be9acfdefa88834b0db493a1e3bbde6ed9fe54546410
|
|
| MD5 |
8b9b93eafc5024e87b86845addcd4ca4
|
|
| BLAKE2b-256 |
81dd50392239ba540f524ff416f574a1e414b19d03b9c71ba9a9a6bb20d2ffba
|
Provenance
The following attestation bundles were made for django_firebird_backend-0.1.1.tar.gz:
Publisher:
release.yml on joseanoxp/django-firebird-backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_firebird_backend-0.1.1.tar.gz -
Subject digest:
5395d9d8eac9cfa6fc75be9acfdefa88834b0db493a1e3bbde6ed9fe54546410 - Sigstore transparency entry: 800433675
- Sigstore integration time:
-
Permalink:
joseanoxp/django-firebird-backend@4d7b673a6778b6fefbd22b6aeec698d07b00a784 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/joseanoxp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4d7b673a6778b6fefbd22b6aeec698d07b00a784 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_firebird_backend-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_firebird_backend-0.1.1-py3-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
203ff1df6df8dffc6c671427100fa62dee2b49164d5adc3181b4ff2d617dab85
|
|
| MD5 |
42e9b35908a2a44b7618972174392790
|
|
| BLAKE2b-256 |
51934b61f89b2629a535054ad68d6ae449404a99509306cdbfc607b01c0bab76
|
Provenance
The following attestation bundles were made for django_firebird_backend-0.1.1-py3-none-any.whl:
Publisher:
release.yml on joseanoxp/django-firebird-backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_firebird_backend-0.1.1-py3-none-any.whl -
Subject digest:
203ff1df6df8dffc6c671427100fa62dee2b49164d5adc3181b4ff2d617dab85 - Sigstore transparency entry: 800433703
- Sigstore integration time:
-
Permalink:
joseanoxp/django-firebird-backend@4d7b673a6778b6fefbd22b6aeec698d07b00a784 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/joseanoxp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4d7b673a6778b6fefbd22b6aeec698d07b00a784 -
Trigger Event:
release
-
Statement type: