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
firebirdsql-run-1.0.1.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file firebirdsql-run-1.0.1.tar.gz
.
File metadata
- Download URL: firebirdsql-run-1.0.1.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 | 73953d86e35c81ab18fc759a08d4fd95bb1b511122d3a17dd9e2ba034fd9c0d3 |
|
MD5 | a7d00664a624e550109c5f3cbab11f51 |
|
BLAKE2b-256 | 70f7a3c3ab462584b60c540648138184672e63214031945c49d8c26a4d73b26d |
File details
Details for the file firebirdsql_run-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: firebirdsql_run-1.0.1-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 | ee1cfb75d138ca131ea71cfa7b5f45b7b7f53d183228cfca7a23c01fa57497df |
|
MD5 | 498979ae4f59497d1c848fb4c71b3766 |
|
BLAKE2b-256 | 92fc85c96d901a4f2cd91d1fe599a62221ff56473d81238aaa5bdbd7c726df06 |