Skip to main content

FINBOURNE Luminesce Web API

Project description

luminesce-sdk

FINBOURNE Technology

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

  • API version: 1.16.404
  • Package version: 2.1.101
  • 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.
BinaryDownloadingApi get_binary_versions GET /api/Download/versions [EXPERIMENTAL] GetBinaryVersions: Gets the list of available versions of a user-downloadable binary from Nexus
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)
CurrentTableFieldCatalogApi get_fields GET /api/Catalog/fields GetFields: Shows Table level information on Providers that are currently running that you have access to (in Json format)
CurrentTableFieldCatalogApi get_providers GET /api/Catalog/providers GetProviders: Shows Table level information on Providers that are currently running that you have access to (in Json format)
HealthCheckingEndpointApi fake_node_reclaim GET /fakeNodeReclaim [INTERNAL] FakeNodeReclaim: An internal Method used to mark the next SIGTERM as though an Aws Node reclaim were about to take place.
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_inlined_properties_design_sql_to_design PUT /api/Sql/toinlinedpropertiesdesign [EXPERIMENTAL] PutInlinedPropertiesDesignSqlToDesign: Generates a SQL-inlined-properties-design object from SQL string, if possible.
SqlDesignApi put_inlined_properties_design_to_sql PUT /api/Sql/frominlinedpropertiesdesign [EXPERIMENTAL] PutInlinedPropertiesDesignToSql: Generates inlined properties SQL from a structured 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_extract_scalar_parameters PUT /api/Sql/extractscalarparameters [EXPERIMENTAL] PutSqlToExtractScalarParameters: Generates information about all the scalar parameters defined in the given SQL statement
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

Documentation For Authorization

Authentication schemes defined for the API:

oauth2

Author

info@finbourne.com

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

luminesce_sdk-2.1.101.tar.gz (103.6 kB view details)

Uploaded Source

Built Distribution

luminesce_sdk-2.1.101-py3-none-any.whl (179.8 kB view details)

Uploaded Python 3

File details

Details for the file luminesce_sdk-2.1.101.tar.gz.

File metadata

  • Download URL: luminesce_sdk-2.1.101.tar.gz
  • Upload date:
  • Size: 103.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.2 Linux/5.15.129-flatcar

File hashes

Hashes for luminesce_sdk-2.1.101.tar.gz
Algorithm Hash digest
SHA256 a4348da3c48da3fb2541c12def71e74dedbd5bb1bf9549661e589bdfe2c04984
MD5 3fedb62e6dd094cd50db9cbdd0f3d42a
BLAKE2b-256 75133782d6f2dfd35bcd35c466c500a28ab0c7e4efc164df416ecdbe6d5fae4d

See more details on using hashes here.

File details

Details for the file luminesce_sdk-2.1.101-py3-none-any.whl.

File metadata

  • Download URL: luminesce_sdk-2.1.101-py3-none-any.whl
  • Upload date:
  • Size: 179.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.2 Linux/5.15.129-flatcar

File hashes

Hashes for luminesce_sdk-2.1.101-py3-none-any.whl
Algorithm Hash digest
SHA256 9152a636b9f34fb100fd086df3c8647c5df298b0fd2580d3333288d80a3df564
MD5 2488ad078eddadd011f1c8efb4fb6678
BLAKE2b-256 174c9dfed842c7713c20f38a5cc870c9350d31a6cf4488273d20bfcd79390767

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page