Unofficial API client for the FireAPI from 24fire GmbH.
Project description
Python FireAPI Client
Unofficial API client for the FireAPI from 24fire GmbH.
Installation
pip install pyonfireapi
Examples
1. List all VMs
from pyonfireapi import FireAPIClient
# Set the client and authenticate
client = FireAPIClient("api-key")
# Perform the Request
r = client.vm.list_all_vms()
# Print statuscode
print("Status Code: ", r.status_code)
# Print json
print(r.json())
Output:
Status Code: 200
{
"status": "success",
"requestID": "a24effc3-b1d6-46a3-a49a-fe07734717ad",
"message": "All vm data are listed below",
"data": {
"total_vms": 2,
"total_stats": {
"cores": 12,
"mem": 3072,
"disk": 20
},
"list": [
{
"vmid": 30071,
"createDate": "2023-05-31T00:38:40.000Z",
"node": "node09",
"config": {
"cores": 10,
"mem": 1024,
"disk": 10
}
},
{
"vmid": 30074,
"createDate": "2023-06-10T11:10:34.000Z",
"node": "node09",
"config": {
"cores": 2,
"mem": 2048,
"disk": 10
}
}
]
}
}
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
pyonfireapi-0.0.3.tar.gz
(7.8 kB
view hashes)
Built Distribution
Close
Hashes for pyonfireapi-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47991faee7d6bca54ad821e4e2a0675aaa3b6707a17c5fc7af99567598936568 |
|
MD5 | 17397db509eacb38163391f7d13e0267 |
|
BLAKE2b-256 | 88b7b1f208db21621fda0b0589304166b2b4af2e511c83d77e7f401b7227a333 |