Skip to main content

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.

"Buy Me A Coffee"

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-sapcommissions-1.2.1.tar.gz (32.8 kB view hashes)

Uploaded Source

Built Distribution

python_sapcommissions-1.2.1-py3-none-any.whl (28.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page