Skip to main content

OptHub REST API

Project description

opthub-api-client

OptHub Public REST API.

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

  • API version: 0.3.0
  • Package version: 0.3.0
  • Generator version: 7.8.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

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

pip install git+https://github.com/opthub-org/opthub-api-client-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/opthub-org/opthub-api-client-python.git)

Then import the package:

import opthub_api_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 opthub_api_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import opthub_api_client
from opthub_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.opthub.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = opthub_api_client.Configuration(
    host = "https://api.opthub.ai"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with opthub_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = opthub_api_client.MatchTrialsApi(api_client)
    match_uuid = '5d7fc778-3e59-4128-a797-2e423c0aa461' # str | Match UUID
    create_match_trial_request = opthub_api_client.CreateMatchTrialRequest() # CreateMatchTrialRequest |  (optional)

    try:
        # Create a match trial
        api_response = api_instance.create_match_trial(match_uuid, create_match_trial_request=create_match_trial_request)
        print("The response of MatchTrialsApi->create_match_trial:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling MatchTrialsApi->create_match_trial: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.opthub.ai

Class Method HTTP request Description
MatchTrialsApi create_match_trial POST /matches/{match_uuid}/trials Create a match trial
MatchTrialsApi get_match_evaluation GET /matches/{match_uuid}/trials/{trial_no}/evaluation Retrieve status of a specific match evaluation related to the Solution submitted by the Participant themselves.
MatchTrialsApi get_match_score GET /matches/{match_uuid}/trials/{trial_no}/score Retrieve status of a specific match score related to the Solution submitted by the Participant themselves.
MatchTrialsApi get_match_trial GET /matches/{match_uuid}/trials/{trial_no} Retrieve status of a specific Match Trial related to the Solution submitted by the Participant themselves.
MatchTrialsApi get_solution GET /matches/{match_uuid}/trials/{trial_no}/solution Retrieve the Solution submitted by the Participant themselves.

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Author

dev@opthub.ai

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

opthub_api_client-0.3.0.tar.gz (25.6 kB view hashes)

Uploaded Source

Built Distribution

opthub_api_client-0.3.0-py3-none-any.whl (48.7 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