Python SDK for the ionoscloud-dbaas-mariadb API
Project description
Python API client for ionoscloud_dbaas_mariadb
An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based "Data Center Designer" (DCD) tool or via an easy to use API.
The API allows you to create additional MariaDB database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
Overview
The IONOS Cloud SDK for Python provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in Python. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
Installation & Usage
Requirements:
- Python >= 3.5
pip install
Since this package is hosted on Pypi you can install it by using:
pip install ionoscloud-dbaas-mariadb
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/ionos-cloud/sdk-python-dbaas-mariadb.git
Note: you may need to run pip
with root permission: sudo pip install git+https://github.com/ionos-cloud/sdk-python-dbaas-mariadb.git
Then import the package:
import ionoscloud_dbaas_mariadb
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 ionoscloud_dbaas_mariadb
NOTE: The Python SDK does not support Python 2. It only supports Python >= 3.5.
Authentication
The username and password or the authentication token can be manually specified when initializing the SDK client:
configuration = ionoscloud_dbaas_mariadb.Configuration(
username='YOUR_USERNAME',
password='YOUR_PASSWORD',
token='YOUR_TOKEN'
)
client = ionoscloud_dbaas_mariadb.ApiClient(configuration)
Environment variables can also be used. This is an example of how one would do that:
import os
configuration = ionoscloud_dbaas_mariadb.Configuration(
username=os.environ.get('IONOS_USERNAME'),
password=os.environ.get('IONOS_PASSWORD'),
token=os.environ.get('IONOS_TOKEN')
)
client = ionoscloud_dbaas_mariadb.ApiClient(configuration)
Warning: Make sure to follow the Information Security Best Practices when using credentials within your code or storing them in a file.
HTTP proxies
You can use http proxies by setting the following environment variables:
IONOS_HTTP_PROXY
- proxy URLIONOS_HTTP_PROXY_HEADERS
- proxy headers
Each line in IONOS_HTTP_PROXY_HEADERS
represents one header, where the header name and value is separated by a colon. Newline characters within a value need to be escaped. See this example:
Connection: Keep-Alive
User-Info: MyID
User-Group: my long\nheader value
Changing the base URL
Base URL for the HTTP operation can be changed in the following way:
import os
configuration = ionoscloud_dbaas_mariadb.Configuration(
username=os.environ.get('IONOS_USERNAME'),
password=os.environ.get('IONOS_PASSWORD'),
host=os.environ.get('IONOS_API_URL'),
server_index=None,
)
client = ionoscloud_dbaas_mariadb.ApiClient(configuration)
Certificate pinning:
You can enable certificate pinning if you want to bypass the normal certificate checking procedure, by doing the following:
Set env variable IONOS_PINNED_CERT=<insert_sha256_public_fingerprint_here>
You can get the sha256 fingerprint most easily from the browser by inspecting the certificate.
Documentation for API Endpoints
All URIs are relative to https://mariadb.de-txl.ionos.com
API Endpoints table
Class | Method | HTTP request | Description |
---|---|---|---|
BackupsApi | backups_find_by_id | GET /backups/{backupId} | Fetch a cluster's backups |
BackupsApi | backups_get | GET /backups | List of cluster's backups. |
BackupsApi | cluster_backups_get | GET /clusters/{clusterId}/backups | List backups of cluster |
ClustersApi | clusters_delete | DELETE /clusters/{clusterId} | Delete a cluster |
ClustersApi | clusters_find_by_id | GET /clusters/{clusterId} | Fetch a cluster |
ClustersApi | clusters_get | GET /clusters | List clusters |
ClustersApi | clusters_post | POST /clusters | Create a cluster |
Documentation For Models
All URIs are relative to https://mariadb.de-txl.ionos.com
API models list
- Backup
- BackupList
- BackupListAllOf
- BackupResponse
- BaseBackup
- ClusterList
- ClusterListAllOf
- ClusterMetadata
- ClusterProperties
- ClusterResponse
- ClustersGet400Response
- ClustersGet401Response
- ClustersGet403Response
- ClustersGet404Response
- ClustersGet405Response
- ClustersGet415Response
- ClustersGet422Response
- ClustersGet429Response
- ClustersGet500Response
- ClustersGet503Response
- Connection
- CreateClusterProperties
- CreateClusterRequest
- DBUser
- DayOfTheWeek
- ErrorMessage
- MaintenanceWindow
- MariadbVersion
- Pagination
- PaginationLinks
- State
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
Built Distribution
File details
Details for the file ionoscloud-dbaas-mariadb-1.0.0.tar.gz
.
File metadata
- Download URL: ionoscloud-dbaas-mariadb-1.0.0.tar.gz
- Upload date:
- Size: 43.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b14e54d075a60b6b88d0accaaac686a40cc814d231ee75d9b9968b652a7d7718 |
|
MD5 | c5f75183b72c7e1bb57c20150271db43 |
|
BLAKE2b-256 | 72e8812810aef1662930f9c50d74ecdb7810207640f5fcd00e9be4920d54d198 |
File details
Details for the file ionoscloud_dbaas_mariadb-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: ionoscloud_dbaas_mariadb-1.0.0-py3-none-any.whl
- Upload date:
- Size: 91.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42b2e00980fc099a151240728674e2a923cda7ce3867fb30a8995a984bc185b3 |
|
MD5 | 15111572aa21f8a2ec32b600cc360603 |
|
BLAKE2b-256 | 3c4f3fd2ded9d72723dc654c13d7cae8d368aee12ce1a3d677888903549180b4 |