Saturday, December 12, 2020

Firebird python3 driver status

Firebird python3 driver status for Firebird Advent 2020 

https://qiita.com/advent-calendar/2020/firebird

The firebird-driver package provides driver for Python 3.8+ and Firebird 3+. This driver uses new Firebird OO API provided by fbclient library. You can download it or install directly from Python Package Index.

To use the driver you can start with the Getting Started from documentation area 

A few more examples are in Usage Guide from documentation area

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 1.0 release supports all key driver features you know
from FDB (passes all tests for FDB features)

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).

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.

No comments: