Registry / database / firebirdsql

firebirdsql

JSON →
library1.4.6pypypi✓ verified 85d ago

Python bindings for Firebird RDBMS. Current version 1.4.5. Release cadence is irregular, with maintenance updates as needed.

pip install firebirdsql
INSTALL
IMPORT
SIG · FIREBIRDSQL
F
firebirdsql
databasepythonv1.4.6
Install
3.4s avg
Import
251ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.4.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.262s · 18.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.4s · import 0.240s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

connect
from firebirdsql import connect
import firebirdsql; firebirdsql.connect()
Old pattern still works but is not recommended; the function is also available as firebirdsql.connect if you import the module directly.

Connect to a Firebird database and execute a simple query.

import os from firebirdsql import connect # Use environment variables for credentials host = os.environ.get('FIREBIRD_HOST', 'localhost') database = os.environ.get('FIREBIRD_DATABASE', '/path/to/database.fdb') user = os.environ.get('FIREBIRD_USER', 'sysdba') password = os.environ.get('FIREBIRD_PASSWORD', 'masterkey') conn = connect(host=host, database=database, user=user, password=password) cur = conn.cursor() cur.execute('SELECT 1 FROM RDB$DATABASE') print(cur.fetchone()) conn.close()
Debug
Known issues
breakingPython 3.12+ support requires version >= 1.4.0. Older versions fail on import due to removed modules. If you are on Python 3.12, upgrade to 1.4.0 or later.
fix
Upgrade: pip install --upgrade firebirdsql
affects: < 1.4.0
gotchaConnection strings (DSN) format differs from other databases. The library expects host, database, user, password as separate arguments, not a single DSN string. Using a DSN string will raise TypeError.
fix
Use named parameters: connect(host='...', database='...', user='...', password='...')
affects: all
gotchaParameter style: the library uses format parameter style (e.g., ?, ?) for positional parameters, not pyformat (%s) or named (:name). Using %s will produce wrong results or errors.
fix
Use ? placeholders: cur.execute('SELECT * FROM table WHERE id = ?', (id,))
affects: all
deprecatedCharset handling: setting charset via connect parameter is deprecated in favor of encoding in the connection string in newer Firebird versions. Check your Firebird version.
fix
Use 'lc_ctype' parameter instead of 'charset': connect(..., lc_ctype='UTF8')
affects: >= 1.3.0
Errors
Common errors & fixes
TypeError: connect() got an unexpected keyword argument 'dsn'
Attempting to pass a DSN string directly to connect(), which does not support a single 'dsn' parameter.
fix
Use individual parameters: connect(host='...', database='...', user='...', password='...')
ArgumentError: Incorrect parameter count in the command
Using %s or :named placeholders instead of ? positional placeholders for SQL parameters.
fix
Replace placeholders with ?: cur.execute('SELECT * FROM users WHERE id = ?', (user_id,))
ModuleNotFoundError: No module named 'firebirdsql' after pip install
Package name is 'firebirdsql', not 'firebird' or 'fdb'. Also ensure you are using the correct Python environment.
fix
Install with: pip install firebirdsql
Upgrade
Version history
1.4.6latest on PyPI · released May 2, 2026
Audit
Dependencies
python-dateutilrequiredRequired for datetime handling
cryptographyoptionalOptional, for legacy authentication (not used in modern Firebird)
Agent activity
8 hits · last 30 days
node
8
Resources
firebirdsql — pip install firebirdsql · libregistry