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.2.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file firebirdsql_run-1.0.2.tar.gz
.
File metadata
- Download URL: firebirdsql_run-1.0.2.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 | 484ac48de265693189eaba5f64da3e4b98e80b5c55db525aa56925f2e2e25214 |
|
MD5 | 19b10091657c6ad7d8babe79d939d931 |
|
BLAKE2b-256 | 08c7c725ba73288c1c9610f24ea95602e2eb60f5ce8fdecd941f8b2cc5335bd8 |
File details
Details for the file firebirdsql_run-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: firebirdsql_run-1.0.2-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 | 2a6d745799419c747cdbac4c4d488e1f9c7314eae0303134f3e70d236b4de937 |
|
MD5 | 740448a97696f9f733a5994d1baa1d44 |
|
BLAKE2b-256 | 3c7556283f0ad6635b9897f87fbfddd40908b2fb8d4069c9532fce31f3f69ccd |