Skip to content

unity-sds/unity-sps-ogc-processes-api-client-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity-sps-ogc-processes-api-python-client

This document is an API definition document provided alongside the OGC API - Processes standard. The OGC API - Processes Standard specifies a processing interface to communicate over a RESTful protocol using JavaScript Object Notation (JSON) encodings. The specification allows for the wrapping of computational tasks into executable processes that can be offered by a server and be invoked by a client application.

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

  • API version: 2.0.0
  • Package version: 2.0.1
  • Generator version: 7.7.0
  • 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/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 unity_sps_ogc_processes_api_python_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 unity_sps_ogc_processes_api_python_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import unity_sps_ogc_processes_api_python_client
from unity_sps_ogc_processes_api_python_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 = unity_sps_ogc_processes_api_python_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): bearerAuth
configuration = unity_sps_ogc_processes_api_python_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with unity_sps_ogc_processes_api_python_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = unity_sps_ogc_processes_api_python_client.APIApi(api_client)
    f = 'f_example' # str | The format of the response. If no value is provided, the accept header is used to determine the format. Accepted values are 'json' or 'html'. (optional)

    try:
        # Retrieve this API definition.
        api_response = api_instance.get_api_api_get(f=f)
        print("The response of APIApi->get_api_api_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling APIApi->get_api_api_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
APIApi get_api_api_get GET /api Retrieve this API definition.
APIApi get_api_processes_api_processes_list_get GET /api/processes-list Retrieve the list of processes available from this API implementation & deployment.
ConformanceApi get_conformance_conformance_get GET /conformance Retrieve the set of OGC API conformance classes that are supported by this service.
DRUApi deploy_processes_post POST /processes deploy a process.
DRUApi replace_processes_process_id_put PUT /processes/{processId} replace a process.
DRUApi undeploy_processes_process_id_delete DELETE /processes/{processId} undeploy a process.
HealthApi get_health_health_get GET /health Retrieve the health status of the API.
JobsApi dismiss_jobs_job_id_delete DELETE /jobs/{jobId} cancel a job execution, remove a finished job
JobsApi get_jobs_jobs_get GET /jobs retrieve the list of jobs.
JobsApi get_result_jobs_job_id_results_get GET /jobs/{jobId}/results retrieve the result(s) of a job
JobsApi get_status_jobs_job_id_get GET /jobs/{jobId} retrieve the status of a job
LandingPageApi get_landing_page_get GET / Retrieve the OGC API landing page for this service.
ProcessesApi execute_processes_process_id_execution_post POST /processes/{processId}/execution execute a process.
ProcessesApi get_process_description_processes_process_id_get GET /processes/{processId} retrieve a process description
ProcessesApi get_processes_processes_get GET /processes retrieve the list of available processes

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

Author

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published