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.75.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.75-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: syneto_api-0.3.75.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.14-101.fc44.x86_64

File hashes

Hashes for syneto_api-0.3.75.tar.gz
Algorithm Hash digest
SHA256 4eb825f4ff89d227cb89c6df2e2abdec75843f4df5755c45d13313134c4e2636
MD5 d94581e82c6a308dd95290341924a09f
BLAKE2b-256 d743327341f8865af7b2cae4613ccab65aafbba33d5ae8197d39208a558d5743

See more details on using hashes here.

File details

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

File metadata

  • Download URL: syneto_api-0.3.75-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.14-101.fc44.x86_64

File hashes

Hashes for syneto_api-0.3.75-py3-none-any.whl
Algorithm Hash digest
SHA256 fd026ac937b8cf33abbd384b17676af16d82f42924d3265a5d73479de7d478b2
MD5 898a5b6dffc73cd3c3e3d11e50751713
BLAKE2b-256 90885d75e4c09390c5ae1c11e585356769d63934ff14749e6f61de5ca08d0f54

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