Skip to main content

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)

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

NebulaPythonSDK-1.3.2.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

NebulaPythonSDK-1.3.2-py2-none-any.whl (4.1 kB view details)

Uploaded Python 2

File details

Details for the file NebulaPythonSDK-1.3.2.tar.gz.

File metadata

  • Download URL: NebulaPythonSDK-1.3.2.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.15

File hashes

Hashes for NebulaPythonSDK-1.3.2.tar.gz
Algorithm Hash digest
SHA256 6e8eb6c101e8a6207bcdacb86241a90b9d45e33349490ccc4ff0950e847c0708
MD5 9bf61730a4e5d7519b1f7f83e9c249f6
BLAKE2b-256 f47ae2d7d9b26985f068dbd91473ac59be423cb7776579a1c37f22b4527a93a5

See more details on using hashes here.

Provenance

File details

Details for the file NebulaPythonSDK-1.3.2-py2-none-any.whl.

File metadata

  • Download URL: NebulaPythonSDK-1.3.2-py2-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.15

File hashes

Hashes for NebulaPythonSDK-1.3.2-py2-none-any.whl
Algorithm Hash digest
SHA256 6723c5fc58ce3d0b259275ae9c58401a39b5c69d44afa1bafe853614a1ba795f
MD5 6b4adc97da5d15a5f4a51cbd84d78c37
BLAKE2b-256 91fb07ca01a7e6e9fbe19c0dca53ec2402e37675e3b2254df4bac4491d26b904

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page