{"id":28498148,"url":"https://github.com/deadnews/firebirdsql-run","last_synced_at":"2025-07-03T13:32:21.872Z","repository":{"id":48011096,"uuid":"516373302","full_name":"DeadNews/firebirdsql-run","owner":"DeadNews","description":"Firebirdsql wrapper inspired by subprocess.run","archived":false,"fork":false,"pushed_at":"2025-04-26T11:52:57.000Z","size":617,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-08T13:43:29.040Z","etag":null,"topics":["api","firebird","sql"],"latest_commit_sha":null,"homepage":"https://deadnews.github.io/firebirdsql-run","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeadNews.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-21T13:01:24.000Z","updated_at":"2025-04-05T05:52:07.000Z","dependencies_parsed_at":"2023-09-24T02:47:44.488Z","dependency_job_id":"3d745691-486a-4225-828e-39434b6b8302","html_url":"https://github.com/DeadNews/firebirdsql-run","commit_stats":{"total_commits":51,"total_committers":4,"mean_commits":12.75,"dds":0.5686274509803921,"last_synced_commit":"acadc743e75bc34bcfe8c9b5ac1af3bff26693a0"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/DeadNews/firebirdsql-run","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeadNews%2Ffirebirdsql-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeadNews%2Ffirebirdsql-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeadNews%2Ffirebirdsql-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeadNews%2Ffirebirdsql-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeadNews","download_url":"https://codeload.github.com/DeadNews/firebirdsql-run/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeadNews%2Ffirebirdsql-run/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263335468,"owners_count":23450851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","firebird","sql"],"created_at":"2025-06-08T13:36:56.197Z","updated_at":"2025-07-03T13:32:21.842Z","avatar_url":"https://github.com/DeadNews.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# firebirdsql-run\n\n\u003e [Firebirdsql](https://github.com/nakagami/pyfirebirdsql/) wrapper inspired by [subprocess.run](https://docs.python.org/3/library/subprocess.html#subprocess.run)\n\n[![PyPI: Version](https://img.shields.io/pypi/v/firebirdsql-run?logo=pypi\u0026logoColor=white)](https://pypi.org/project/firebirdsql-run)\n[![GitHub: Release](https://img.shields.io/github/v/release/deadnews/firebirdsql-run?logo=github\u0026logoColor=white)](https://github.com/deadnews/firebirdsql-run/releases/latest)\n[![Documentation](https://img.shields.io/badge/documentation-gray.svg?logo=materialformkdocs\u0026logoColor=white)](https://deadnews.github.io/firebirdsql-run)\n[![CI: pre-commit](https://results.pre-commit.ci/badge/github/DeadNews/firebirdsql-run/main.svg)](https://results.pre-commit.ci/latest/github/deadnews/firebirdsql-run/main)\n[![CI: Main](https://img.shields.io/github/actions/workflow/status/deadnews/firebirdsql-run/main.yml?branch=main\u0026logo=github\u0026logoColor=white\u0026label=main)](https://github.com/deadnews/firebirdsql-run/actions/workflows/main.yml)\n[![CI: Coverage](https://img.shields.io/codecov/c/github/deadnews/firebirdsql-run?token=OCZDZIYPMC\u0026logo=codecov\u0026logoColor=white)](https://app.codecov.io/gh/deadnews/firebirdsql-run)\n\n**[Installation](#installation)** • **[Examples](#examples)** • **[Env Variables](#env-variables)**\n\n## Installation\n\n```sh\npip install firebirdsql-run\n# or\npoetry add firebirdsql-run\n```\n\n## Examples\n\nExecute a query with read-only access:\n\n```py\nfrom firebirdsql_run import DBAccess, execute\n\n# Execute a query with read-only access.\nresult = execute(query=\"SELECT * FROM table\", db=\"database\", access=DBAccess.READ_ONLY)\n\n# Output: List of dictionaries containing the query results.\nprint(result.data)\n```\n\nExecute a query with parameters and log the result:\n\n```py\n# Execute a query with parameters.\nresult = execute(query=\"INSERT INTO customers (name, age) VALUES (?, ?)\", params=(\"John\", 25))\n\n# Log the result.\nif result.returncode != 0:\n    logger.error(result)\nelse:\n    logger.info(result)\n```\n\nExecute a query using the existing connection:\n\n```py\n# Create a connection object.\nconn = connection(db=\"database\", access=DBAccess.READ_ONLY)\n# Execute a query using the existing connection.\nresult = execute(query=\"SELECT * FROM table\", use_conn=conn)\n# Close the connection.\nconn.close()\n\n# Output: Named tuple representing the completed transaction.\nprint(result)\n```\n\nAn example of a successful transaction:\n\n```py\n\u003e\u003e\u003e print(result)\nCompletedTransaction(\n    host=\"127.0.0.1\",\n    db=\"database\",\n    user=\"TWUSER\",\n    access=\"READ_ONLY\",\n    returncode=0,\n    exception=\"\",\n    query=\"SELECT * FROM table\",\n    params=(),\n    time=0.001,\n    data=[\n        {'id': 1, 'name': 'John Doe', 'department': 'Sales'},\n        {'id': 2, 'name': 'Jane Smith', 'department': 'Sales'},\n    ],\n)\n```\n\nAn example of a failed transaction:\n\n```py\n\u003e\u003e\u003e print(result)\nCompletedTransaction(\n    host=\"127.0.0.1\",\n    db=\"database\",\n    user=\"TWUSER\",\n    access=\"READ_ONLY\",\n    returncode=1,\n    exception=\"Dynamic SQL Error\\nSQL error code = -204\\nTable unknown\\ntable\\nAt line 1, column 15\\n\",\n    query=\"SELECT * FROM table\",\n    params=(),\n    time=0.001,\n    data=[],\n)\n```\n\n## Env Variables\n\n```ini\nFIREBIRD_KEY=\n```\n\nThe `FIREBIRD_KEY` environment variable can be overridden with the functions argument `passwd`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadnews%2Ffirebirdsql-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeadnews%2Ffirebirdsql-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadnews%2Ffirebirdsql-run/lists"}