Firebird RDBMS bindings for python.
Project description
firebirdsql package is a set of Firebird RDBMS (https://firebirdsql.org/) bindings for Python (Written in pure Python : no C compiler needed or fbclient library)
Sorry, it support Firebird 2.5+.
It works on Python 3.10+.
TimeZone feature in Firebird 4.0+
asyncio API
Example
Python Database API Specification v2.0
https://peps.python.org/pep-0249/
import firebirdsql
conn = firebirdsql.connect(
host='localhost',
database='/foo/bar.fdb',
port=3050,
user='alice',
password='secret'
)
cur = conn.cursor()
cur.execute("select * from baz")
for c in cur.fetchall():
print(c)
conn.close()
asyncio
import asyncio
import firebirdsql
async def conn_example():
conn = await firebirdsql.aio.connect(
host='localhost',
database='/foo/bar.fdb',
port=3050,
user='alice',
password='secret'
)
cur = conn.cursor()
await cur.execute("select * from baz")
print(await cur.fetchall())
asyncio.run(conn_example())
Use pool
import asyncio
import firebirdsql
async def pool_example(loop):
pool = await firebirdsql.aio.create_pool(
host='localhost',
database='/foo/bar.fdb',
port=3050,
user='alice',
password='secret'
loop=loop,
)
async with pool.acquire() as conn:
async with conn.cursor() as cur:
await cur.execute("select * from baz")
print(await cur.fetchall())
pool.close()
await pool.wait_closed()
loop = asyncio.get_event_loop()
loop.run_until_complete(pool_example(loop))
loop.close()
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
firebirdsql-1.4.3.tar.gz
(93.5 kB
view details)
File details
Details for the file firebirdsql-1.4.3.tar.gz.
File metadata
- Download URL: firebirdsql-1.4.3.tar.gz
- Upload date:
- Size: 93.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95277769f8e545170cfb86788e42e1d4ebc26793134e3d98c425fba3d3342a97
|
|
| MD5 |
198d06d4149dbea94e84d61c41d0e84f
|
|
| BLAKE2b-256 |
b646065a1799bd10b7559be6625790c2a3b483bf58d545f1520dd5ae9f212e0a
|