|
| 1 | +# pollination-sdk |
| 2 | + |
| 3 | +Pollination Cloud API |
| 4 | + |
| 5 | +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: |
| 6 | + |
| 7 | +- API version: 0.0.1 |
| 8 | +- Build package: org.openapitools.codegen.languages.PythonClientCodegen |
| 9 | + |
| 10 | +## Requirements |
| 11 | + |
| 12 | +Python 2.7 and 3.4+ |
| 13 | + |
| 14 | +## Installation & Usage |
| 15 | + |
| 16 | +### pip install |
| 17 | + |
| 18 | +The default way to install `pollination-sdk` is through PyPi as follows: |
| 19 | + |
| 20 | +```sh |
| 21 | +pip install pollination-sdk |
| 22 | +``` |
| 23 | + |
| 24 | +If you need a specific branch you can install straight from the repository using: |
| 25 | + |
| 26 | +```sh |
| 27 | +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git |
| 28 | +``` |
| 29 | +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) |
| 30 | + |
| 31 | +Then import the package: |
| 32 | +```python |
| 33 | +import pollination_sdk |
| 34 | +``` |
| 35 | + |
| 36 | +### Setuptools |
| 37 | + |
| 38 | +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). |
| 39 | + |
| 40 | +```sh |
| 41 | +python setup.py install --user |
| 42 | +``` |
| 43 | +(or `sudo python setup.py install` to install the package for all users) |
| 44 | + |
| 45 | +Then import the package: |
| 46 | +```python |
| 47 | +import pollination_sdk |
| 48 | +``` |
| 49 | + |
| 50 | +## Getting Started |
| 51 | + |
| 52 | +Please follow the [installation procedure](#installation--usage) and then run the following: |
| 53 | + |
| 54 | +```python |
| 55 | +from __future__ import print_function |
| 56 | +import time |
| 57 | +import pollination_sdk |
| 58 | +from pollination_sdk.rest import ApiException |
| 59 | +from pprint import pprint |
| 60 | + |
| 61 | +configuration = pollination_sdk.Configuration() |
| 62 | + |
| 63 | +# Retrieve a temporary Acces Token (JWT) using your API key id and secret |
| 64 | +API_KEY_ID = 'some-long-id' |
| 65 | +API_KEY_SECRET = 'some-long-secret' |
| 66 | + |
| 67 | +auth = pollination_sdk.AuthenticationApi() |
| 68 | +api_token = pollination_sdk.Token( |
| 69 | + id=API_KEY_ID, |
| 70 | + secret=API_KEY_SECRET |
| 71 | +) |
| 72 | + |
| 73 | +auth_response = auth.login(token) |
| 74 | + |
| 75 | +# Configure Bearer authorization: JWT |
| 76 | +configuration.access_token = auth_response.access_token |
| 77 | + |
| 78 | +# Defining host is optional and default to https://api.pollination.cloud |
| 79 | +configuration.host = "https://api.pollination.cloud" |
| 80 | +# Create an instance of the API class |
| 81 | +api_instance = pollination_sdk.WorkflowsApi(pollination_sdk.ApiClient(configuration)) |
| 82 | +id = 'id_example' # str | |
| 83 | +workflow = pollination_sdk.Workflow() # Workflow | |
| 84 | + |
| 85 | +try: |
| 86 | + # Update a Workflow |
| 87 | + api_response = api_instance.update(id, workflow) |
| 88 | + pprint(api_response) |
| 89 | +except ApiException as e: |
| 90 | + print("Exception when calling WorkflowsApi->update: %s\n" % e) |
| 91 | + |
| 92 | +``` |
| 93 | + |
| 94 | +## Documentation for API Endpoints |
| 95 | + |
| 96 | +All URIs are relative to *https://api.pollination.cloud* |
| 97 | + |
| 98 | +Class | Method | HTTP request | Description |
| 99 | +------------ | ------------- | ------------- | ------------- |
| 100 | +*AuthenticationApi* | [**create_api_token**](docs/AuthenticationApi.md#create_api_token) | **POST** /auth/api-token | Create an API Token |
| 101 | +*AuthenticationApi* | [**delete_api_token**](docs/AuthenticationApi.md#delete_api_token) | **DELETE** /auth/api-token | Delete an API Token |
| 102 | +*AuthenticationApi* | [**get_api_token**](docs/AuthenticationApi.md#get_api_token) | **GET** /auth/api-token | Get your API Token ID |
| 103 | +*AuthenticationApi* | [**login**](docs/AuthenticationApi.md#login) | **POST** /auth/login | Login with API Token |
| 104 | +*AuthenticationApi* | [**rotate_api_token_secret**](docs/AuthenticationApi.md#rotate_api_token_secret) | **PUT** /auth/api-token | Rotate an API token secret |
| 105 | +*ModelApi* | [**create**](docs/ModelApi.md#create) | **POST** /models | Create a Model |
| 106 | +*ModelApi* | [**create_faces**](docs/ModelApi.md#create_faces) | **POST** /models/{id}/faces | Create Model Faces |
| 107 | +*ModelApi* | [**delete**](docs/ModelApi.md#delete) | **DELETE** /models/{id} | Delete a Model |
| 108 | +*ModelApi* | [**get**](docs/ModelApi.md#get) | **GET** /models/{id} | Get a Model |
| 109 | +*ModelApi* | [**get_faces**](docs/ModelApi.md#get_faces) | **GET** /models/{id}/faces | Get Model Faces |
| 110 | +*ModelApi* | [**list**](docs/ModelApi.md#list) | **GET** /models | Get Models |
| 111 | +*SensorGridApi* | [**create**](docs/SensorGridApi.md#create) | **POST** /sensor-grids | Create a Sensor Grid |
| 112 | +*SensorGridApi* | [**delete**](docs/SensorGridApi.md#delete) | **DELETE** /sensor-grids/{gid} | Delete a Sensor Grid |
| 113 | +*SensorGridApi* | [**get**](docs/SensorGridApi.md#get) | **GET** /sensor-grids/{gid} | Get a Sensor Grid |
| 114 | +*SensorGridApi* | [**get_sensors**](docs/SensorGridApi.md#get_sensors) | **GET** /sensor-grids/{gid}/sensors | Get Sensors |
| 115 | +*SensorGridApi* | [**list**](docs/SensorGridApi.md#list) | **GET** /sensor-grids | Get Sensor Grids |
| 116 | +*SimulationsApi* | [**create**](docs/SimulationsApi.md#create) | **POST** /simulations | Schedule a simulation |
| 117 | +*SimulationsApi* | [**get**](docs/SimulationsApi.md#get) | **GET** /simulations/{id} | Get a Simulation |
| 118 | +*SimulationsApi* | [**list**](docs/SimulationsApi.md#list) | **GET** /simulations | List simulations |
| 119 | +*SimulationsApi* | [**resubmit**](docs/SimulationsApi.md#resubmit) | **POST** /simulations/{id}/re-submit | re-submit a simulation |
| 120 | +*SimulationsApi* | [**resume**](docs/SimulationsApi.md#resume) | **PUT** /simulations/{id}/resume | resume a simulation |
| 121 | +*SimulationsApi* | [**suspend**](docs/SimulationsApi.md#suspend) | **PUT** /simulations/{id}/suspend | Suspend a simulation |
| 122 | +*WorkflowsApi* | [**create**](docs/WorkflowsApi.md#create) | **POST** /workflows | Create a Workflow |
| 123 | +*WorkflowsApi* | [**delete**](docs/WorkflowsApi.md#delete) | **DELETE** /workflows/{id} | Delete a Workflow |
| 124 | +*WorkflowsApi* | [**get**](docs/WorkflowsApi.md#get) | **GET** /workflows/{id} | Get a Workflow |
| 125 | +*WorkflowsApi* | [**list**](docs/WorkflowsApi.md#list) | **GET** /workflows | List Workflows |
| 126 | +*WorkflowsApi* | [**update**](docs/WorkflowsApi.md#update) | **PUT** /workflows/{id} | Update a Workflow |
| 127 | + |
| 128 | + |
| 129 | +## Documentation For Models |
| 130 | + |
| 131 | + - [Accepted](docs/Accepted.md) |
| 132 | + - [Aperture](docs/Aperture.md) |
| 133 | + - [App](docs/App.md) |
| 134 | + - [Arguments](docs/Arguments.md) |
| 135 | + - [Artifact](docs/Artifact.md) |
| 136 | + - [Auth0TokenResponse](docs/Auth0TokenResponse.md) |
| 137 | + - [CreatedContent](docs/CreatedContent.md) |
| 138 | + - [DAG](docs/DAG.md) |
| 139 | + - [DAGTask](docs/DAGTask.md) |
| 140 | + - [Face](docs/Face.md) |
| 141 | + - [Function](docs/Function.md) |
| 142 | + - [Glass](docs/Glass.md) |
| 143 | + - [HTTPLocation](docs/HTTPLocation.md) |
| 144 | + - [HTTPValidationError](docs/HTTPValidationError.md) |
| 145 | + - [KeySecret](docs/KeySecret.md) |
| 146 | + - [Language](docs/Language.md) |
| 147 | + - [LocalLocation](docs/LocalLocation.md) |
| 148 | + - [LocalRequirements](docs/LocalRequirements.md) |
| 149 | + - [LoopControl](docs/LoopControl.md) |
| 150 | + - [Model](docs/Model.md) |
| 151 | + - [Model1](docs/Model1.md) |
| 152 | + - [ModelOut](docs/ModelOut.md) |
| 153 | + - [NewToken](docs/NewToken.md) |
| 154 | + - [NodeStatus](docs/NodeStatus.md) |
| 155 | + - [Opaque](docs/Opaque.md) |
| 156 | + - [Operator](docs/Operator.md) |
| 157 | + - [Outputs](docs/Outputs.md) |
| 158 | + - [Package](docs/Package.md) |
| 159 | + - [Parameter](docs/Parameter.md) |
| 160 | + - [Parent](docs/Parent.md) |
| 161 | + - [Plastic](docs/Plastic.md) |
| 162 | + - [QueenbeeArgoSchemaArgumentsArguments](docs/QueenbeeArgoSchemaArgumentsArguments.md) |
| 163 | + - [QueenbeeArgoSchemaArgumentsArtifact](docs/QueenbeeArgoSchemaArgumentsArtifact.md) |
| 164 | + - [QueenbeeArgoSchemaArgumentsParameter](docs/QueenbeeArgoSchemaArgumentsParameter.md) |
| 165 | + - [QueenbeeSchemaArgumentsArguments](docs/QueenbeeSchemaArgumentsArguments.md) |
| 166 | + - [QueenbeeSchemaArgumentsArtifact](docs/QueenbeeSchemaArgumentsArtifact.md) |
| 167 | + - [QueenbeeSchemaArgumentsParameter](docs/QueenbeeSchemaArgumentsParameter.md) |
| 168 | + - [ReferenceWorkflow](docs/ReferenceWorkflow.md) |
| 169 | + - [RetryStrategy](docs/RetryStrategy.md) |
| 170 | + - [S3Location](docs/S3Location.md) |
| 171 | + - [Sensor](docs/Sensor.md) |
| 172 | + - [SensorGridIn](docs/SensorGridIn.md) |
| 173 | + - [SensorGridIn1](docs/SensorGridIn1.md) |
| 174 | + - [SensorGridOut](docs/SensorGridOut.md) |
| 175 | + - [Sequence](docs/Sequence.md) |
| 176 | + - [ShadeFace](docs/ShadeFace.md) |
| 177 | + - [Status](docs/Status.md) |
| 178 | + - [Step](docs/Step.md) |
| 179 | + - [SubmitSimulation](docs/SubmitSimulation.md) |
| 180 | + - [Suspend](docs/Suspend.md) |
| 181 | + - [TaskContainer](docs/TaskContainer.md) |
| 182 | + - [Template](docs/Template.md) |
| 183 | + - [TemplateRef](docs/TemplateRef.md) |
| 184 | + - [Token](docs/Token.md) |
| 185 | + - [Transparent](docs/Transparent.md) |
| 186 | + - [ValidationError](docs/ValidationError.md) |
| 187 | + - [Vertex](docs/Vertex.md) |
| 188 | + - [Workflow](docs/Workflow.md) |
| 189 | + - [WorkflowListItem](docs/WorkflowListItem.md) |
| 190 | + - [WorkflowStep](docs/WorkflowStep.md) |
| 191 | + |
| 192 | + |
| 193 | +## Documentation For Authorization |
| 194 | + |
| 195 | + |
| 196 | +## JWT |
| 197 | + |
| 198 | +- **Type**: Bearer authentication |
| 199 | + |
| 200 | + |
| 201 | +## Author |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
0 commit comments