pyhdb
SAP HANA Database Client for Python
What it is and what it does
pyhdb is a pure Python client for SAP HANA databases that implements the DBAPI Specification v2.0 (PEP 249). It allows Python applications to connect to a HANA server, execute SQL queries, and retrieve results through a standard cursor interface. The package supports basic authentication, DDL and DML operations, transaction control via commit and rollback, and LOB (Large Object) handling for binary and text data with lazy loading.
The package is no longer maintained: the repository was archived and the last release was 2018-02-16. It targets Python 2.7, 3.3, 3.4, 3.5, which are now end-of-life. While it has no external runtime dependencies and remains available on PyPI, using it in production requires either running on a legacy Python version or undertaking significant porting work.
Use it for:
- Connect a Python application to an existing SAP HANA database for data retrieval and reporting.
- Execute parameterized SQL queries and fetch results using the standard DBAPI cursor interface.
- Handle large text or binary data (LOBs) stored in HANA with file-like read/seek operations.
- Call stored procedures in SAP HANA with scalar input and output parameters.
- Manage transactions across multiple cursor operations on the same connection.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pure Python client library for connecting to and querying SAP HANA databases using the DBAPI 2.0 interface, supporting SQL execution, cursor operations, and LOB handling.
No. The package is abandoned (last updated 2018-02-16, repository archived) and targets obsolete Python versions. It will not run on current Python without porting. If you are locked into legacy Python or maintaining legacy code, it may work, but for any new project or modern environment, seek a maintained SAP HANA client library.
Install
pyhdb on PyPI
pip
pip install pyhdbuv
uv add pyhdbpoetry
poetry add pyhdbInstalling pyhdb
Before you install
High install friction: the package is abandoned (last commit 2021-05-04, archived repository) and has not been updated since 2018-02-16. No runtime dependencies, but the codebase targets obsolete Python versions and will not function on modern Python without significant porting work.
License in practice
Licensed under Apache License Version 2.0 (permissive), allowing commercial and private use with minimal restrictions. No licensing barrier to adoption, but the abandoned status is a more pressing concern than the license terms.
Quickstart
pip install pyhdb
import pyhdb
connection = pyhdb.connect(
host="example.com",
port=30015,
user="user",
password="secret"
)
cursor = connection.cursor()
cursor.execute("SELECT 'Hello Python World' FROM DUMMY")
print(cursor.fetchone())
connection.close()
Requires a running SAP HANA database instance accessible at the specified host and port. Package targets Python 2.6, 2.7, 3.3, 3.4 and will not run on later versions.
Verify before relying
- Whether the codebase can be successfully installed and run on modern Python versions without modification.
- Current state of compatibility with modern SAP HANA server versions and protocol changes since 2018.
- Whether any community forks or maintained alternatives exist for current Python environments.
Package facts
| License | Apache License Version 2.0 (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,101 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 76,115/month — #14,654 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyhdb-0.3.4.tar.gz
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
hdbcliA PEP 249-compliant Python database driver for…
unclear · top 5,000 on PyPI
ydb-dbapiA Python DBAPI driver for YDB that provides…
unclear · top 5,000 on PyPI
pydynamodbPyDynamoDB is a DB API 2.0 client for Amazon…
permissive · top 15,000 on PyPI
hana-mlConnects Python to SAP HANA to build machine…
unclear · top 15,000 on PyPI
sqlalchemy-hanaProvides a SQLAlchemy dialect that enables you…
permissive · top 15,000 on PyPI
dbapiCommand-line client for interacting with Douban…
permissive · top 15,000 on PyPI
databricks-dbapiProvides a DBAPI 2.0 connection interface and…
permissive · top 15,000 on PyPI
intersystems-irispythonProvides Python bindings to connect to and…
unclear · top 15,000 on PyPI
pyodatapyodata is a Python client library that…
permissive · top 15,000 on PyPI
impylaimpyla is a Python DB API 2.0-compliant client…
permissive · top 5,000 on PyPI