OptHub Public REST API.
This Python package is automatically generated by the OpenAPI Generator project:
Python 3.7+
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
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
Execute pytest
to run the tests.
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)
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. |
Authentication schemes defined for the API:
dev@opthub.ai