{"id":23728,"library":"firebirdsql","title":"firebirdsql","description":"Python bindings for Firebird RDBMS. Current version 1.4.5. Release cadence is irregular, with maintenance updates as needed.","status":"active","version":"1.4.5","language":"python","source_language":"en","source_url":"https://github.com/nakagami/firebirdsql","tags":["firebird","database","sql","rdbms"],"install":[{"cmd":"pip install firebirdsql","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for datetime handling","package":"python-dateutil","optional":false},{"reason":"Optional, for legacy authentication (not used in modern Firebird)","package":"cryptography","optional":true}],"imports":[{"note":"Old pattern still works but is not recommended; the function is also available as firebirdsql.connect if you import the module directly.","wrong":"import firebirdsql; firebirdsql.connect()","symbol":"connect","correct":"from firebirdsql import connect"}],"quickstart":{"code":"import os\nfrom firebirdsql import connect\n\n# Use environment variables for credentials\nhost = os.environ.get('FIREBIRD_HOST', 'localhost')\ndatabase = os.environ.get('FIREBIRD_DATABASE', '/path/to/database.fdb')\nuser = os.environ.get('FIREBIRD_USER', 'sysdba')\npassword = os.environ.get('FIREBIRD_PASSWORD', 'masterkey')\n\nconn = connect(host=host, database=database, user=user, password=password)\ncur = conn.cursor()\ncur.execute('SELECT 1 FROM RDB$DATABASE')\nprint(cur.fetchone())\nconn.close()","lang":"python","description":"Connect to a Firebird database and execute a simple query."},"warnings":[{"fix":"Upgrade: pip install --upgrade firebirdsql","message":"Python 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.","severity":"breaking","affected_versions":" < 1.4.0"},{"fix":"Use named parameters: connect(host='...', database='...', user='...', password='...')","message":"Connection 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use ? placeholders: cur.execute('SELECT * FROM table WHERE id = ?', (id,))","message":"Parameter 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'lc_ctype' parameter instead of 'charset': connect(..., lc_ctype='UTF8')","message":"Charset handling: setting charset via connect parameter is deprecated in favor of encoding in the connection string in newer Firebird versions. Check your Firebird version.","severity":"deprecated","affected_versions":">= 1.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use individual parameters: connect(host='...', database='...', user='...', password='...')","cause":"Attempting to pass a DSN string directly to connect(), which does not support a single 'dsn' parameter.","error":"TypeError: connect() got an unexpected keyword argument 'dsn'"},{"fix":"Replace placeholders with ?: cur.execute('SELECT * FROM users WHERE id = ?', (user_id,))","cause":"Using %s or :named placeholders instead of ? positional placeholders for SQL parameters.","error":"ArgumentError: Incorrect parameter count in the command"},{"fix":"Install with: pip install firebirdsql","cause":"Package name is 'firebirdsql', not 'firebird' or 'fdb'. Also ensure you are using the correct Python environment.","error":"ModuleNotFoundError: No module named 'firebirdsql' after pip install"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}