FINBOURNE Workflow API
Project description
lusid-workflow-sdk
FINBOURNE Technology
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.1179
- Package version: 2.1.73
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.finbourne.com
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/finbourne/workflow-sdk-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/finbourne/workflow-sdk-python.git
)
Then import the package:
import lusid_workflow
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 lusid_workflow
Tests
Execute pytest
to run the tests.
Getting Started
You'll need to provide some configuration to connect to the lusid_workflow application. These can be provided using a secrets file or environment variables.
Environment variables
In order to use short lived access tokens you will need to have appropriate values set for the following environment variables:
FBN_TOKEN_URL,
FBN_LUSID_WORKFLOW_API_URL,
FBN_USERNAME,
FBN_PASSWORD,
FBN_CLIENT_ID,
FBN_CLIENT_SECRET
To use a long lived Personal Access Token, you must provide the following environment variables:
FBN_LUSID_WORKFLOW_API_URL,
FBN_ACCESS_TOKEN
You can send your requests to lusid_workflow via a proxy, by setting FBN_PROXY_ADDRESS
.
If your proxy has basic auth enabled, you must akso supply FBN_PROXY_USERNAME
and FBN_PROXY_PASSWORD
Secrets file
In order to use short lived access tokens you will need to have appropriate values set in a secrets.json
file in the same folder as your script.
{
"api":
{
"tokenUrl":"<your-token-url>",
"lusid_workflowUrl":"<FINBOURNE-application-url>",
"username":"<your-username>",
"password":"<your-password>",
"clientId":"<your-client-id>",
"clientSecret":"<your-client-secret>",
}
}
To use a long lived Personal Access Token, you must provide a secrets.json
with the following variables:
{
"api":
{
"lusid_workflowUrl":"<FINBOURNE-application-url>",
"accessToken":"<your-access-token>"
}
}
You can send your requests to lusid_workflow via a proxy, by adding a proxy section to your secrets.json
.
If your proxy has basic auth enabled, you must also supply a username
and password
in this section.
{
"api":
{
"lusid_workflowUrl":"<FINBOURNE-application-url>",
"accessToken":"<your-access-token>"
},
"proxy":
{
"address":"<your-proxy-address>",
"username":"<your-proxy-username>",
"password":"<your-proxy-password>"
}
}
Using the SDK
Please follow the installation procedure and then run the following:
import time
import lusid_workflow
from lusid_workflow.exceptions import ApiException
from pprint import pprint
import os
from lusid_workflow import (
ApiClientFactory,
ApplicationMetadataApi,
EnvironmentVariablesConfigurationLoader,
SecretsFileConfigurationLoader,
ArgsConfigurationLoader
)
# Use the lusid_workflow ApiClientFactory to build Api instances with a configured api client
# By default this will read config from environment variables
# Then from a secrets.json file found in the current working directory
api_client_factory = ApiClientFactory()
# The ApiClientFactory can be passed an iterable of configuration loaders to read configuration from
api_url = "https://fbn-prd.lusid.com/workflow"
# Path to a secrets.json file containing authentication credentials
# See https://support.lusid.com/knowledgebase/article/KA-01667/en-us
# for a detailed guide to setting up the SDK make authenticated calls to LUSID APIs
secrets_path = os.getenv("FBN_SECRETS_PATH")
app_name="LusidJupyterNotebook"
config_loaders = [
EnvironmentVariablesConfigurationLoader(),
SecretsFileConfigurationLoader(api_secrets_file=secrets_path),
ArgsConfigurationLoader(api_url=api_url, app_name=app_name)
]
api_client_factory = ApiClientFactory(config_loaders=config_loaders)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Enter a context with an instance of the ApiClientFactory to ensure the connection pool is closed after use
async with api_client_factory:
# Create an instance of the API class
api_instance = api_client_factory.build(ApplicationMetadataApi)
try:
# [EXPERIMENTAL] ListAccessControlledResources: Get resources available for access control
api_response = await api_instance.list_access_controlled_resources()
print("The response of ApplicationMetadataApi->list_access_controlled_resources:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ApplicationMetadataApi->list_access_controlled_resources: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://fbn-prd.lusid.com/workflow
Class | Method | HTTP request | Description |
---|---|---|---|
ApplicationMetadataApi | list_access_controlled_resources | GET /api/metadata/access/resources | [EXPERIMENTAL] ListAccessControlledResources: Get resources available for access control |
EventHandlersApi | create_event_handler | POST /api/eventhandlers | [EXPERIMENTAL] CreateEventHandler: Create a new Event Handler |
EventHandlersApi | delete_event_handler | DELETE /api/eventhandlers/{scope}/{code} | [EXPERIMENTAL] DeleteEventHandler: Delete an Event Handler |
EventHandlersApi | get_event_handler | GET /api/eventhandlers/{scope}/{code} | [EXPERIMENTAL] GetEventHandler: Get an Event Handler |
EventHandlersApi | list_event_handlers | GET /api/eventhandlers | [EXPERIMENTAL] ListEventHandlers: List Event Handlers |
EventHandlersApi | update_event_handler | PUT /api/eventhandlers/{scope}/{code} | [EXPERIMENTAL] UpdateEventHandler: Update an existing Event handler |
TaskDefinitionsApi | create_task_definition | POST /api/taskdefinitions | [EXPERIMENTAL] CreateTaskDefinition: Create a new Task Definition |
TaskDefinitionsApi | delete_task_definition | DELETE /api/taskdefinitions/{scope}/{code} | [EXPERIMENTAL] DeleteTaskDefinition: Delete a Task Definition |
TaskDefinitionsApi | get_task_definition | GET /api/taskdefinitions/{scope}/{code} | [EXPERIMENTAL] GetTaskDefinition: Get a Task Definition |
TaskDefinitionsApi | list_task_definitions | GET /api/taskdefinitions | [EXPERIMENTAL] ListTaskDefinitions: List Task Definitions |
TaskDefinitionsApi | list_tasks_for_task_definition | GET /api/taskdefinitions/{scope}/{code}/tasks | [EXPERIMENTAL] ListTasksForTaskDefinition: List Tasks for a Task Definition |
TaskDefinitionsApi | update_task_definition | PUT /api/taskdefinitions/{scope}/{code} | [EXPERIMENTAL] UpdateTaskDefinition: Update an existing Task Definition |
TasksApi | create_task | POST /api/tasks | [EXPERIMENTAL] CreateTask: Create a new Task |
TasksApi | delete_task | DELETE /api/tasks/{id} | [EXPERIMENTAL] DeleteTask: Delete a Task |
TasksApi | get_task | GET /api/tasks/{id} | [EXPERIMENTAL] GetTask: Get a Task |
TasksApi | list_tasks | GET /api/tasks | [EXPERIMENTAL] ListTasks: List Tasks |
TasksApi | update_task | POST /api/tasks/{id} | [EXPERIMENTAL] UpdateTask: Update a Task |
WorkersApi | create_worker | POST /api/workers | [EXPERIMENTAL] CreateWorker: Create a new Worker |
WorkersApi | delete_worker | DELETE /api/workers/{scope}/{code} | [EXPERIMENTAL] DeleteWorker: Delete a Worker |
WorkersApi | get_worker | GET /api/workers/{scope}/{code} | [EXPERIMENTAL] GetWorker: Get a Worker |
WorkersApi | get_worker_result | GET /api/workers/{runId}/$result | [EXPERIMENTAL] GetWorkerResult: Get the status of a specific run of a worker with any relevant results |
WorkersApi | list_workers | GET /api/workers | [EXPERIMENTAL] ListWorkers: List Workers |
WorkersApi | run_worker | POST /api/workers/{scope}/{code}/$run | [EXPERIMENTAL] RunWorker: Run a Worker |
WorkersApi | update_worker | PUT /api/workers/{scope}/{code} | [EXPERIMENTAL] UpdateWorker: Update a Worker |
Documentation For Models
- AccessControlledAction
- AccessControlledResource
- ActionDefinition
- ActionDefinitionResponse
- ActionDetails
- ActionDetailsResponse
- ActionId
- CreateChildTaskConfiguration
- CreateChildTasksAction
- CreateChildTasksActionResponse
- CreateEventHandlerRequest
- CreateNewTaskActivity
- CreateNewTaskActivityResponse
- CreateTaskDefinitionRequest
- CreateTaskRequest
- CreateWorkerRequest
- DeletedEntityResponse
- EventHandler
- EventHandlerMapping
- EventMatchingPattern
- Fail
- FailResponse
- FieldMapping
- GetWorkerResultResponse
- HealthCheck
- HealthCheckResponse
- IdSelectorDefinition
- IdentifierPartSchema
- InitialState
- Link
- LuminesceView
- LuminesceViewResponse
- LusidProblemDetails
- LusidValidationProblemDetails
- PagedResourceListOfEventHandler
- PagedResourceListOfTask
- PagedResourceListOfTaskDefinition
- PagedResourceListOfWorker
- Parameter
- ParameterValue
- ReadOnlyStates
- ResourceId
- ResourceListOfAccessControlledResource
- ResourceListOfTask
- ResultField
- ResultMatchingPattern
- ResultantChildTaskConfiguration
- RunWorkerAction
- RunWorkerActionResponse
- RunWorkerRequest
- RunWorkerResponse
- SchedulerJob
- SchedulerJobResponse
- Sleep
- SleepResponse
- Stack
- Task
- TaskActivity
- TaskActivityResponse
- TaskDefinition
- TaskDefinitionVersion
- TaskFieldDefinition
- TaskInstanceField
- TaskStateDefinition
- TaskSummary
- TaskTransitionDefinition
- TransitionTriggerDefinition
- TriggerParentTaskAction
- TriggerParentTaskActionResponse
- TriggerSchema
- UpdateEventHandlerRequest
- UpdateMatchingTasksActivity
- UpdateMatchingTasksActivityResponse
- UpdateTaskDefinitionRequest
- UpdateTaskRequest
- UpdateWorkerRequest
- ValueConstraints
- VersionInfo
- Worker
- WorkerConfiguration
- WorkerConfigurationResponse
- WorkerStatusTriggers
Documentation For Authorization
Authentication schemes defined for the API:
oauth2
- Type: OAuth
- Flow: implicit
- Authorization URL: https://lusid.okta.com/oauth2/default/v1/authorize
- Scopes: N/A
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lusid_workflow_sdk-2.1.73.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 971dd709662e8e1b8345fe9ba7cb1c2afb7ac681ba71b949266df23beffc761e |
|
MD5 | 935c226a9cda93f280955c1c1b9bda21 |
|
BLAKE2b-256 | 66cab15229ab126a69d3a48a988161d77569f250e15bc7e4d17f7151856f4e70 |
Hashes for lusid_workflow_sdk-2.1.73-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 018bb9256364e8f74daed57f9945907779eea8a4841a29a3a452b57afb0b3a9f |
|
MD5 | daba2e476453480d2ec8298f2c45ce14 |
|
BLAKE2b-256 | 4e5bd51ea4efa6971e138f5fcf340ed8b062017970cfcd794a5bf40680ae20e5 |