SAP Destination SDK for Cloud Foundry
Project description
SAP Cloud Foundry Destination
sap-cf-destination is as open-source destination client built on top of HTTPX to connect to HTTP remote-services using destination when deploying your python application on BTP.
Install sap-cf-destination using
$ pip install sap-cf-destination
Pre-requisites:
- Access to BTP subaccount with permission to create destinations.
- Cloud Foundry space with instances of Destination service and connectivity service (only for on-premise destinations).
Note: On-Premise destinations requires cloud-connector to be set-up in the BTP subaccount.
Now, lets get started:
from sap_cf_destination import Destination
dest = Destination("<Destination Name>")
client = dest.get_client() # HTTPX client with preconfigured base-url and headers from destination configuration
response = client.get("/").json()
The library also supports async clients
client = dest.get_aclient()
response = await client.get("/").json()
Only the following Authentication type are supported:
- NoAuthentication
- BasicAuthentication
- OAuth2ClientCredentials
- PrincipalPropagation
and the following Proxy types are supported:
- Internet
- OnPremise
Environment Variables
The library supports service binding and retrieves the instance credentials from VCAP_SERVICES. It also supports providing destinations as a list of dictionary in the environment varibales, this is useful when testing the application locally. The following parameters are supported:
| Description | |
|---|---|
| name | Destination Name |
| url | URL to remote service |
| proxy_type | Internet or OnPremise |
| authentication | Authentication used by remote service currently only the following authentication types are supported: NoAuthentication, BasicAuthentication |
| username | username for Basic authentication |
| password | password for Basic authentication |
| forwardAuthToken | true or false |
| proxyHost | proxy host for on-premise services |
| proxyPort | proxy port for on-premise services |
| timeout | request timeout |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sap_cf_destination-0.1.2.tar.gz.
File metadata
- Download URL: sap_cf_destination-0.1.2.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c4753b51806e45157ddb9cf652b1907187e07a96ba43f806ed829d58845275c
|
|
| MD5 |
f106548ba8209d196b8cbf3192df1da9
|
|
| BLAKE2b-256 |
3d1c50a042d4f77572be84c1805e9a8d50952111a9ea3e155fbbcb5cb4c7b4dc
|
File details
Details for the file sap_cf_destination-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sap_cf_destination-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c971d4eda38229bb15b32660a823273eb8e10b15f14074d1cf385339cc4eabb4
|
|
| MD5 |
eebba36723d948827a19d84213660e55
|
|
| BLAKE2b-256 |
1513726788e9a8e8b460c5e9fd153666c118eff1f520f3d495d6263012f6a431
|