Skip to main content

Syntropy SDK for Python

Project description

Tests PyPi

Syntropy SDK

Syntropy SDK for Python allows you to manage Syntropy Networks using simple Python interface.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 0.1.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 3.6+

Installation & Usage

pip install

Install the SDK simply using pip:

pip install syntropy_sdk

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/SyntropyNet/syntropy-python-sdk.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/SyntropyNet/syntropy-python-sdk.git)

Then import the package:

import syntropy_sdk 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import syntropy_sdk

Getting Started

Please follow the installation procedure and then use the following as a reference:

from __future__ import print_function
import time
import syntropy_sdk
from syntropy_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
code = 'code_example' # str | Account deletion code (received by mail).

try:
    api_response = api_instance.delete_account(code)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->delete_account: %s\n" % e)

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | Email verification code (received by mail).

try:
    api_response = api_instance.deprecated_verify_email(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->deprecated_verify_email: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
ip = 'ip_example' # str | 

try:
    api_response = api_instance.geo_ip(ip)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->geo_ip: %s\n" % e)

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_response = api_instance.local(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->local: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))

try:
    api_instance.logout()
except ApiException as e:
    print("Exception when calling AuthApi->logout: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_response = api_instance.pair_latency_test_report(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->pair_latency_test_report: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = [syntropy_sdk.UserPairLatencyTestReportObject()] # list[UserPairLatencyTestReportObject] | 

try:
    api_response = api_instance.pair_latency_test_report_bulk(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->pair_latency_test_report_bulk: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_response = api_instance.pair_speedtest_report(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->pair_speedtest_report: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_response = api_instance.provider_attach(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->provider_attach: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_response = api_instance.provider_detach(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->provider_detach: %s\n" % e)

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_response = api_instance.provider_login(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->provider_login: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 
attach = syntropy_sdk.AutoAttach() # AutoAttach |  (optional)

try:
    api_response = api_instance.provider_register(body, attach=attach)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->provider_register: %s\n" % e)

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
refresh_token = 'refresh_token_example' # str | 

try:
    api_response = api_instance.refresh(refresh_token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->refresh: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 
ref = syntropy_sdk.MailBodyTemplates() # MailBodyTemplates |  (optional)

try:
    api_response = api_instance.register(body, ref=ref)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->register: %s\n" % e)

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_response = api_instance.reset_password(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->reset_password: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
ref = syntropy_sdk.MailBodyTemplates() # MailBodyTemplates |  (optional)

try:
    api_response = api_instance.set_delete_account_code(ref=ref)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->set_delete_account_code: %s\n" % e)

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 
ref = syntropy_sdk.MailBodyTemplates() # MailBodyTemplates |  (optional)

try:
    api_response = api_instance.set_reset_password_code(body, ref=ref)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->set_reset_password_code: %s\n" % e)

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 
ref = syntropy_sdk.MailBodyTemplates() # MailBodyTemplates |  (optional)

try:
    api_response = api_instance.set_verify_email_code(body, ref=ref)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->set_verify_email_code: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_response = api_instance.speedtest_report(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->speedtest_report: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))

try:
    api_response = api_instance.user()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->user: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 
ref = syntropy_sdk.MailBodyTemplates() # MailBodyTemplates |  (optional)

try:
    api_response = api_instance.user_change_email(body, ref=ref)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->user_change_email: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_instance.user_change_password(body)
except ApiException as e:
    print("Exception when calling AuthApi->user_change_password: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_instance.user_destroy(body)
except ApiException as e:
    print("Exception when calling AuthApi->user_destroy: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
body = NULL # dict(str, object) | 

try:
    api_response = api_instance.user_hosts_create(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->user_hosts_create: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
id = 1.2 # float | 

try:
    api_response = api_instance.user_hosts_destroy(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->user_hosts_destroy: %s\n" % e)

# Configure API key authorization: jwt
configuration = syntropy_sdk.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))

try:
    api_response = api_instance.user_hosts_index()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->user_hosts_index: %s\n" % e)

# create an instance of the API class
api_instance = syntropy_sdk.AuthApi(syntropy_sdk.ApiClient(configuration))
code = 'code_example' # str | Email verification code (received by mail).

try:
    api_response = api_instance.verify_email(code)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->verify_email: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
AuthApi delete_account GET /api/auth/delete-account/{code}
AuthApi deprecated_verify_email POST /api/auth/verify-email
AuthApi geo_ip GET /api/auth/{ip}/geoip
AuthApi local POST /api/auth/local/login
AuthApi logout POST /api/auth/logout
AuthApi pair_latency_test_report POST /api/auth/pair-latency-test-report
AuthApi pair_latency_test_report_bulk POST /api/auth/pair-latency-test-report/bulk
AuthApi pair_speedtest_report POST /api/auth/pair-speedtest-report
AuthApi provider_attach POST /api/auth/provider/attach
AuthApi provider_detach POST /api/auth/provider/detach
AuthApi provider_login POST /api/auth/provider/login
AuthApi provider_register POST /api/auth/provider/register
AuthApi refresh POST /api/auth/refresh-token
AuthApi register POST /api/auth/register
AuthApi reset_password POST /api/auth/reset-password
AuthApi set_delete_account_code POST /api/auth/send-delete-account-link
AuthApi set_reset_password_code POST /api/auth/send-reset-password-link
AuthApi set_verify_email_code POST /api/auth/send-verify-email-link
AuthApi speedtest_report POST /api/auth/speedtest-report
AuthApi user GET /api/auth/user
AuthApi user_change_email POST /api/auth/user/change-email
AuthApi user_change_password POST /api/auth/user/change-password
AuthApi user_destroy POST /api/auth/user/delete
AuthApi user_hosts_create POST /api/auth/user/hosts
AuthApi user_hosts_destroy DELETE /api/auth/user/hosts/{id}
AuthApi user_hosts_index GET /api/auth/user/hosts
AuthApi verify_email GET /api/auth/verify-email/{code}
PlatformApi config GET /api/platform/admin/agent/{agent_id}/config
PlatformApi create_agent_group POST /api/platform/network/{network_id}/agent-groups/{group_name}
PlatformApi create_api_key POST /api/platform/api-keys
PlatformApi create_connections POST /api/platform/connections
PlatformApi create_network POST /api/platform/networks
PlatformApi create_network_agents POST /api/platform/network/{network_id}/agents
PlatformApi delete_agents DELETE /api/platform/agents/{agent_id}
PlatformApi delete_api_key DELETE /api/platform/api-keys/{api_key_id}
PlatformApi delete_connection DELETE /api/platform/connections/{connection_id}
PlatformApi delete_networks DELETE /api/platform/networks/{network_id}
PlatformApi delete_networks_agent DELETE /api/platform/networks/{network_id}/agents/{agent_id}
PlatformApi find_all_name_id_pairs_by_user_id GET /api/platform/agents/id-name-pairs
PlatformApi get_agent_services_with_subnets GET /api/platform/agent-services
PlatformApi get_agent_tags GET /api/platform/agent-tags
PlatformApi get_connection_services GET /api/platform/connection-services
PlatformApi get_network_info GET /api/platform/network/{network_id}/info
PlatformApi index_agents GET /api/platform/agents
PlatformApi index_api_key GET /api/platform/api-keys
PlatformApi index_connections GET /api/platform/connections
PlatformApi index_networks GET /api/platform/networks
PlatformApi patch_agents PATCH /api/platform/agents/{agent_id}
PlatformApi remove_agent_group DELETE /api/platform/network/agent-groups/{group_id}
PlatformApi remove_network_agents DELETE /api/platform/network/{network_id}/agents
PlatformApi save_logs_read_timestamp POST /api/platform/logs-reads-timestamp
PlatformApi topology_networks GET /api/platform/networks/topology
PlatformApi update_agent_group PUT /api/platform/network/agent-groups/{group_id}
PlatformApi update_agent_services_subnets_status POST /api/platform/agent-services-subnets
PlatformApi update_api_key PATCH /api/platform/api-keys/{api_key_id}
PlatformApi update_connection_services POST /api/platform/connection-services
ProvidersApi create POST /api/providers
ProvidersApi destroy DELETE /api/providers/{id}
ProvidersApi index GET /api/providers
ProvidersApi show GET /api/providers/{id}
ProvidersApi update PATCH /api/providers/{id}

Documentation For Models

Documentation For Authorization

In order to use this SDK you must have a valid API Authorization token. This token can be obtained either by using AuthApi.local method or using the UI. This token should be passed to the configuration object like so:

configuration.api_key['Authorization'] = 'YOUR_API_KEY'

jwt

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

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

syntropy_sdk-0.1.0.tar.gz (107.5 kB view hashes)

Uploaded Source

Built Distribution

syntropy_sdk-0.1.0-py3-none-any.whl (374.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