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: 0.1.0
  • Package version: 0.4.3

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:

import syntropy_sdk as sdk
from syntropy_sdk.exceptions import ApiException
from syntropy_sdk.utils import WithRetry
from pprint import pprint

# Configure API
config = sdk.Configuration()
config.host = "url to the Syntropy Stack API"
config.api_key["api-key"] = "your api key"
api = sdk.ApiClient(config)

agents_api = sdk.AgentsApi(api)
try:
    api_response = WithRetry(agents_api.v1_network_agents_get)()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworkApi->v1_network_get: %s\n" % e)


# Create connections
connections_api = sdk.ConectionsApi(api)
try:
    body = sdk.V1NetworkConnectionsCreateP2PRequest(
        agent_pairs=[
            sdk.V1NetworkConnectionsCreateP2PRequestAgentPairs(agent_2_id=1, agent_1_id=0),
            sdk.V1NetworkConnectionsCreateP2PRequestAgentPairs(agent_2_id=2, agent_1_id=1),
            sdk.V1NetworkConnectionsCreateP2PRequestAgentPairs(agent_2_id=4, agent_1_id=2),
        ],
    )

    connections = connections_api.v1_network_connections_create_p2_p(body=body).data
except ApiException as e:
    print("Exception when creating a network: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.syntropystack.com

Class Method HTTP request Description
AgentsApi v1_network_agents_coordinates_search POST /v1/network/agents/coordinates/search Search Agent location coordinates
AgentsApi v1_network_agents_create POST /v1/network/agents Create Agent
AgentsApi v1_network_agents_delete DELETE /v1/network/agents/{agent_id} Delete Agent
AgentsApi v1_network_agents_filters_search POST /v1/network/agents/filters/search Search Agent filters
AgentsApi v1_network_agents_get GET /v1/network/agents Get Agents
AgentsApi v1_network_agents_logs_errors_search POST /v1/network/agents/logs/errors/search Search Agent error logs
AgentsApi v1_network_agents_logs_reads_timestamp_search POST /v1/network/agents/logs-reads-timestamp Save log read timestamp
AgentsApi v1_network_agents_logs_search POST /v1/network/agents/logs/search Search Agent logs
AgentsApi v1_network_agents_providers_get GET /v1/network/agents/providers Get Agent providers
AgentsApi v1_network_agents_remove POST /v1/network/agents/remove Delete Agents
AgentsApi v1_network_agents_search POST /v1/network/agents/search Search Agents
AgentsApi v1_network_agents_services_delete DELETE /v1/network/agents/services/{agent_service_subnet_id} Delete Agent service
AgentsApi v1_network_agents_services_get GET /v1/network/agents/services Get Agent services.
AgentsApi v1_network_agents_services_remove POST /v1/network/agents/services/remove Delete Agent services
AgentsApi v1_network_agents_services_update PATCH /v1/network/agents/services/bulk Update Agent services
AgentsApi v1_network_agents_settings_get GET /v1/network/agents/settings Get Agent settings
AgentsApi v1_network_agents_settings_update PATCH /v1/network/agents/settings Update Agent settings
AgentsApi v1_network_agents_tags_get GET /v1/network/agents/tags Get Agent tags
AgentsApi v1_network_agents_update PATCH /v1/network/agents/{agent_id} Updates Agent
AgentsApi v1_network_agents_wg_config_get_one GET /v1/network/agents/wg-config/{agent_id} Get Agent Wg config
AnalyticsApi v1_network_a_bandwidth_get GET /v1/network/a/bandwidth Get bandwidth
AnalyticsApi v1_network_a_iface_active_change_get GET /v1/network/a/iface-active-change Get active iface changes
AnalyticsApi v1_network_a_latency_get GET /v1/network/a/latency Get latency
AnalyticsApi v1_network_a_packet_loss_get GET /v1/network/a/packet-loss Get packet loss
AnalyticsApi v1_network_a_statuses_search POST /v1/network/a/statuses/search Search statuses
AnalyticsApi v1_network_a_statuses_warnings_search POST /v1/network/a/statuses/warnings/search Search status warnings
AuditApi v1_network_audit_search POST /v1/network/audit/logs/search Search audit logs
AuthApi v1_network_auth_access_token_login POST /v1/network/auth/access-token/login Login (Access token)
AuthApi v1_network_auth_access_tokens_create POST /v1/network/auth/access-tokens Create Access token
AuthApi v1_network_auth_access_tokens_delete DELETE /v1/network/auth/access-tokens/{access_token_id} Delete Access token
AuthApi v1_network_auth_access_tokens_get GET /v1/network/auth/access-tokens Get Access tokens
AuthApi v1_network_auth_access_tokens_permissions_get GET /v1/network/auth/access-tokens/permissions Get Access token permissions
AuthApi v1_network_auth_api_keys_create POST /v1/network/auth/api-keys Create API key
AuthApi v1_network_auth_api_keys_delete DELETE /v1/network/auth/api-keys/{api_key_id} Delete API key
AuthApi v1_network_auth_api_keys_get GET /v1/network/auth/api-keys Get API keys
AuthApi v1_network_auth_logout POST /v1/network/auth/logout Logout
AuthApi v1_network_auth_mfa_confirm POST /v1/network/auth/mfa/confirm Confirm MFA
AuthApi v1_network_auth_mfa_disable POST /v1/network/auth/mfa/disable Disable MFA
AuthApi v1_network_auth_mfa_disable_using_backup POST /v1/network/auth/mfa/disable-using-backup Disable MFA (backup)
AuthApi v1_network_auth_mfa_generate GET /v1/network/auth/mfa/generate Generate MFA
AuthApi v1_network_auth_settings_update PATCH /v1/network/auth/user/settings Update User settings
AuthApi v1_network_auth_user_get GET /v1/network/auth/user Get User info
AuthApi v1_network_auth_user_invitations_get GET /v1/network/auth/user/invitations Get invitations for authenticated user
AuthApi v1_network_auth_users_get GET /v1/network/auth/users Get workspace users
AuthApi v1_network_auth_users_remove POST /v1/network/auth/users/remove Remove users from workspace
AuthApi v1_network_auth_users_role_update PATCH /v1/network/auth/users/{user_id}/role Update user role in the workspace
AuthApi v1_network_auth_verify_email POST /v1/network/auth/verify-email/{code} Verify email
AuthApi v1_network_auth_workspace_create POST /v1/network/auth/workspaces Create workspace
AuthApi v1_network_auth_workspace_delete DELETE /v1/network/auth/workspaces/{workspace_id} Delete workspace
AuthApi v1_network_auth_workspace_get GET /v1/network/auth/workspaces Get workspaces
AuthApi v1_network_auth_workspace_update PATCH /v1/network/auth/workspaces/{workspace_id} Update workspace
AuthApi v1_network_auth_workspaces_invitations_accept POST /v1/network/auth/workspaces/invitations/{invitation_id}/accept Accept workspace invitation
AuthApi v1_network_auth_workspaces_invitations_create POST /v1/network/auth/workspaces/invitations Create workspace invitation
AuthApi v1_network_auth_workspaces_invitations_decline POST /v1/network/auth/workspaces/invitations/{invitation_id}/decline Decline workspace invitation
AuthApi v1_network_auth_workspaces_invitations_get GET /v1/network/auth/workspaces/invitations Get workspace invitations
AuthApi v1_network_auth_workspaces_invitations_remove POST /v1/network/auth/workspaces/invitations/remove Delete workspace invitations
AuthApi v1_network_auth_workspaces_leave POST /v1/network/auth/workspaces/leave Leave workspace
ConnectionsApi v1_network_connections_create_mesh POST /v1/network/connections/mesh Create Connections Mesh
ConnectionsApi v1_network_connections_create_p2_p POST /v1/network/connections/point-to-point Create P2P Connections
ConnectionsApi v1_network_connections_delete DELETE /v1/network/connections/{agent_connection_group_id} Delete Connection
ConnectionsApi v1_network_connections_get GET /v1/network/connections Get Connections
ConnectionsApi v1_network_connections_remove POST /v1/network/connections/remove Delete Connections
ConnectionsApi v1_network_connections_search POST /v1/network/connections/search Search Connections
ConnectionsApi v1_network_connections_services_delete DELETE /v1/network/connections/services/{agent_connection_subnet_id} Delete Connection service
ConnectionsApi v1_network_connections_services_get GET /v1/network/connections/services Get Connection services
ConnectionsApi v1_network_connections_services_remove POST /v1/network/connections/services/remove Delete Connection services
ConnectionsApi v1_network_connections_services_update PATCH /v1/network/connections/services Update Connection services
ConnectionsApi v1_network_connections_update PATCH /v1/network/connections Update Connections
NetworkApi v1_network_get GET /v1/network Get Network view
NotificationApi v1_network_notification_user_contact_update POST /v1/network/notification/user-contact Update User contact
RulesApi rules_connection_point_to_tag_update PATCH /v1/network/rules/connections/point-to-tag Upsert point-to-tag
RulesApi v1_network_rules_connections_point_to_tag_create POST /v1/network/rules/connections/point-to-tag Create point-to-tag
RulesApi v1_network_rules_connections_point_to_tag_get_one GET /v1/network/rules/connections/point-to-tag/{agent_id} Get point-to-tag
RulesApi v1_network_rules_connections_point_to_tag_search POST /v1/network/rules/connections/point-to-tag/search Search point-to-tag Rules
RulesApi v1_network_rules_search POST /v1/network/rules/search Search Rules
RulesApi v1_rules_connection_point_to_tag_remove POST /v1/network/rules/connections/point-to-tag/remove Remove point-to-tag
SDNAgentsApi v1_network_sdn_agents_get GET /v1/network/sdn-agents/ips Get SDN Agent ips

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

support@syntropynet.com

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.4.3.tar.gz (105.7 kB view details)

Uploaded Source

Built Distribution

syntropy_sdk-0.4.3-py3-none-any.whl (335.7 kB view details)

Uploaded Python 3

File details

Details for the file syntropy_sdk-0.4.3.tar.gz.

File metadata

  • Download URL: syntropy_sdk-0.4.3.tar.gz
  • Upload date:
  • Size: 105.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15

File hashes

Hashes for syntropy_sdk-0.4.3.tar.gz
Algorithm Hash digest
SHA256 8b3c854288fb0c04d4b4946c9d87a8f6d40469376b4d5126cb1302059b668b83
MD5 9e2e2c6eca01d69c120130f6eb932286
BLAKE2b-256 2fecc29e2fb61236dc8275dc460582f059536e097807efcbe918318a1f00ed31

See more details on using hashes here.

File details

Details for the file syntropy_sdk-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: syntropy_sdk-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 335.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15

File hashes

Hashes for syntropy_sdk-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bf686803c1744dd8fa042a03927e89936c061fe4d085b31ce966221c56f0e7d8
MD5 c66b69466041ef5a29b84d1e935d4aa5
BLAKE2b-256 681a5a90fadb8f48db026172b027a9899a8addf339c46c9faa2980583ab3608d

See more details on using hashes here.

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