SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Create an Application with Cloud Foundry Python Buildpack

Create a simple Python application and enable services for it, by using the Cloud Foundry Python Buildpack and Cloud Foundry Command Line Interface (cf CLI).

Overview

🎓 beginner 45 min. PythonBeginnerSAP BTP Cloud Foundry EnvironmentSAP HANASAP BTP Cockpit

You will learn

  • โœ”How to create a simple “Hello World” application in Python
  • โœ”How to consume an SAP BTP service from it
  • โœ”How to run authentication and authorization checks via the Authorization and Trust Management (XSUAA) service
Gergana Coffman G Gergana Coffman June 4, 2026
Created by July 14, 2023
Contributors

Prerequisites

Prerequisites

Steps

Intro

This tutorial will guide you through creating and setting up a simple Python application by using cf CLI. You will start by building and deploying a web application that returns simple data โ€“ a Hello World! message. This simple app will consume the SAP HANA Cloud service, and then will be invoked through a web microservice (application router). Finally, you will set authentication and authorization checks to properly access your web application.


Step 1 Create an SAP HANA Cloud instance
โ€”

You need to fulfill this prerequisite step first in order to create an SAP HANA Cloud service instance later.

  1. Open the SAP BTP cockpit.

  2. Navigate to your global account. If you’re using a trial SAP BTP account, just go the main screen.

  3. From the left-side menu, choose Boosters.

  4. Find the Set Up SAP HANA Cloud Administration Tools tile and choose Start.

    Your SAP HANA Cloud database is created for you.

  5. Now go to your subaccount. If you’re using a trial SAP BTP account, choose trial.

  6. From the left-side menu, choose Services -> Instances and Subscriptions.

    The top table shows that you’re subscribed for the SAP HANA Cloud application with plan tools.

  7. Choose Go to Application.

    The SAP HANA Cloud Central portal is opened.

  8. Now you need to create an SAP HANA Cloud instance. Choose Create Instance.

  9. Choose SAP HANA Cloud, SAP HANA Database and then Next Step.

  10. Enter an instance name and a password for your DBADMIN user. Choose Next Step.

  11. For the next two screens of the wizard, keep choosing Next Step without making any changes.

  12. On the SAP HANA Database Advanced Settings wizard page:

    • Select Allow all IP addresses.

    • In the Instance Mapping section, choose Add Mapping.

    • For Environment Instance ID, enter your org ID. You can find it on your subaccount (or trial) page in the cockpit.

    • Choose Next Step.

  13. Skip Data Lake and choose Review and Create.

  14. If everything looks fine to you, choose Create Instance.

    Your new SAP HANA Cloud instance is in status Starting. Wait until it changes to Running.

Next Steps! You can move on with the rest of the tutorial. From now on, you will only need a command-line console and IDE.

Step 2 Log on to SAP BTP
+
Step 3 Create a Python application
+
Step 4 Consume SAP BTP services
+
Step 5 Run an Authentication Check
+
Step 6 Run an Authorization Check
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 6
1. Create an SAP HANA Cloud instance 2. Log on to SAP BTP 3. Create a Python application 4. Consume SAP BTP services 5. Run an Authentication Check 6. Run an Authorization Check

Learn more →