Skip to main content

The ESnet Janus container API

Project description

janus-py-client

REST endpoints for container provisioning and tuning

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.1
  • Package version: 1.1
  • Generator version: 7.22.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.10+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import janus_py_client

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 janus_py_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import janus_py_client
from janus_py_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = janus_py_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): jwt
configuration = janus_py_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure HTTP basic authorization: basicAuth
configuration = janus_py_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)


# Enter a context with an instance of the API client
with janus_py_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = janus_py_client.AuthApi(api_client)
    resource = 'resource_example' # str | Resource type
    rid = 56 # int | Auth ID
    rname = 'rname_example' # str | Auth name
    auth_request = janus_py_client.AuthRequest() # AuthRequest | 

    try:
        # Delete auth info by ID
        api_response = api_instance.controller_delete_auth_auth_path_resource_int_rid_delete(resource, rid, rname, auth_request)
        print("The response of AuthApi->controller_delete_auth_auth_path_resource_int_rid_delete:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AuthApi->controller_delete_auth_auth_path_resource_int_rid_delete: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AuthApi controller_delete_auth_auth_path_resource_int_rid_delete DELETE /api/janus/controller/auth/{resource}/{rid} Delete auth info by ID
AuthApi controller_delete_auth_auth_path_resource_path_rname_delete DELETE /api/janus/controller/auth/{resource}/{rname} Delete auth info by name
AuthApi controller_get_auth_auth_path_resource_get GET /api/janus/controller/auth/{resource} Get auth info
AuthApi controller_get_auth_auth_path_resource_int_rid_get GET /api/janus/controller/auth/{resource}/{rid} Get specific auth info by ID
AuthApi controller_get_auth_auth_path_resource_path_rname_get GET /api/janus/controller/auth/{resource}/{rname} Get specific auth info by name
AuthApi controller_post_auth_auth_path_resource_int_rid_post POST /api/janus/controller/auth/{resource}/{rid} Update auth info by ID
AuthApi controller_post_auth_auth_path_resource_path_rname_post POST /api/janus/controller/auth/{resource}/{rname} Update auth info by name
AuthApi controller_post_auth_bulk_auth_bulk_post POST /api/janus/controller/auth/bulk Bulk update auth info
ImagesApi controller_get_images_images_get GET /api/janus/controller/images Get images
ImagesApi controller_get_images_images_path_name_get GET /api/janus/controller/images/{name} Get a specific image
NodesApi controller_add_node_nodes_post POST /api/janus/controller/nodes Add a new node
NodesApi controller_delete_node_nodes_int_id_delete DELETE /api/janus/controller/nodes/{id} Delete node by ID
NodesApi controller_delete_node_nodes_node_delete DELETE /api/janus/controller/nodes/{node} Delete node by name
NodesApi controller_get_node_by_id_or_name_nodes_int_id_get GET /api/janus/controller/nodes/{id} Get node by ID
NodesApi controller_get_node_by_id_or_name_nodes_node_get GET /api/janus/controller/nodes/{node} Get node by name
NodesApi controller_get_nodes_nodes_get GET /api/janus/controller/nodes Get nodes
ProfilesApi controller_delete_profile_profiles_path_resource_path_rname_delete DELETE /api/janus/controller/profiles/{resource}/{rname} Remove a profile
ProfilesApi controller_get_profile_by_name_profiles_path_resource_path_rname_get GET /api/janus/controller/profiles/{resource}/{rname} Get a specific profile
ProfilesApi controller_get_profiles_by_resource_profiles_path_resource_get GET /api/janus/controller/profiles/{resource} Get profiles for a resource
ProfilesApi controller_get_profiles_default_profiles_get GET /api/janus/controller/profiles Get host profiles (default)
ProfilesApi controller_post_profile_profiles_path_resource_path_rname_post POST /api/janus/controller/profiles/{resource}/{rname} Create a new profile
ProfilesApi controller_put_profile_profiles_path_resource_path_rname_put PUT /api/janus/controller/profiles/{resource}/{rname} Update a profile
SessionsApi controller_create_sessions_create_post POST /api/janus/controller/create Create one or more new sessions.
SessionsApi controller_delete_active_active_int_aid_delete DELETE /api/janus/controller/active/{aid} Delete a specific active session
SessionsApi controller_exec_command_exec_post POST /api/janus/controller/exec Execute a container command inside an active session.
SessionsApi controller_get_active_active_get GET /api/janus/controller/active Get all active sessions
SessionsApi controller_get_active_by_id_active_int_aid_get GET /api/janus/controller/active/{aid} Get a specific active session
SessionsApi controller_get_logs_active_int_aid_logs_path_nname_get GET /api/janus/controller/active/{aid}/logs/{nname} Display logs for a specific active session and node.
SessionsApi controller_post_active_apply_active_int_aid_apply_post POST /api/janus/controller/active/{aid}/apply Apply changes to a session
SessionsApi controller_put_active_active_int_aid_put PUT /api/janus/controller/active/{aid} Update a specific active session
SessionsApi controller_start_session_endpoint_start_int_aid_put PUT /api/janus/controller/start/{aid} Start a container service by id.
SessionsApi controller_stop_session_endpoint_stop_int_aid_put PUT /api/janus/controller/stop/{aid} Stop a container service by id.
DefaultApi controller_check_token_token_get GET /api/janus/controller/token Check Token
DefaultApi controller_get_token_token_post POST /api/janus/controller/token Get Token

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

jwt

  • Type: Bearer authentication (JWT)

Author

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

janus_py_client-1.1.post1.tar.gz (59.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

janus_py_client-1.1.post1-py3-none-any.whl (90.8 kB view details)

Uploaded Python 3

File details

Details for the file janus_py_client-1.1.post1.tar.gz.

File metadata

  • Download URL: janus_py_client-1.1.post1.tar.gz
  • Upload date:
  • Size: 59.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for janus_py_client-1.1.post1.tar.gz
Algorithm Hash digest
SHA256 e476af185a4638405ccf6caffab8bd1f26bae390b9b7942fadf60ae3c0696c7c
MD5 739045f0500e412be94bdcc5a0b4b9e5
BLAKE2b-256 4608f74e49a4d7b287f1d8cc897737512cce7e2c279f650abf0e4eb14656c3e7

See more details on using hashes here.

File details

Details for the file janus_py_client-1.1.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for janus_py_client-1.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 50993cba3b75682bc35dff5bf357ce217857582893c9d173342077b7e24ab16c
MD5 d552347b310a1d40f0097ee5064389b1
BLAKE2b-256 52dcbc580fb1e18a24dbe83676500d73e484c0bea893e2dd62386104f7c5cbbc

See more details on using hashes here.

Supported by

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