Python

Python SDK allows to use the Smabbler API in the Python environment.

To add the Python SDK, add the following to the requirements.txt:

--extra-index-url https://pkgs.dev.azure.com/Smabbler/Smabbler.Sdk/_packaging/smabblersdkfeed/pypi/simple/
smabbler-api-client>=2.1.2

Usage example for getting algorithm versions (/algorithm/versions endpoint):

from pprint import pprint
import smabbler.api.client


def main():
    configuration = smabbler.api.client.Configuration()
    configuration.api_key['api_key'] = '{Your ApiKey}'

    get_versions(configuration)


def get_versions(configuration):
    with smabbler.api.client.ApiClient(configuration) as api_client:
        api_instance = smabbler.api.client.DefaultApi(api_client)

        api_response = api_instance.algorithm_versions_get()
        print("Algorithm versions: ")
        pprint(api_response)


if __name__ == '__main__':
    main()

You can find another usage example here.

Last updated