hdbcli
SAP HANA Python Client
What it is and what it does
hdbcli is the official SAP HANA Python client, implementing the PEP 249 database API standard to enable Python applications to connect to and query SAP HANA databases. It supports both SAP HANA Cloud (port 443 with automatic encryption) and on-premise deployments (port 3NN13/3NN15), and provides cursor-based query execution with parameterized statement binding (both positional and named parameters). The driver is distributed as compiled wheels for multiple platforms and architectures, with no additional runtime dependencies beyond Python itself.
The package is production-stable and actively maintained, with support for modern Python versions. A key deviation from PEP 249 is that autocommit is enabled by default rather than disabled, which may affect transaction handling expectations. It is licensed under SAP's proprietary Developer License Agreement, making it suitable for development and evaluation but requiring explicit license review for production or commercial use.
Use it for:
- Extract data from SAP HANA Cloud or on-premise databases for analytics, reporting, or ETL pipelines in Python applications.
- Build Python-based data integration layers that read from or write to SAP HANA as part of enterprise data workflows.
- Develop administrative or monitoring scripts that connect to HANA instances to execute DDL/DML operations programmatically.
- Prototype or test SAP HANA applications locally before deployment to production SAP environments.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A PEP 249-compliant Python database driver for connecting to and querying SAP HANA databases, supporting both cloud and on-premise instances with parameterized queries and cursor-based result handling.
Yes, if you need to connect Python to SAP HANA and accept the proprietary license terms. The driver is stable, actively maintained, and has no external dependencies. However, verify license compliance for your use case (development vs. production) before committing to production deployments, and confirm Python version compatibility with your environment.
Install
hdbcli on PyPI
pip
pip install hdbcliuv
uv add hdbclipoetry
poetry add hdbcliInstalling hdbcli
Before you install
Medium install friction due to compiled binary wheels for specific platforms (macOS, Linux, Windows). Actively maintained with a recent release 36 days ago. No runtime dependencies simplifies integration.
License in practice
Licensed under SAP Developer License Agreement with proprietary terms. Use is restricted to development and subject to SAP's product use and support terms for on-premise customers. Commercial or production use requires explicit license compliance review.
Quickstart
pip install hdbcli
from hdbcli import dbapi
conn = dbapi.connect(address="hana-host", port=3MM, user="user", password="pass")
cursor = conn.cursor()
cursor.execute("SELECT * FROM table")
for row in cursor:
print(row)
Requires a reachable SAP HANA instance (cloud or on-premise) with valid credentials and appropriate port access (443 for cloud, 3NN13/3NN15 for on-premise).
Verify before relying
- Whether the SAP Developer License Agreement permits use in production environments or only development.
- Specific Python version minimum requirement (classifiers list 3.10–3.14 but requires_python is unspecified).
- Whether autocommit-by-default behavior differs from PEP 249 in ways that affect existing code patterns.
Package facts
| License | SAP DEVELOPER LICENSE AGREEMENT (unclear) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 36 days since the last release |
| First released | |
| Downloads | 3,322,513/month — #2,660 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hdbcli-2.29.25-cp310-abi3-macosx_13_0_arm64.whl; hdbcli-2.29.25-cp310-abi3-macosx_13_0_x86_64.whl; hdbcli-2.29.25-cp310-abi3-manylinux2014_aarch64.whl; hdbcli-2.29.25-cp310-abi3-manylinux2014_ppc64le.whl; hdbcli-2.29.25-cp310-abi3-manylinux2014_x86_64.whl; hdbcli-2.29.25-cp310-abi3-musllinux_1_2_x86_64.whl; hdbcli-2.29.25-cp310-abi3-win32.whl; hdbcli-2.29.25-cp310-abi3-win_amd64.whl
Keywords: SAP, HANA, client, in-memory, database, SQL, cloud, business, application, intelligent, enterprise, AI, artificial, intelligence, analytics, experience
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
hana-mlConnects Python to SAP HANA to build machine…
unclear · top 15,000 on PyPI
pyhdbA pure Python client library for connecting to…
permissive · top 15,000 on PyPI
sqlalchemy-hanaProvides a SQLAlchemy dialect that enables you…
permissive · top 15,000 on PyPI
ydb-dbapiA Python DBAPI driver for YDB that provides…
unclear · top 5,000 on PyPI
databend-driverPython client library for connecting to…
permissive · top 15,000 on PyPI
pyathenajdbcPyAthenaJDBC wraps the Amazon Athena JDBC…
permissive · top 15,000 on PyPI
impylaimpyla is a Python DB API 2.0-compliant client…
permissive · top 5,000 on PyPI
firebolt-sdkFirebolt-sdk provides a Python DB API…
permissive · top 15,000 on PyPI
dmpythondmPython is a native Python driver for…
permissive · top 15,000 on PyPI
oracledbA Python driver for connecting to Oracle…
unclear · top 1,000 on PyPI