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-1.0.2a1.tar.gz
.
File metadata
- Download URL: firebirdsql_run-1.0.2a1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 500bc53da2a1a942100bee4d3a6486893536d284b83d3bf062178ea014db779a |
|
MD5 | e91379afe65f0dac004c8bd36924e999 |
|
BLAKE2b-256 | 089014c46190fc665f45ae3109b1b7cf28766ea96d6ee716f2ded20e535f4c01 |
File details
Details for the file firebirdsql_run-1.0.2a1-py3-none-any.whl
.
File metadata
- Download URL: firebirdsql_run-1.0.2a1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60653cff4f82094be5555fdc84164a03a059878736e45b3808e118d6d3d1d2e7 |
|
MD5 | 061c56316c3e40537b5bf3592e7221c7 |
|
BLAKE2b-256 | 6a715f5fc1c7ecba430a4534b2cd181381f88a458b8e5b404073fecb4c618d39 |