Skip to main content

Syneto Client API library

Project description

Syneto API

Syneto Client API library: authentication, storage, virtualization and protection

Installation

$ pip install syneto-api

Basic Usage

from syneto_api import Authentication, Virtualization, Storage, Protection

auth_api = Authentication(url_base="https://syneto-instance-ip-address/api/auth", insecure_ssl=True)
response = auth_api.login(username="admin", password="admin")
jwt = response['jwt']

virt_api = Virtualization(url_base="https://syneto-instance-ip-address/api/virtualization", insecure_ssl=True)
virt_api.set_auth_jwt(jwt)
print(virt_api.get_vms())

storage_api = Storage(url_base="https://syneto-instance-ip-address/api/storage", insecure_ssl=True)
storage_api.set_auth_jwt(jwt)
print(storage_api.get_pools())

Environment Variables

For conveninence, the base urls for the api endpoints are also accepted as environment variables, please see below.

AUTHORIZATION_USER=admin
AUTHORIZATION_PASS=admin
AUTHORIZATION_SERVICE=https://syneto-instance-ip-address/api/auth
VIRTUALIZATION_SERVICE=https://syneto-instance-ip-address/api/virtualization
STORAGE_SERVICE=https://syneto-instance-ip-address/api/storage
PROTECTION_SERVICE=https://syneto-instance-ip-address/api/protection

If you are using self-signed SSL certificates, set the following env. so that the http request library does not perform ssl verification.

ALLOW_INSECURE_SSL=True

Publishing

See RELEASE.md

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syneto_api-0.3.74.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syneto_api-0.3.74-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file syneto_api-0.3.74.tar.gz.

File metadata

  • Download URL: syneto_api-0.3.74.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.9.21 Linux/6.19.10-200.fc43.x86_64

File hashes

Hashes for syneto_api-0.3.74.tar.gz
Algorithm Hash digest
SHA256 94b7ca0880c1b9448b8f16383868fffa55c940db6831cd8be7471c39f96cf240
MD5 f94f84a4026776cb49a60767c33748a1
BLAKE2b-256 65555650748460b0da1d37fdeef2883c2c742fcb8e44f3275e8a6a5d16e430e0

See more details on using hashes here.

File details

Details for the file syneto_api-0.3.74-py3-none-any.whl.

File metadata

  • Download URL: syneto_api-0.3.74-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.9.21 Linux/6.19.10-200.fc43.x86_64

File hashes

Hashes for syneto_api-0.3.74-py3-none-any.whl
Algorithm Hash digest
SHA256 90cf2ef64e849e6cf7b71883e7c693c751b5197a1d0a638cfdcb85996b269e0d
MD5 ee3daf3642d5fa03b771e0ffeb253ca9
BLAKE2b-256 972824995adfb7db0f5a00654556022e9651603513d77cb802f41e2e3d766b1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page