Skip to main content

Firebird for SQLAlchemy

Project description

https://img.shields.io/badge/code%20style-black-000000.svg https://github.com/pauldex/sqlalchemy-firebird/workflows/sqlalchemy-firebird/badge.svg
This package provides a Firebird dialect for SQLAlchemy using the firebird-driver and/or fdb driver.

Installation

pip install sqlalchemy-firebird

If you are using Python 3.8 or greater, SQLAlchemy 2.0+ and firebird-driver will be automatically installed. Python 3.6 and 3.7 will automatically install and use SQLAlchemy < 2.0 and fdb instead.

Connection URI samples for Firebird server installed on local machine using default port (3050):

[Linux]
# Use the fdb driver (Python 3.6/3.7)
firebird+fdb://username:password@localhost///home/testuser/projects/databases/my_project.fdb
# Use the firebird-driver driver (Python 3.8+)
firebird+firebird://username:password@localhost///home/testuser/projects/databases/my_project.fdb

[Windows]
# Use the fdb driver (Python 3.6/3.7)
firebird+fdb://username:password@localhost/c:/projects/databases/my_project.fdb
# Use the firebird-driver driver (Python 3.8+)
firebird+firebird://username:password@localhost/c:/projects/databases/my_project.fdb

Usage

For example, to connect to a Firebird server installed on a local Windows machine using the default port and firebird-driver:

db_uri = "firebird+firebird://username:password@localhost/c:/projects/databases/my_project.fdb"
from sqlalchemy import create_engine
engine = create_engine(db_uri, echo=True)

Connecting to different types of Firebird servers, databases, or drivers is done simply by changing the db_uri string used in the call to create_engine.


Code of Conduct

As with SQLAlchemy, sqlalchemy-firebird places great emphasis on polite, thoughtful, and constructive communication between users and developers. We use the SQLAlchemy Code of Conduct.


License

sqlalchemy-firebird is distributed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlalchemy-firebird-2.0.0.tar.gz (24.4 kB view hashes)

Uploaded Source

Built Distribution

sqlalchemy_firebird-2.0.0-py3-none-any.whl (22.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page