Initial release (0.7.0) of new Python driver for Firebird – FDB is ready for testing

As promised, FDB initial release (0.7.0) is out: http://pypi.python.org/pypi/fdb/0.7.0

It’s almost feature-complete (ready for 95% of users), but it could be
still buggy (it’s beta!), and the code wasn’t optimized for size and
speed. In all other ways it’s ready for wide testing.

What’s missing:

– Distributed transactions
– ARRAY support
– EVENTs support
– Stream BLOBs
– TRACE service
– Documentation (but you can use KInterbasDB one as FDB is as close to
it as possible).
– Python 3.x support (haven’t had time to test it, but it shouldn’t be
hard to make it work there)

What’s new since my last post here:

– Support for stored procedures (proper one according to Python DB API,
behaviour is the same as in KInterbasDB)
– Prepared Statements. It works in exactly the same way as in
KInterbasDB, i.e. you can use explicit PS via cursor.prep(), or use the
internal PS cached for all statements executed via cursor.execute() – it
will detect previously executed command and re-use prepared statement
(cached per cursor instance!).
– Fully implemented cursor.description attribute, i.e. including
precision for DECIMAL/NUMERIC fields. Should now return the same results
as KInterbasDB.
– trans_info/transaction_info and db_info/database_info calls like in
KInterbasDB.
– Better object dependency and lifetime management, so Python memory GC
should be much happier now. I modelled it as much as KDB does it as
possible.

Source code is also in Firebird Project’s Subversion repository:

(KInterbasDB source moved)

Sorry for GIT/Mercurial etc. fans, but Firebird project uses only SVN
for all its code (except old obsolete ones that are still in CVS) and it
would be pointless to create another type of repository for such a small
project. However, you’re free to set up mirrors or local repositories on
GIT or whatever 🙂

Merry Christmas to all
Pavel Cisar
IBPhoenix

[ED: if you want to know how easy is to use , or how compatible it is related to kinterbasdb , read this post ]

Python 3 Firebird-driver & Firebird-lib 1.0.0 released

The firebird-driver package provides official Python Database API 2.0-compliant driver. In addition to the minimal feature set of the standard Python DB API, this driver also exposes the new (interface-based) client API introduced in Firebird 3, and number of additional extensions and enhancements for convenient use of Firebird RDBMS. The driver is written as pure-Python package (requires Python 3.8+) on top of Firebird client library (fbclient.so/dll) using ctypes. Driver supports Firebird version 3.0 and higher.

You can download this driver from PyPI or or install it using pip.

Please note, that FDB driver is now considered as legacy driver, and its development will be discontinued together with 2.5 once Firebird 4.0 will be released later this year.

The driver uses firebird-base package, which is a collection of modules that have general applicability, like extended configuration, context-driven logging and trace/audit, hooks, work with structured binary buffers, extended data structures etc. The driver uses almost all features provided by “base” package, but specifically the use of hook mechanism and context-driven logging and trace/audit are potentially the most valuable improvements.


The firebird-lib package provides extensions to the firebird-driver.
This package provides modules for:

  • Work with Firebird database schema.
  • Work with Firebird monitoring tables.
  • Processing output from gstat Firebird utility.
  • Processing Firebird server log.
  • Processing output from Firebird server trace & audit sessions.

You can download this library from PyPI or or install it using pip.

New Firebird driver for Python – preview release

There is now an official preview release – v0.5.0 – available on PyPI:
https://pypi.org/project/firebird-driver/

All core driver functionality works, except handling of limbo
transactions due to error discovered in Firebird (should be fixed in
soon to be released Firebird 3.0.6).

This preview version was released because the driver architecture is
evolving rapidly, and I would like get some feedback before the initial
release planned for end of June.

Some important notes about the driver architecture:

  1. It uses namespace package “firebird”, and the driver is distributed
    as “firebird.driver” package. There are other packages that share the
    same namespace: “firebird.base” and “firebird.butler”. In future I’d
    like introduce “firebird.lib” package for extension libraries (former
    schema, monitor and other extension modules in FDB).
  2. Although the initial driver design was close to FDB, there are
    significant differences and the driver architecture and API will diverge
    further from FDB or KInterbasDB. The sole backward “compatibility” is
    defined as compliance to Python DB API 2.0. So the new driver is not and
    will not be a drop-in replacement for FDB.

Here are some main decisions related to implementation and architecture:

New Firebird driver for Python

As Pavel Cisar promised at Firebird Conference in Berlin, the Firebird has brand
new DB API 2.0 driver for Python. It’s part of modernization campaign
that shakes off the legacy that goes back to KInterbasDB and Firebird 2.0.

Please note, that his new driver requires Firebird 3+ and Python 3.8+.
This “high” base line was chosen deliberately, to use all new features
available from latest Firebird & Python releases without constraints and
limits that backward compatibility would require. Internally, the driver
uses new client API based on interfaces introduced by Firebird 3. This
new API has many limits raised (like statement sizes, blob sizes etc.)
or completely lifted (like number of databases participating in
distributed transaction), and provides access to new Firebird features
(like scrollable cursors).

The initial release (v0.5.0) supports all key driver features you know
from FDB (passes all tests for FDB features), with next exceptions:

Missing parts:
– distributed transactions (will appear in next version)
– FDB extensions like schema, monitoring tables and log parsers. These
modules will be developer later, and released as separate package.
– documentation

New features in comparison to FDB:
– scrollable cursors
– type hints everywhere
– new FB client API instead old one
– enhanced Enums and Flags classes instead isc_* constants
– better and more rich support for Firebird services

The driver has also much cleaner structure and namespaces, and less core
code than FDB, and although it was not measured yet, it should also
perform better. However, the driver API is not 100% backward compatible
(with FDB).

Right now, the new driver is available only from project’s GitHib at
https://github.com/FirebirdSQL/python3-driver

PyFirebirdSQL 0.7.1 pure Python driver is released with many fixes

The ChangeLog includes many patches:

  •  Fix fetchonemap() and correct test
  •  Fix issue #35 add timeout parameter to conduit.wait()

Here is the download page.
You can also use pip to install/upgrade the package

sudo pip install firebirdsql

For full list of commits consult the github page

ps: pyFirebirdSQL is pure python so it can work without any other so/dll installed and it can be used for example in places where there is no Firebird client installed (think of an android/ios python script)

Django 1.5 driver for Firebird is updated (based on the fdb driver)

Maximiliano Robaina ‏announced :
There is a new version of django-firebird in github repository.
It is still alpha,You can test it with django 1.5 release.

This version is under development and uses the fdb python-firebird driver .
It’s tested only with django 1.5 master branch, so is possible it could fail with django 1.4.x (but it seems that works)
Given this is still in alpha stage we need that you try it and run the tests and give us feedback if it works for you. Also we need Python 3.x testers.

Update: Django 1.5 Beta is released

Django 1.5 driver for firebird ready for testing (based on the new fdb driver)

Hi everyone,

I’ve some news about development of django-firebird:

First, the current django-firebird at google code repository was updated (in trunk) with support for django 1.4. This version is still with kinterbasdb support.

There is a new version of django-firebird at https://github.com/maxirobaina/django-firebird.
This version is under development and uses the new fdb python-firebird driver in replacement of kinterbasdb. Also it’s tested with django 1.5 master branch, so that is possible what this can fail with django 1.4.
Given that this is still in alpha stage, so we need that you try it and give us some feedback.

For the moment, I’ll try to maintain both, but in the future, all efforts will target fdb with firebird 2.x and later.

What is “the” Firebird package to use today? FDB? pyFirebirdSQL? kInterbasDB?

Short answer is FDB
The difference between FDB and kInterbasDB is explained here

It’s old and unmaintained , all effort is on FDB driver and it is backward compatible with kInterbasDB
Now between FDB and FirebirdSQL , from what i know pyFirebirdSQL is pure python so it can work without any other so/dll installed and it can be used for example in places where there is no Firebird client installed (think of android python script)

1 3 4 5 6 7