Firebirdsql wrapper inspired by subprocess.run
Project description
firebirdsql-run
Firebirdsql wrapper inspired by subprocess.run
Installation
pip install firebirdsql-run
Examples
Execute
maker | model | type |
---|---|---|
B | 1121 | PC |
A | 1232 | PC |
result = execute(
query="SELECT * FROM TABLE",
host="localhost",
db="fdb",
user="sysdba",
passwd=getenv("FB_PASSWORD"),
)
if result.returncode != 0:
log.error(result)
else:
log.info(result)
- Info
CompletedTransaction(
host="localhost",
db="fdb",
user="sysdba",
returncode=0,
error="",
query="SELECT * FROM TABLE",
params=(),
data=[
{"maker": "B", "model": 1121, "type": "PC"},
{"maker": "A", "model": 1232, "type": "PC"},
],
)
- Error
CompletedTransaction(
host="localhost",
db="fdb",
user="sysdba",
returncode=1,
error="Dynamic SQL Error\nSQL error code = -204\nTable unknown\nTABLE\nAt line 1, column 15\n",
query="SELECT * FROM TABLE",
params=(),
data=[],
)
Reuse connection
conn = connection(
host="localhost",
db="fdb",
user="sysdba",
passwd=getenv("FB_PASSWORD"),
)
execute(use_conn=conn, query="SELECT * FROM TABLE")
...
callproc(use_conn=conn, procname="PROCNAME", params=(...))
...
conn.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
Built Distribution
File details
Details for the file firebirdsql-run-0.0.1a6.tar.gz
.
File metadata
- Download URL: firebirdsql-run-0.0.1a6.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.10 Linux/5.15.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72343c0b7b461f8fd2eaaa38fee768a3a63d042576e3957a807b561141f25058 |
|
MD5 | 0b187a0fd8123b19619b1f6c72e29070 |
|
BLAKE2b-256 | 6a8933732ac1eb870f030b3401ce756a46c80c253cecca023c3745f039be5e34 |
File details
Details for the file firebirdsql_run-0.0.1a6-py3-none-any.whl
.
File metadata
- Download URL: firebirdsql_run-0.0.1a6-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.10 Linux/5.15.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a079a34176a933073bdf5682a9fa469b7159a20735cb1a94d814ed8d2e19e02 |
|
MD5 | 9b731f5308edf036f6de98a5edea3dde |
|
BLAKE2b-256 | 2ced5c2a64b81eb72aae8c9964131cd4188d478a8c77ccc5734f161f99c39906 |