sqlalchemy-firebirdsql
SQLAlchemy dialect for Firebird using pyfirebirdsql .
It based on sqlalchemy-firebird , thanks.
Requirements
It is difficult to support many versions, so I target newer versions.
Firebird 4.0+
SQLAlchemy 2.0+
Python 3.11+
Installation
pip install sqlalchemy_firebirdsql
Connection strings
A SQLAlchemy URL has the shape dialect+driver://username:password@host:port/database. For this dialect:
firebirdsql+syn://user:password@host:port/path/to/db[?key=value&key=value...]
For async:
firebirdsql+asyn://user:password@host:port/path/to/db[?key=value&key=value...]
The bare firebirdsql:// scheme defaults to the synchronous (syn) driver.
Examples
Local server, default port:
firebirdsql+syn://sysdba:masterkey@localhost//home/me/databases/my_project.fdb
Remote server on port 3050:
firebirdsql+syn://sysdba:masterkey@example.com:3050//srv/databases/my_project.fdb
Usage
Synchronous
from sqlalchemy import create_engine, text
engine = create_engine(
"firebirdsql+syn://sysdba:masterkey@localhost//home/me/databases/my_project.fdb",
echo=True,
)
with engine.connect() as conn:
result = conn.execute(text("select 1 from rdb$database"))
print(result.scalar())
Asynchronous
import asyncio
from sqlalchemy import text
from sqlalchemy.ext.asyncio import create_async_engine
engine = create_async_engine(
"firebirdsql+asyn://sysdba:masterkey@localhost//home/me/databases/my_project.fdb",
echo=True,
)
async def main():
async with engine.connect() as conn:
result = await conn.execute(text("select 1 from rdb$database"))
print(result.scalar())
asyncio.run(main())
How to test
git clone git@github.com:nakagami/sqlalchemy_firebirdsql.git cd sqlalchemy_firebirdsql python3 -m venv .venv . .venv/bin/activate pip install -e . prepare-test-environment pip install pytest
Metadata
Release files for sqlalchemy-firebirdsql 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sqlalchemy_firebirdsql-0.3.0.tar.gz | 55.7 kB | Without provenance | Details for sqlalchemy_firebirdsql-0.3.0.tar.gz |
Release files / sqlalchemy_firebirdsql-0.3.0.tar.gz
| Download URL | sqlalchemy_firebirdsql-0.3.0.tar.gz |
|---|---|
| Size | 55.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81e57464f6024e20ed1aace6dfd651b570a766ff3a1392d5a2295fd2513bb0fd
|
|
BLAKE2b-256 checksum How to use checksums |
3e252157b92a67d87bb9b9144bfc36f96184a4150b5c6a76238dba2be12ed0d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for sqlalchemy-firebirdsql 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.