Skip to main content

Firebirdsql wrapper inspired by subprocess.run

Project description

firebirdsql-run

Firebirdsql wrapper inspired by subprocess.run

PyPI version CI/CD CodeQL pre-commit.ci status codecov

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


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.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

firebirdsql_run-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file firebirdsql-run-1.0.0.tar.gz.

File metadata

  • Download URL: firebirdsql-run-1.0.0.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

Hashes for firebirdsql-run-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e916fb672c41eb5489aebd54b9d739ee8feddf77509858f4d3e55d011ae6366b
MD5 5ac6f71bf73ebd2f8180779a420eeab1
BLAKE2b-256 b084555d529286fcc7b638a4319bcb4f56b1b09d00bf9c1855a9d118a20364f8

See more details on using hashes here.

File details

Details for the file firebirdsql_run-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: firebirdsql_run-1.0.0-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

Hashes for firebirdsql_run-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce3c9f95740ef46453013b8256f1f990fa0e17f140d030cc86ede68e12c2b9d7
MD5 d8dc8f0045057622d989c6edef80c733
BLAKE2b-256 67b13aa4de0d914489883f36866315a67f6883ae6ca4e8e4b297e8c09e296e22

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page