Skip to main content

OSCAR API for python

Project description

Python OSCAR API

Sample usage

from oscar_python.client import Client

client = Client("cluster-id","https://cluster-endpoint", "username", "password", True)

# get the cluster information
info = client.get_cluster_info() # returns an http response
print(info.text)

API methods

Cluster methods

get_cluster_info

# get the cluster information
info = client.get_cluster_info() # returns an http response

get_cluster_config

# get the cluster config
config = client.get_cluster_config() # returns an http response

Service methods

get_service

# get the definition of a service 
service = client.get_service("service_name") # returns an http response

list_services

# get a list of all the services deployed 
services = client.list_services() # returns an http response

create_service

# create a service 
err = client.create_service("path_to_fdl") # returns nothing if the service is created or an error if something goes wrong

update_service

# update a service 
err = client.update_service("service_name","path_to_fdl") # returns nothing if the service is created or an error if something goes wrong

remove_service

# remove a service 
service = client.remove_service("service_name") # returns an http response

#TODO [...]

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

oscar_python-1.0.1b1.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

oscar_python-1.0.1b1-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

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