A Python wrapper for the SAP Commissions API
Project description
SAP Commissions
A Python wrapper for the SAP Commissions API.
If you like this project, please consider to BuyMeACoffee or contact me directly.
Installation
To install the project, run the following command:
pip install python-sapcommissions
REST API
This project mimics the usage of the SAP Commissions REST API. Visit
https://{TENANT}.callidusondemand.com/APIDocument
to read the full specification, replacing TENANT
with your
tenant-id.
Terminology
Things to keep in mind while reading the documentation.
Keyword | Description |
---|---|
Endpoint | A type of object that you can interact with, like Participants and Positions . |
Method | An action to perform on an endpoint, like list() and get_id() . |
Resource | An instance of an endpoint, like Participant and Position . |
Usage
To get started, import Connection
and an endpoint of your choosing. In this example, we'll use Participants
.
from sapcommissions import Connection
from sapcommissions.endpoints import Participants
Initialize a Connection by providing the tenant, username, and password. Optionally, you can disable ssl verification, if you are having problems connecting to the API from your network.
prod = Connection("CALD-PRD", "MyUserName", "MySuperSecretPassword", verify_ssl=True)
In this example we will use the Participants
endpoint to get a list of all participants from the system. The list()
method returns a generator
object, to retrieve all Participants
, you can convert the generator to a list
,
processes the Participants
one-by-one in a for-loop
or use a list comprehension to extract neccecery properties.
participants = Participants(prod).list()
# Convert to list
all_users = list(participants)
# For loop
for participant in participants:
... # Do something
# List Comprehension
participant_ids = [participant.payeeId for participant in participants]
Endpoints
Endpoints are the objects you can interact with, like Participants
, Positions
, Credits
or Pipelines
. For a full
list of endpoints and their associated methods, please read the Endpoints documentation.
Methods
Methods are the actions you can perform on an endpoint, like list()
, get()
and create()
. You'll find links to the
associated methods in the Endpoints documentation. For a full list of available methods, please read the
Methods documentation.
Legal Disclaimer
This software is designed for use with SAP® Commissions.
SAP Commissions is the trademark or registered trademark of SAP SE or its affiliates in Germany and in other countries.
The developers take no legal responsibility for the functionality or security of your SAP Commissions environment.
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
Hashes for python-sapcommissions-1.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89121cad2f240939ff628f5d1e85fbb3f9ac20d358323c50391bff9dff1e50b2 |
|
MD5 | b5249dda6ae1039917c08f9bd091f076 |
|
BLAKE2b-256 | d60c5742f3936dd39958b2628d7c182483974474568b3153eea280aeca16343c |
Hashes for python_sapcommissions-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3d11fee3e3e3db6c33615266023c823af9cb0f6a28f0ec46c4e4a893ebf5246 |
|
MD5 | 9cf42b51522633a57c685a8f89d9570a |
|
BLAKE2b-256 | c6c0ff8cb66bd9338dd1c8fbba3b10847298b247adacc100dc5ecdfc32a0829f |