skillfed

pyhdb

SAP HANA Database Client for Python

pyhdb v0.3.4 76.1K downloads/30d#14,654 on PyPI318
Permissive license Apache License Version 2.0 Abandoned released

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 pyhdb

uv

uv add pyhdb

poetry

poetry add pyhdb

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: Implementation :: PyPyProgramming Language :: SQLTopic :: DatabaseTopic :: Database :: Front-EndsTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python Modules

Tags

SAP HANA database clientHANA SQL connection Pythondatabase adapter DBAPISAP HANA driverpure Python database clientHANA cursor executedatabase connection
database-driversap-hanaabandoned

More Software Development packages