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
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.9.tar.gz
(13.4 kB
view details)
Built Distribution
File details
Details for the file syneto_api-0.3.9.tar.gz
.
File metadata
- Download URL: syneto_api-0.3.9.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.2 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 251d639b34464a76f6cc233652b64387a39b4e864d7dd650b7d59b9f246c4071 |
|
MD5 | 0d82566f1866245aced5629e42dfa604 |
|
BLAKE2b-256 | 8f9db1ba2e96a9fd58002111e54a2efc572e5ccafed629d8523122af556538fe |
File details
Details for the file syneto_api-0.3.9-py3-none-any.whl
.
File metadata
- Download URL: syneto_api-0.3.9-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.2 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d6b4933995847a02060678f823a0bc67af1f83da310a0aad14ae7e0ceae5973 |
|
MD5 | 45a85e736f8f7b15e7dd765ea8c14123 |
|
BLAKE2b-256 | 5c3a451d43fe25602f5ca0c7dd774acce23b8e22c63ac886d81d7b85791a1f9c |