FINBOURNE Luminesce Web API
Project description
luminesce-sdk
FINBOURNE Technology
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.15.113
- Package version: 2.1.21
- 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/luminesce-sdk-python.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/finbourne/luminesce-sdk-python.git)
Then import the package:
import luminesce
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 luminesce
Tests
Execute pytest to run the tests.
Getting Started
You'll need to provide some configuration to connect to the luminesce 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_LUMINESCE_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_LUMINESCE_API_URL,
FBN_ACCESS_TOKEN
You can send your requests to luminesce 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>",
"luminesceUrl":"<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":
{
"luminesceUrl":"<FINBOURNE-application-url>",
"accessToken":"<your-access-token>"
}
}
You can send your requests to luminesce 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":
{
"luminesceUrl":"<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 luminesce
from luminesce.exceptions import ApiException
from pprint import pprint
import os
from luminesce import (
ApiClientFactory,
ApplicationMetadataApi,
EnvironmentVariablesConfigurationLoader,
SecretsFileConfigurationLoader,
ArgsConfigurationLoader
)
# Use the luminesce 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/honeycomb"
# 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:
# GetServicesAsAccessControlledResources: Get resources available for access control
api_response = await api_instance.get_services_as_access_controlled_resources()
print("The response of ApplicationMetadataApi->get_services_as_access_controlled_resources:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ApplicationMetadataApi->get_services_as_access_controlled_resources: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://fbn-prd.lusid.com/honeycomb
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ApplicationMetadataApi | get_services_as_access_controlled_resources | GET /api/metadata/access/resources | GetServicesAsAccessControlledResources: Get resources available for access control |
| BinaryDownloadingApi | download_binary | GET /api/Download/download | [EXPERIMENTAL] DownloadBinary: Downloads the latest version (or specific if needs be) of the specified Luminesce Binary, given the required entitlements. |
| CertificateManagementApi | download_certificate | GET /api/Certificate/certificate | [EXPERIMENTAL] DownloadCertificate: Downloads your latest Domain or User certificate's public or private key - if any |
| CertificateManagementApi | list_certificates | GET /api/Certificate/certificates | [EXPERIMENTAL] ListCertificates: Lists all the certificates previously minted to which you have access |
| CertificateManagementApi | manage_certificate | PUT /api/Certificate/manage | [EXPERIMENTAL] ManageCertificate: Manages a new certificate (Create / Renew / Revoke) |
| CurrentTableFieldCatalogApi | get_catalog | GET /api/Catalog | GetCatalog: Shows Table and Field level information on Providers that are currently running that you have access to (in Json format) |
| HistoricallyExecutedQueriesApi | cancel_history | DELETE /api/History/{executionId} | CancelHistory: Cancels (if running) or clears the data from (if completed) a previously started History query |
| HistoricallyExecutedQueriesApi | fetch_history_result_histogram | GET /api/History/{executionId}/histogram | FetchHistoryResultHistogram: Fetches the result from a previously started query, converts it to a histogram (counts in buckets). |
| HistoricallyExecutedQueriesApi | fetch_history_result_json | GET /api/History/{executionId}/json | FetchHistoryResultJson: Fetches the result from a previously started query, in JSON format. |
| HistoricallyExecutedQueriesApi | get_history | GET /api/History | GetHistory: Shows queries executed in a given historical time window (in Json format). |
| HistoricallyExecutedQueriesApi | get_progress_of_history | GET /api/History/{executionId} | GetProgressOfHistory: View progress information (up until this point) of a history query |
| MultiQueryExecutionApi | cancel_multi_query | DELETE /api/MultiQueryBackground/{executionId} | CancelMultiQuery: Cancels (if running) or clears the data from (if completed) a previously started query-set |
| MultiQueryExecutionApi | get_progress_of_multi_query | GET /api/MultiQueryBackground/{executionId} | GetProgressOfMultiQuery: View progress information (up until this point) for the entire query-set |
| MultiQueryExecutionApi | start_queries | PUT /api/MultiQueryBackground | StartQueries: Starts to Execute the LuminesceSql statements in the background. |
| SqlBackgroundExecutionApi | cancel_query | DELETE /api/SqlBackground/{executionId} | CancelQuery: Cancels (if running) or clears the data from (if completed) a previously started query |
| SqlBackgroundExecutionApi | fetch_query_result_csv | GET /api/SqlBackground/{executionId}/csv | FetchQueryResultCsv: Fetches the result from a previously started query, in CSV format. |
| SqlBackgroundExecutionApi | fetch_query_result_excel | GET /api/SqlBackground/{executionId}/excel | FetchQueryResultExcel: Fetches the result from a previously started query, in Excel format. |
| SqlBackgroundExecutionApi | fetch_query_result_histogram | GET /api/SqlBackground/{executionId}/histogram | FetchQueryResultHistogram: Fetches the result from a previously started query, converts it to a histogram (counts in buckets). |
| SqlBackgroundExecutionApi | fetch_query_result_json | GET /api/SqlBackground/{executionId}/json | FetchQueryResultJson: Fetches the result from a previously started query, in JSON string format. Please move to '/jsonProper' instead. This may be marked as Deprecated in the future. |
| SqlBackgroundExecutionApi | fetch_query_result_json_proper | GET /api/SqlBackground/{executionId}/jsonProper | FetchQueryResultJsonProper: Fetches the result from a previously started query, in JSON format. |
| SqlBackgroundExecutionApi | fetch_query_result_parquet | GET /api/SqlBackground/{executionId}/parquet | FetchQueryResultParquet: Fetches the result from a previously started query, in Parquet format. |
| SqlBackgroundExecutionApi | fetch_query_result_pipe | GET /api/SqlBackground/{executionId}/pipe | FetchQueryResultPipe: Fetches the result from a previously started query, in pipe-delimited format. |
| SqlBackgroundExecutionApi | fetch_query_result_sqlite | GET /api/SqlBackground/{executionId}/sqlite | FetchQueryResultSqlite: Fetches the result from a previously started query, in SqLite format. |
| SqlBackgroundExecutionApi | fetch_query_result_xml | GET /api/SqlBackground/{executionId}/xml | FetchQueryResultXml: Fetches the result from a previously started query, in Xml format. |
| SqlBackgroundExecutionApi | get_progress_of | GET /api/SqlBackground/{executionId} | GetProgressOf: View progress information (up until this point) |
| SqlBackgroundExecutionApi | start_query | PUT /api/SqlBackground | StartQuery: Starts to Execute LuminesceSql in the background. |
| SqlDesignApi | put_file_read_design_to_sql | PUT /api/Sql/fromfilereaddesign | [EXPERIMENTAL] PutFileReadDesignToSql: Generates file read SQL from a structured query design |
| SqlDesignApi | put_intellisense | PUT /api/Sql/intellisense | [EXPERIMENTAL] PutIntellisense: Generate a set of possible intellisense prompts given a SQL snip-it (in need not yet be valid) and cursor location |
| SqlDesignApi | put_intellisense_error | PUT /api/Sql/intellisenseError | [EXPERIMENTAL] PutIntellisenseError: Generate a set of error ranges, if any, in the given SQL (expressed as Lines) |
| SqlDesignApi | put_query_design_to_sql | PUT /api/Sql/fromdesign | [EXPERIMENTAL] PutQueryDesignToSql: Generates SQL from a structured query design |
| SqlDesignApi | put_query_to_format | PUT /api/Sql/pretty | PutQueryToFormat: Formats SQL into a more readable form, a.k.a. Pretty-Print the SQL. |
| SqlDesignApi | put_sql_to_file_read_design | PUT /api/Sql/tofilereaddesign | [EXPERIMENTAL] PutSqlToFileReadDesign: Generates a SQL-file-read-design object from SQL string, if possible. |
| SqlDesignApi | put_sql_to_query_design | PUT /api/Sql/todesign | [EXPERIMENTAL] PutSqlToQueryDesign: Generates a SQL-design object from SQL string, if possible. |
| SqlDesignApi | put_sql_to_view_design | PUT /api/Sql/toviewdesign | [EXPERIMENTAL] PutSqlToViewDesign: Generates a structured view creation design from existing view creation SQL. |
| SqlDesignApi | put_sql_to_writer_design | PUT /api/Sql/towriterdesign | [EXPERIMENTAL] PutSqlToWriterDesign: Generates a SQL-writer-design object from SQL string, if possible. |
| SqlDesignApi | put_view_design_to_sql | PUT /api/Sql/fromviewdesign | [EXPERIMENTAL] PutViewDesignToSql: Generates view creation sql from a structured view creation design |
| SqlDesignApi | put_writer_design_to_sql | PUT /api/Sql/fromwriterdesign | [EXPERIMENTAL] PutWriterDesignToSql: Generates writer SQL from a valid writer-design structure |
| SqlExecutionApi | get_by_query_csv | GET /api/Sql/csv/{query} | GetByQueryCsv: Executes Sql, returned in CSV format, where the sql is simply in the url. |
| SqlExecutionApi | get_by_query_excel | GET /api/Sql/excel/{query} | GetByQueryExcel: Executes Sql, returned in Excel (xlsx) format (as a file to be downloaded) format, where the sql is simply in the url. |
| SqlExecutionApi | get_by_query_json | GET /api/Sql/json/{query} | GetByQueryJson: Executes Sql, returned in JSON format, where the sql is simply in the url. |
| SqlExecutionApi | get_by_query_parquet | GET /api/Sql/parquet/{query} | GetByQueryParquet: Executes Sql, returned in Parquet (.parquet) format (as a file to be downloaded) format, where the sql is simply in the url. |
| SqlExecutionApi | get_by_query_pipe | GET /api/Sql/pipe/{query} | GetByQueryPipe: Executes Sql, returned in pipe-delimited format, where the sql is simply in the url. |
| SqlExecutionApi | get_by_query_sqlite | GET /api/Sql/sqlite/{query} | GetByQuerySqlite: Executes Sql, returned in SqLite DB (sqlite3) format (as a file to be downloaded) format, where the sql is simply in the url. |
| SqlExecutionApi | get_by_query_xml | GET /api/Sql/xml/{query} | GetByQueryXml: Executes Sql, returned in Xml format, where the sql is simply in the url. |
| SqlExecutionApi | put_by_query_csv | PUT /api/Sql/csv | PutByQueryCsv: Executes Sql, returned in CSV format, where the sql is the post-body url. |
| SqlExecutionApi | put_by_query_excel | PUT /api/Sql/excel | PutByQueryExcel: Executes Sql, returned in Excel (xlsx) format (as a file to be downloaded), where the sql is the post-body url. |
| SqlExecutionApi | put_by_query_json | PUT /api/Sql/json | PutByQueryJson: Executes Sql, returned in JSON format, where the sql is the post-body url. |
| SqlExecutionApi | put_by_query_parquet | PUT /api/Sql/parquet | PutByQueryParquet: Executes Sql, returned in Parquet format, where the sql is the post-body url. |
| SqlExecutionApi | put_by_query_pipe | PUT /api/Sql/pipe | PutByQueryPipe: Executes Sql, returned in pipe-delimited format, where the sql is the post-body url. |
| SqlExecutionApi | put_by_query_sqlite | PUT /api/Sql/sqlite | PutByQuerySqlite: Executes Sql, returned in SqLite DB (sqlite3) format (as a file to be downloaded), where the sql is the post-body url. |
| SqlExecutionApi | put_by_query_xml | PUT /api/Sql/xml | PutByQueryXml: Executes Sql, returned in Xml format, where the sql is the post-body url. |
Documentation For Models
- AccessControlledAction
- AccessControlledResource
- AccessControlledResourceIdentifierPartSchemaAttribute
- ActionId
- AggregateFunction
- Aggregation
- AutoDetectType
- AvailableField
- AvailableParameter
- BackgroundMultiQueryProgressResponse
- BackgroundMultiQueryResponse
- BackgroundQueryCancelResponse
- BackgroundQueryProgressResponse
- BackgroundQueryResponse
- BackgroundQueryState
- CertificateAction
- CertificateFileType
- CertificateState
- CertificateStatus
- CertificateType
- Column
- ColumnInfo
- ConditionAttributes
- ConvertToViewData
- CursorPosition
- DataType
- ErrorHighlightItem
- ErrorHighlightRequest
- ErrorHighlightResponse
- ExpressionWithAlias
- FeedbackEventArgs
- FeedbackLevel
- FieldDesign
- FieldType
- FileReaderBuilderDef
- FileReaderBuilderResponse
- FilterTermDesign
- IdSelectorDefinition
- IntellisenseItem
- IntellisenseRequest
- IntellisenseResponse
- IntellisenseType
- Link
- LuminesceBinaryType
- LusidProblemDetails
- MappableField
- MappingFlags
- MultiQueryDefinitionType
- OptionsCsv
- OptionsExcel
- OptionsParquet
- OptionsSqLite
- OptionsXml
- OrderByDirection
- OrderByTermDesign
- QueryDesign
- QueryDesignerBinaryOperator
- ResourceListOfAccessControlledResource
- Source
- SourceType
- TaskStatus
- ViewParameter
- WriterDesign
Documentation For Authorization
Authentication schemes defined for the API:
oauth2
- Type: OAuth
- Flow: implicit
- Authorization URL: https://lusid-fbn-ci.okta.com/oauth2/aus49h9b8rQPvouCH2p7/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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file luminesce_sdk-2.1.21.tar.gz.
File metadata
- Download URL: luminesce_sdk-2.1.21.tar.gz
- Upload date:
- Size: 98.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.8.2 Linux/5.15.106-flatcar
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c08be02999fd852a4b693e2a970f4b60827cce0c69abb89b54cd52aac6613cf
|
|
| MD5 |
8d9dffe8e737c948d7886836885abb20
|
|
| BLAKE2b-256 |
8cbb65f12456c36c9e506131feffe2d17bd6521afbf4815e3f24eea5df61b90b
|
File details
Details for the file luminesce_sdk-2.1.21-py3-none-any.whl.
File metadata
- Download URL: luminesce_sdk-2.1.21-py3-none-any.whl
- Upload date:
- Size: 169.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.8.2 Linux/5.15.106-flatcar
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c068dac8b828851e613c762fe3692068e37f5433a35ab07f47e426300027041
|
|
| MD5 |
31b96c2be0d9565cdb25a38a64208b41
|
|
| BLAKE2b-256 |
eac0a0fbb99fb19fdedb5e47887d0300458d6b1db5d767f5201900f7e8dd0e8c
|