PyHDB is a pure Python client library for connecting to SAP HANA databases. It implements the SAP HANA database protocol (based on Python DB API 2.0) and supports features like LOBs, geometry types, procedures with resultsets, and SELECT FOR UPDATE. The current version is 0.3.4, released in December 2016 with bug fixes. The project is in maintenance mode with no recent releases.
pip install pyhdbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connect to SAP HANA and run a simple query.
Switch to 'pip install hdbcli' and use 'from hdbcli import dbapi'.
Install or update 'six' to the latest version.
Verify the correct HANA port with your administrator. Common ports: 30015 (MDC), 39013 (tenant DB).
Use connection.connect() after creating the Connection object.
Run 'pip install pyhdb'. If in a virtual environment, ensure it is activated.
Check host and port values. Use 'telnet <host> <port>' to verify connectivity. Ensure the HANA instance is running and listening.
Use 'from pyhdb import Connection' then 'conn = Connection(...).connect()'.