Skip to main content


In this example, we will go over the steps required to implement Superface into your Python application development workflow.

Have you created Comlinks?

This guide assumes that you have already installed and run the Superface CLI to generate the Comlinks for the API integration you want to work with.

Install OneSDK

python -m pip install one-sdk

Finally, create a new file called, or open whichever file you want to include your integration code in.

If you created your Comlinks with the Superface CLI in a different folder, please move them to a superface folder at the root of your application. The following files are expected by OneSDK.

└── superface/ - directory with all the Comlinks in project root
├── <profileScope>.<profileName>.<providerName>.map.js
├── <profileScope>.<profileName>.profile
├── <providerName>.provider.json
└── ...repeat for all the Comlinks

Add the OneSDK function
import sys

from one_sdk import OneClient, PerformError, UnexpectedError

client = OneClient()

profile = client.get_profile("<profileName>")
use_case = profile.get_usecase("<usecaseName>")
r = use_case.perform(
# Input parameters as defined in profile:
'<key>': '<value>'
provider = '<providerName>',
# Provider specific integration parameters:
parameters = {
'<integrationParameterName>': '<integrationParameterValue>'
security = {
# Provider specific security values:
'<securityValueId>': {
# Security values as described in provider or on profile page
print(f"RESULT: {r}")
except PerformError as e:
print(f"ERROR RESULT: {e.error_result}")
except UnexpectedError as e:
print(f"ERROR: {e}", file=sys.stderr)
except Exception as e:
raise e

Run the code

python __main.py__