Skip to content

machacekondra/requests-sap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

requests-sap

A plugin to support SAP launchpad authentication in Python Requests.

Usage

import json
import os
import requests

from requests_sap import SAPAuth

r = requests.get(
    "https://launchpad.support.sap.com/services/odata/svt/swdcuisrv/ObjectSet('0030000000103162022')",
    auth=SAPAuth(username=os.environ['LP_USERNAME'], password=os.environ['LP_PASSWORD']),
    headers={'Accept': 'application/json'}
)

data = json.loads(r.text)
print(data['d']['Title'] + ' is ' + data['d']['Status'])

Output:

SAP HANA Platform Edt. 2.0 SPS05 rev57 Linux x86_64 is AVAILABLE

Release

To build the project run:

make dist

To upload the project to pypi

make upload

About

SAP auth handler for python requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published