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.3.0

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"
config.api_key["Authorization"] = "your api authorizaton token"
api = sdk.ApiClient(config)
platform_api = sdk.NetworkApi(api)

try:
    api_response = WithRetry(platform_api.platform_network_info)()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworkApi->platform_network_info: %s\n" % e)


# Create connections
connections_api = sdk.ConectionsApi(api)
try:
    body = {
        "agent_ids": [
            0, 1,  # Valid agent IDs
            1, 2,
            2, 4,
        ],
    }
    connections = connections_api.platform_connection_create_p2p(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 /

Class Method HTTP request Description
APIAuthApi v1_auth_acess_token_login POST /api/auth/v1/access-token/login Access Token Login
APIKeysApi create_api_key POST /auth/api-key Create API key
APIKeysApi delete_api_key DELETE /auth/api-key/{api_key_id} Delete API keys
APIKeysApi get_api_key GET /auth/api-key Get API keys
AuthApi add_contact POST /auth/authorization/contact Update user contacts
AuthApi auth_access_token_list GET /auth/authorization/access-token Get access tokens
AuthApi auth_access_token_login POST /auth/authorization/access-token/login Login (access token)
AuthApi auth_access_token_permissions_list GET /auth/authorization/permissions/access-token Get access token permissions
AuthApi auth_access_token_user_create POST /auth/authorization/access-token Create access token
AuthApi auth_access_token_user_delete DELETE /auth/authorization/access-token/{id} Delete access token
AuthApi auth_logout POST /auth/authorization/logout Logout
AuthApi auth_show_user GET /auth/authorization/user Get user info
AuthApi auth_verify_email GET /auth/authorization/verify-email/{code} Verify email
AuthApi update_settings PUT /auth/authorization/settings Update user settings
MFAApi confirm_mfa_secret POST /auth/mfa/confirm Confirm MFA
MFAApi disable_mfa POST /auth/mfa/disable Disable MFA
MFAApi disable_mfa_using_backup POST /auth/mfa/disable-using-backup Disable MFA (backup)
MFAApi generate_mfa_secret GET /auth/mfa/generate Generate MFA
AgentsApi platform_agent_config GET /api/platform/agent/{agent_id}/config Get agent config
AgentsApi platform_agent_coordinates POST /api/platform/agents/coordinates Get coordinates
AgentsApi platform_agent_create POST /api/platform/agents Create agent
AgentsApi platform_agent_id_name_pairs GET /api/platform/agents/filters Get agents (id,name)
AgentsApi platform_agent_index GET /api/platform/agents Get agents
AgentsApi platform_agent_provider_index GET /api/platform/agent-providers Get agent providers
AgentsApi platform_agent_provider_show GET /api/platform/agent-providers/{id} Get agent provider
AgentsApi platform_agent_tag_index GET /api/platform/agent-tags Get agent tags
AgentsApi platform_agent_update PATCH /api/platform/agents/{agent_id} Update agent
AgentsApi platform_agents_destroy POST /api/platform/agents/remove Delete agent
AgentsApi platform_config GET /api/platform/agent/{agent_id}/wg-config Get agent wg config
AgentsApi platform_logs_read_timestamp POST /api/platform/logs-reads-timestamp Get logs reads timestamps
AgentsApi v1_platform_delete_agents POST /api/platform/v1/agents/delete Delete Agents
AgentsApi v1_platform_get_agents POST /api/platform/v1/agents Get Agents
AgentsLogsApi search_platform_agent POST /api/search/platform-agents Get agents log
AgentsLogsApi search_platform_agent_error POST /api/search/platform-agents-errors Get agents errors log
ConnectionsApi platform_connection_agents_destroy POST /api/platform/connections/agents/remove Delete connections
ConnectionsApi platform_connection_create_mesh POST /api/platform/connections/mesh Create connections (mesh)
ConnectionsApi platform_connection_create_p2p POST /api/platform/connections/point-to-point Create connections (p2p)
ConnectionsApi platform_connection_groups_destroy POST /api/platform/connections/groups/remove Delete connections (groups)
ConnectionsApi platform_connection_groups_index GET /api/platform/connections/groups Get connections (groups)
ConnectionsApi platform_connection_groups_sdn_toggle PATCH /api/platform/connections/groups Toggles SDN for specific connection
ConnectionsApi platform_connection_index GET /api/platform/connections Get connections
ConnectionsApi v1_platform_create_connections_mesh POST /api/platform/v1/connections/mesh Create Connections Mesh
ConnectionsApi v1_platform_create_p2p_connections POST /api/platform/v1/connections/point-to-point Create P2P Connections
ConnectionsApi v1_platform_delete_connections_groups POST /api/platform/v1/connections/groups/delete Delete Connections
ConnectionsApi v1_platform_get_connections_groups POST /api/platform/v1/connections/groups Get Connections
NetworkApi platform_network_info GET /api/platform/network/info Get network
PublicApi public_health GET /api/public/health Get health
PublicApi public_info GET /api/public/info Get info
ServicesApi platform_agent_service_destroy POST /api/platform/agent-services-delete Delete services
ServicesApi platform_agent_service_index GET /api/platform/agent-services Get services
ServicesApi platform_agent_service_subnet_update POST /api/platform/agent-services-subnets Update service status
ServicesApi platform_connection_service_show GET /api/platform/connections/services Get services
ServicesApi platform_connection_service_update POST /api/platform/connections/services Create services
ServicesApi platform_connection_subnet_destroy POST /api/platform/connections/services/remove Delete services
UserApi setting_create POST /api/settings Update user settings
UserApi setting_index GET /api/settings Get user settings
RulesApi rules_connection_point_to_tag_create POST /api/rules/connections/point-to-tag Create point-to-tag
RulesApi rules_connection_point_to_tag_remove POST /api/rules/connections/point-to-tag/remove Remove point-to-tag
RulesApi rules_connection_point_to_tag_search POST /api/rules/connections/point-to-tag/search Search point-to-tag
RulesApi rules_connection_point_to_tag_show_by_id GET /api/rules/connections/point-to-tag/{agent_id} Get point-to-tag
RulesApi rules_connection_point_to_tag_update PATCH /api/rules/connections/point-to-tag Patch point-to-tag
RulesApi rules_search POST /api/rules/search Search rules

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.3.0.tar.gz (177.4 kB view hashes)

Uploaded Source

Built Distribution

syntropy_sdk-0.3.0-py3-none-any.whl (530.6 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