FINBOURNE Horizon API
Project description
finbourne-horizon-sdk
FINBOURNE Technology
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.397
- Package version: 2.0.103
- 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/horizon-sdk-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/finbourne/horizon-sdk-python.git
)
Then import the package:
import finbourne_horizon
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 finbourne_horizon
Tests
Execute pytest
to run the tests.
Getting Started
You'll need to provide some configuration to connect to the finbourne_horizon 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_FINBOURNE_HORIZON_API_URL,
FBN_USERNAME,
FBN_PASSWORD,
FBN_CLIENT_ID,
FBN_CLIENT_SECRET,
FBN_ACCESS_TOKEN
To use a long lived Personal Access Token, you must provide the following environment variables:
FBN_FINBOURNE_HORIZON_API_URL,
FBN_ACCESS_TOKEN
You can send your requests to finbourne_horizon 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>",
"finbourne_horizonUrl":"<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":
{
"finbourne_horizonUrl":"<FINBOURNE-application-url>",
"accessToken":"<your-access-token>"
}
}
You can send your requests to finbourne_horizon 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":
{
"finbourne_horizonUrl":"<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 finbourne_horizon
from finbourne_horizon.exceptions import ApiException
from pprint import pprint
import os
from finbourne_horizon import (
ApiClientFactory,
InstrumentApi,
EnvironmentVariablesConfigurationLoader,
SecretsFileConfigurationLoader,
ArgsConfigurationLoader
)
# Use the finbourne_horizon 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/horizon"
# 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(InstrumentApi)
onboard_instrument_request = finbourne_horizon.OnboardInstrumentRequest() # OnboardInstrumentRequest |
try:
# [EARLY ACCESS] CreateInstrument: Creates and masters instruments with third party vendors.
api_response = await api_instance.create_instrument(onboard_instrument_request)
print("The response of InstrumentApi->create_instrument:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling InstrumentApi->create_instrument: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://fbn-prd.lusid.com/horizon
Class | Method | HTTP request | Description |
---|---|---|---|
InstrumentApi | create_instrument | POST /api/instrument/onboarding/create | [EARLY ACCESS] CreateInstrument: Creates and masters instruments with third party vendors. |
InstrumentApi | enrich_instrument | POST /api/instrument/onboarding/enrich | [EARLY ACCESS] EnrichInstrument: Enriches an existing LUSID instrument using vendor data. Enrichment included identifiers, properties and market data. |
InstrumentApi | get_open_figi_parameter_option | GET /api/instrument/onboarding/search/openfigi/parameterOptions | [EARLY ACCESS] GetOpenFigiParameterOption: Get all supported market sector values for OpenFigi search |
InstrumentApi | retrieve_perm_id_result | GET /api/instrument/onboarding/search/permid/{id} | [EARLY ACCESS] RetrievePermIdResult: Retrieve PermId results from a previous query. |
InstrumentApi | search_open_figi | GET /api/instrument/onboarding/search/openfigi | [EARLY ACCESS] SearchOpenFigi: Search OpenFigi for instruments that match the specified terms. |
InstrumentApi | vendors | GET /api/instrument/onboarding/vendors | [EARLY ACCESS] Vendors: Gets the VendorProducts of any supported and licenced integrations for a given market sector and security type. |
IntegrationsApi | create_instance | POST /api/integrations/instances | [EXPERIMENTAL] CreateInstance: Create a single integration instance. |
IntegrationsApi | delete_instance | DELETE /api/integrations/instances/{instanceId} | [EXPERIMENTAL] DeleteInstance: Delete a single integration instance. |
IntegrationsApi | execute_instance | POST /api/integrations/instances/{instanceId}/execute | [EXPERIMENTAL] ExecuteInstance: Execute an integration instance. |
IntegrationsApi | get_execution_ids_for_instance | GET /api/integrations/instances/{instanceId}/executions | [EXPERIMENTAL] GetExecutionIdsForInstance: Get integration instance execution ids. |
IntegrationsApi | get_schema | GET /api/integrations/schema/{integration} | [EXPERIMENTAL] GetSchema: Get the JSON schema for the details section of an integration instance. |
IntegrationsApi | list_instances | GET /api/integrations/instances | [EXPERIMENTAL] ListInstances: List instances across all integrations. |
IntegrationsApi | list_integrations | GET /api/integrations | [EXPERIMENTAL] ListIntegrations: List available integrations. |
IntegrationsApi | update_instance | PUT /api/integrations/instances/{instanceId} | [EXPERIMENTAL] UpdateInstance: Update a single integration instance. |
ProcessHistoryApi | create_complete_event | POST /api/process-history/event/complete | [EARLY ACCESS] CreateCompleteEvent: Write a completed event to the Horizon Dashboard |
ProcessHistoryApi | create_update_event | POST /api/process-history/event/update | [EARLY ACCESS] CreateUpdateEvent: Write an update event to the Horizon Dashboard |
ProcessHistoryApi | get_latest_runs | GET /api/process-history/$latestRuns | [EARLY ACCESS] GetLatestRuns: Get latest run for each process |
ProcessHistoryApi | process_entry_updates | POST /api/process-history/entries/$query | [EARLY ACCESS] ProcessEntryUpdates: Get process entry updates for a query |
ProcessHistoryApi | process_history_entries | POST /api/process-history/$query | [EARLY ACCESS] ProcessHistoryEntries: Get process history entries |
VendorApi | get_core_field_mappings_for_product_entity | GET /api/vendor/mappings/fields | [EARLY ACCESS] GetCoreFieldMappingsForProductEntity: Get core field mappings for a given vendor product's entity. |
VendorApi | get_optional_mappings_for_product_entity | GET /api/vendor/mappings/optional | [EARLY ACCESS] GetOptionalMappingsForProductEntity: Get a user defined LUSID property mappings for the specified vendor / LUSID entity. |
VendorApi | get_property_mappings_for_product_entity | GET /api/vendor/mappings/properties | [EARLY ACCESS] GetPropertyMappingsForProductEntity: Gets the property mappings for a given vendor product's entity |
VendorApi | query_vendors | POST /api/vendor/$query | [EARLY ACCESS] QueryVendors: Query for vendors and their packages with entities and sub-entities. |
VendorApi | set_optional_mappings_for_product_entity | POST /api/vendor/mappings/optional | [EARLY ACCESS] SetOptionalMappingsForProductEntity: Create a user defined LUSID property mappings for the specified vendor / LUSID entity. |
Documentation For Models
- AllowedParameterValue
- AuditCompleteRequest
- AuditCompleteResponse
- AuditCompleteStatus
- AuditFileDetails
- AuditFileType
- AuditUpdateRequest
- AuditUpdateResponse
- CreateInstanceRequest
- EnrichmentResponse
- ExecuteInstanceResponse
- FileDetails
- Identifiers
- InstanceIdentifier
- IntegrationDescription
- IntegrationInstance
- Link
- LusidEntity
- LusidField
- LusidProblemDetails
- LusidPropertyDefinition
- LusidPropertyDefinitionOverrides
- LusidPropertyDefinitionOverridesResponse
- LusidPropertyToVendorFieldMapping
- LusidValidationProblemDetails
- OnboardInstrumentRequest
- OnboardInstrumentResponse
- OpenFigiData
- OpenFigiParameterOptionName
- OpenFigiPermIdResult
- OpenFigiSearchResult
- Optionality
- PagedResourceListOfProcessInformation
- PagedResourceListOfProcessUpdateResult
- PagedResourceListOfVendorProduct
- PermIdData
- ProcessInformation
- ProcessSummary
- ProcessUpdateResult
- QueryRequest
- QuerySpecification
- ResourceId
- RowDetails
- Trigger
- UpdateInstanceRequest
- VendorProduct
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 finbourne_horizon_sdk-2.0.103.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 509347d2557b5f6cacc96748fb05c70e24944e5f910ed2a10a8ab4956a7538a4 |
|
MD5 | ff9c6f3eebe50e76fb2f4e0de822e107 |
|
BLAKE2b-256 | a0d0057e830cc00deb76cb6006ea293fe087f58783173b9bcbe1e1a491f3df42 |
Hashes for finbourne_horizon_sdk-2.0.103-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f72bef476438aca08ff2aad51e55826db38fa031e2d413cf5016ac28df17a220 |
|
MD5 | 26315167d43905481a04286e6efb061c |
|
BLAKE2b-256 | 575161dc0b8480922b74d585cd4514b560581737c401efcce6c5ce80ba03e528 |