NebulaPythonSDK is a Pythonic SDK to manage Nebula container orchestrator
Project description
Nebula-Python-SDK
An SDK for managing nebula via python.
translates all of Nebula API calls to something more pythonic.
How To Use
first get NebulaPythonSDK onto your machine
# Install from PyPi
pip install NebulaPythonSDK
now use it in your code
# Load API wrapper from library
from NebulaPythonSDK import Nebula
# Create API object.
# port defaults to 80, protocol defaults to "http" & request_timeout defaults to 60 if any of them is not set.
connection = Nebula(username="your_nebula_user", password="your_nebula_pass", host="nebula.example.com", port=80, protocol="http", request_timeout=60)
# List apps
app_list = connection.list_apps()
# List app info
app_config = connection.list_app_info("app_name")
# Create app
app_conf = {
"containers_per_cpu": 8,
"env_vars": {
"test": "blabla",
"test3t2t32": "tesg4ehgee"
},
"docker_ulimits": [],
"networks": ["nebula"],
"running": True,
"volumes": ["/tmp:/tmp/1", "/var/tmp/:/var/tmp/1:ro"],
"containers_per": {
"cpu": 6
},
"starting_ports": [
{
"81": 80
}
],
"docker_image": "httpd",
"privileged": False,
"devices": []
}
connection.create_app("app_name", app_conf)
Note that the response returned is a requests formatted response.
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
NebulaPythonSDK-1.6.0.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file NebulaPythonSDK-1.6.0.tar.gz
.
File metadata
- Download URL: NebulaPythonSDK-1.6.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b31f9a360cf0a8ad7255aab0da2f944293db381ffac53ff9cf202f63212888d8 |
|
MD5 | 7291b975196060e7fe67ddc8a115c643 |
|
BLAKE2b-256 | 3027519a1b029b24409c2c65cec13ff01cf62f34ae066835b14a429bccf0286d |
Provenance
File details
Details for the file NebulaPythonSDK-1.6.0-py2-none-any.whl
.
File metadata
- Download URL: NebulaPythonSDK-1.6.0-py2-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15a2fec0d07bd5d01244a6f832e4af94bf2e5c18a658a9f28477e65c9ba5d058 |
|
MD5 | 3d1fab6a2d3cbfbcd75b66351b02851e |
|
BLAKE2b-256 | b286cefe46402f213a8940ee045fae3092cb6130aceebe03e10fd0bc47630b92 |