Connect Using the SAP HANA Python Interface
January 12, 2021
Beginner
15 min.
Create and debug a Python application that connects to SAP HANA using the SAP HANA client.
You will learn
- How to install Python and the SAP HANA client Python driver
- How to create and debug a Python application that queries a SAP HANA database
Prerequisites
- You have completed the first 3 tutorials in this mission.
In the 2020 Stack Overflow’s annual developer survey, Python ranked 4th in the Most Popular Technologies section. For further information on Python, see Introduction to Python 3.
The SAP HANA client for Python supports Python 3.4+ and Python 2.7. For further details see SAP note 3006307 - SAP HANA Client Supported Platforms for 2.7.
The following steps will create a simple Python app that can connect to and query an SAP HANA database.
Step 1: Install Python
Step 2: Install SAP HANA client for Python using pip and PyPI
Step 3: Create Python application that queries SAP HANA
Step 4: Debug the application