Firebird for SQLAlchemy
Project description
sqlalchemy-firebird
An external SQLAlchemy dialect for the Firebird database server.
This package targets SQLAlchemy 2.0+ and Firebird 3.0+, using the modern firebird-driver Python DB-API 2.0 driver.
Installation
pip install sqlalchemy-firebird
This installs SQLAlchemy 2.0+ and firebird-driver automatically. Python 3.9 or newer is required.
Connection strings
A SQLAlchemy URL has the shape dialect+driver://username:password@host:port/database. For Firebird:
firebird+firebird://<username>:<password>@<host>:<port>/<database_path>[?charset=UTF8&key=value&...]
Useful query parameters:
charset— character set used by the database file (Firebird default isUTF8).fb_client_library— full path to the Firebird client library (libfbclient.soon Linux,fbclient.dllon Windows). Only needed when using an embedded server or a non-default client install.
Examples
Local server, default port:
[Linux]
firebird+firebird://sysdba:masterkey@localhost///home/me/databases/my_project.fdb
[Windows]
firebird+firebird://sysdba:masterkey@localhost/c:/databases/my_project.fdb
Remote server on port 3040 with explicit charset and client library:
[Linux]
firebird+firebird://sysdba:masterkey@example.com:3040///srv/databases/my_project.fdb?charset=UTF8&fb_client_library=/opt/firebird/lib/libfbclient.so
[Windows]
firebird+firebird://sysdba:masterkey@example.com:3040/c:/databases/my_project.fdb?charset=UTF8&fb_client_library=c:/firebird/fbclient.dll
Embedded server:
[Linux]
firebird+firebird://sysdba@///home/me/databases/my_project.fdb?charset=UTF8&fb_client_library=/opt/firebird/lib/libfbclient.so
[Windows]
firebird+firebird://sysdba@/c:/databases/my_project.fdb?charset=UTF8&fb_client_library=c:/firebird/fbclient.dll
Usage
from sqlalchemy import create_engine
db_uri = "firebird+firebird://sysdba@/c:/databases/my_project.fdb?charset=UTF8&fb_client_library=c:/firebird/fbclient.dll"
engine = create_engine(db_uri, echo=True)
# Force the engine to connect, surfacing any URL or driver issues immediately.
with engine.begin():
pass
Code of Conduct
This project follows the SQLAlchemy Code of Conduct.
License
Distributed under the MIT license.
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 sqlalchemy_firebird-2.2.0.tar.gz.
File metadata
- Download URL: sqlalchemy_firebird-2.2.0.tar.gz
- Upload date:
- Size: 71.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61149039975557497b80a8aeb9e3fb58c7a2f62fe4776337827e7ce51b4c7781
|
|
| MD5 |
b81f2da8c23de6eeb31ab2ef44d1ec16
|
|
| BLAKE2b-256 |
f7d419b11ce74102bff7508d873affc8a94af6b5e41245151a924729b5231267
|
Provenance
The following attestation bundles were made for sqlalchemy_firebird-2.2.0.tar.gz:
Publisher:
release.yml on fdcastel/sqlalchemy-firebird
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sqlalchemy_firebird-2.2.0.tar.gz -
Subject digest:
61149039975557497b80a8aeb9e3fb58c7a2f62fe4776337827e7ce51b4c7781 - Sigstore transparency entry: 1591609534
- Sigstore integration time:
-
Permalink:
fdcastel/sqlalchemy-firebird@f6f61e01d71383a002fc80d5be766f66f904795f -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/fdcastel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f6f61e01d71383a002fc80d5be766f66f904795f -
Trigger Event:
push
-
Statement type:
File details
Details for the file sqlalchemy_firebird-2.2.0-py3-none-any.whl.
File metadata
- Download URL: sqlalchemy_firebird-2.2.0-py3-none-any.whl
- Upload date:
- Size: 34.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd1e63b502f6864466cb4c26789c696ac9bec3ab9b86e2a44d2340b126b0058a
|
|
| MD5 |
ff9254b02d8f3ee7c4147f60fd0aede1
|
|
| BLAKE2b-256 |
15cfc0b3c0c6736f92eb301a7b3234b7447f5f6caa12829c5bf09e187e0fddc7
|
Provenance
The following attestation bundles were made for sqlalchemy_firebird-2.2.0-py3-none-any.whl:
Publisher:
release.yml on fdcastel/sqlalchemy-firebird
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sqlalchemy_firebird-2.2.0-py3-none-any.whl -
Subject digest:
dd1e63b502f6864466cb4c26789c696ac9bec3ab9b86e2a44d2340b126b0058a - Sigstore transparency entry: 1591609630
- Sigstore integration time:
-
Permalink:
fdcastel/sqlalchemy-firebird@f6f61e01d71383a002fc80d5be766f66f904795f -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/fdcastel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f6f61e01d71383a002fc80d5be766f66f904795f -
Trigger Event:
push
-
Statement type: