Package: luminesce-sdk
luminesce-sdkFINBOURNE TechnologyThis Python package is automatically generated by theOpenAPI Generatorproject:API version: 1.14.615Package version: 2.0.108Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visithttps://www.finbourne.comRequirements.Python 3.7+Installation & Usagepip installIf the python package is hosted on a repository, you can install directly using:pipinstallgit+https://github.com/finbourne/luminesce-sdk-python.git(you may need to runpipwith root permission:sudo pip install git+https://github.com/finbourne/luminesce-sdk-python.git)Then import the package:importluminesceSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importluminesceTestsExecutepytestto run the tests.Getting StartedYou'll need to provide some configuration to connect to the luminesce application.
These can be provided using a secrets file or environment variables.Environment variablesIn order to useshort lived access tokensyou 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,
FBN_ACCESS_TOKENTo use a long lived Personal Access Token, you must provide the following environment variables:FBN_LUMINESCE_API_URL,
FBN_ACCESS_TOKENYou can send your requests to luminesce via a proxy, by settingFBN_PROXY_ADDRESS.
If your proxy has basic auth enabled, you must akso supplyFBN_PROXY_USERNAMEandFBN_PROXY_PASSWORDSecrets fileIn order to useshort lived access tokensyou will need to have appropriate values set in asecrets.jsonfile 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 asecrets.jsonwith 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 yoursecrets.json.
If your proxy has basic auth enabled, you must also supply ausernameandpasswordin 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 SDKPlease follow theinstallation procedureand then run the following:importtimeimportluminescefromluminesce.exceptionsimportApiExceptionfrompprintimportpprintimportosfromluminesceimport(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 directoryapi_client_factory=ApiClientFactory()# The ApiClientFactory can be passed an iterable of configuration loaders to read configuration fromapi_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 APIssecrets_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 useasyncwithapi_client_factory:# Create an instance of the API classapi_instance=api_client_factory.build(ApplicationMetadataApi)try:# GetServicesAsAccessControlledResources: Get resources available for access controlapi_response=awaitapi_instance.get_services_as_access_controlled_resources()print("The response of ApplicationMetadataApi->get_services_as_access_controlled_resources:\n")pprint(api_response)exceptApiExceptionase:print("Exception when calling ApplicationMetadataApi->get_services_as_access_controlled_resources:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttps://fbn-prd.lusid.com/honeycombClassMethodHTTP requestDescriptionApplicationMetadataApiget_services_as_access_controlled_resourcesGET/api/metadata/access/resourcesGetServicesAsAccessControlledResources: Get resources available for access controlBinaryDownloadingApidownload_binaryGET/api/Download/download[EXPERIMENTAL] DownloadBinary: Downloads the latest version (or specific if needs be) of the specified Luminesce Binary, given the required entitlements.CertificateManagementApidownload_certificateGET/api/Certificate/certificate[EXPERIMENTAL] DownloadCertificate: Downloads your latest Domain or User certificate's public or private key - if anyCertificateManagementApilist_certificatesGET/api/Certificate/certificates[EXPERIMENTAL] ListCertificates: Lists all the certificates previously minted to which you have accessCertificateManagementApimanage_certificatePUT/api/Certificate/manage[EXPERIMENTAL] ManageCertificate: Manages a new certificate (Create / Renew / Revoke)CurrentTableFieldCatalogApiget_catalogGET/api/CatalogGetCatalog: Shows Table and Field level information on Providers that are currently running that you have access to (in Json format)HistoricallyExecutedQueriesApicancel_historyDELETE/api/History/{executionId}CancelHistory: Cancels (if running) or clears the data from (if completed) a previously started History queryHistoricallyExecutedQueriesApifetch_history_result_histogramGET/api/History/{executionId}/histogramFetchHistoryResultHistogram: Fetches the result from a previously started query, converts it to a histogram (counts in buckets).HistoricallyExecutedQueriesApifetch_history_result_jsonGET/api/History/{executionId}/jsonFetchHistoryResultJson: Fetches the result from a previously started query, in JSON format.HistoricallyExecutedQueriesApiget_historyGET/api/HistoryGetHistory: Shows queries executed in a given historical time window (in Json format).HistoricallyExecutedQueriesApiget_progress_of_historyGET/api/History/{executionId}GetProgressOfHistory: View progress information (up until this point) of a history queryMultiQueryExecutionApicancel_multi_queryDELETE/api/MultiQueryBackground/{executionId}CancelMultiQuery: Cancels (if running) or clears the data from (if completed) a previously started query-setMultiQueryExecutionApiget_progress_of_multi_queryGET/api/MultiQueryBackground/{executionId}GetProgressOfMultiQuery: View progress information (up until this point) for the entire query-setMultiQueryExecutionApistart_queriesPUT/api/MultiQueryBackgroundStartQueries: Starts to Execute the LuminesceSql statements in the background.SqlBackgroundExecutionApicancel_queryDELETE/api/SqlBackground/{executionId}CancelQuery: Cancels (if running) or clears the data from (if completed) a previously started querySqlBackgroundExecutionApifetch_query_result_csvGET/api/SqlBackground/{executionId}/csvFetchQueryResultCsv: Fetches the result from a previously started query, in CSV format.SqlBackgroundExecutionApifetch_query_result_excelGET/api/SqlBackground/{executionId}/excelFetchQueryResultExcel: Fetches the result from a previously started query, in Excel format.SqlBackgroundExecutionApifetch_query_result_histogramGET/api/SqlBackground/{executionId}/histogramFetchQueryResultHistogram: Fetches the result from a previously started query, converts it to a histogram (counts in buckets).SqlBackgroundExecutionApifetch_query_result_jsonGET/api/SqlBackground/{executionId}/jsonFetchQueryResultJson: 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.SqlBackgroundExecutionApifetch_query_result_json_properGET/api/SqlBackground/{executionId}/jsonProperFetchQueryResultJsonProper: Fetches the result from a previously started query, in JSON format.SqlBackgroundExecutionApifetch_query_result_parquetGET/api/SqlBackground/{executionId}/parquetFetchQueryResultParquet: Fetches the result from a previously started query, in Parquet format.SqlBackgroundExecutionApifetch_query_result_pipeGET/api/SqlBackground/{executionId}/pipeFetchQueryResultPipe: Fetches the result from a previously started query, in pipe-delimited format.SqlBackgroundExecutionApifetch_query_result_sqliteGET/api/SqlBackground/{executionId}/sqliteFetchQueryResultSqlite: Fetches the result from a previously started query, in SqLite format.SqlBackgroundExecutionApifetch_query_result_xmlGET/api/SqlBackground/{executionId}/xmlFetchQueryResultXml: Fetches the result from a previously started query, in Xml format.SqlBackgroundExecutionApiget_progress_ofGET/api/SqlBackground/{executionId}GetProgressOf: View progress information (up until this point)SqlBackgroundExecutionApistart_queryPUT/api/SqlBackgroundStartQuery: Starts to Execute LuminesceSql in the background.SqlDesignApiput_file_read_design_to_sqlPUT/api/Sql/fromfilereaddesign[EXPERIMENTAL] PutFileReadDesignToSql: Generates file read SQL from a structured query designSqlDesignApiput_query_design_to_sqlPUT/api/Sql/fromdesign[EXPERIMENTAL] PutQueryDesignToSql: Generates SQL from a structured query designSqlDesignApiput_query_to_formatPUT/api/Sql/prettyPutQueryToFormat: Formats SQL into a more readable form, a.k.a. Pretty-Print the SQL.SqlDesignApiput_sql_to_file_read_designPUT/api/Sql/tofilereaddesign[EXPERIMENTAL] PutSqlToFileReadDesign: Generates a SQL-file-read-design object from SQL string, if possible.SqlDesignApiput_sql_to_query_designPUT/api/Sql/todesign[EXPERIMENTAL] PutSqlToQueryDesign: Generates a SQL-design object from SQL string, if possible.SqlDesignApiput_sql_to_view_designPUT/api/Sql/toviewdesign[EXPERIMENTAL] PutSqlToViewDesign: Generates a structured view creation design from existing view creation SQL.SqlDesignApiput_sql_to_writer_designPUT/api/Sql/towriterdesign[EXPERIMENTAL] PutSqlToWriterDesign: Generates a SQL-writer-design object from SQL string, if possible.SqlDesignApiput_view_design_to_sqlPUT/api/Sql/fromviewdesign[EXPERIMENTAL] PutViewDesignToSql: Generates view creation sql from a structured view creation designSqlDesignApiput_writer_design_to_sqlPUT/api/Sql/fromwriterdesign[EXPERIMENTAL] PutWriterDesignToSql: Generates writer SQL from a valid writer-design structureSqlExecutionApiget_by_query_csvGET/api/Sql/csv/{query}GetByQueryCsv: Executes Sql, returned in CSV format, where the sql is simply in the url.SqlExecutionApiget_by_query_excelGET/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.SqlExecutionApiget_by_query_jsonGET/api/Sql/json/{query}GetByQueryJson: Executes Sql, returned in JSON format, where the sql is simply in the url.SqlExecutionApiget_by_query_parquetGET/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.SqlExecutionApiget_by_query_pipeGET/api/Sql/pipe/{query}GetByQueryPipe: Executes Sql, returned in pipe-delimited format, where the sql is simply in the url.SqlExecutionApiget_by_query_sqliteGET/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.SqlExecutionApiget_by_query_xmlGET/api/Sql/xml/{query}GetByQueryXml: Executes Sql, returned in Xml format, where the sql is simply in the url.SqlExecutionApiput_by_query_csvPUT/api/Sql/csvPutByQueryCsv: Executes Sql, returned in CSV format, where the sql is the post-body url.SqlExecutionApiput_by_query_excelPUT/api/Sql/excelPutByQueryExcel: Executes Sql, returned in Excel (xlsx) format (as a file to be downloaded), where the sql is the post-body url.SqlExecutionApiput_by_query_jsonPUT/api/Sql/jsonPutByQueryJson: Executes Sql, returned in JSON format, where the sql is the post-body url.SqlExecutionApiput_by_query_parquetPUT/api/Sql/parquetPutByQueryParquet: Executes Sql, returned in Parquet format, where the sql is the post-body url.SqlExecutionApiput_by_query_pipePUT/api/Sql/pipePutByQueryPipe: Executes Sql, returned in pipe-delimited format, where the sql is the post-body url.SqlExecutionApiput_by_query_sqlitePUT/api/Sql/sqlitePutByQuerySqlite: Executes Sql, returned in SqLite DB (sqlite3) format (as a file to be downloaded), where the sql is the post-body url.SqlExecutionApiput_by_query_xmlPUT/api/Sql/xmlPutByQueryXml: Executes Sql, returned in Xml format, where the sql is the post-body url.Documentation For ModelsAccessControlledActionAccessControlledResourceAccessControlledResourceIdentifierPartSchemaAttributeActionIdAggregateFunctionAggregationAutoDetectTypeAvailableFieldAvailableParameterBackgroundMultiQueryProgressResponseBackgroundMultiQueryResponseBackgroundQueryCancelResponseBackgroundQueryProgressResponseBackgroundQueryResponseBackgroundQueryStateCertificateActionCertificateFileTypeCertificateStateCertificateStatusCertificateTypeColumnColumnInfoConditionAttributesConvertToViewDataDataTypeExpressionWithAliasFeedbackEventArgsFeedbackLevelFieldDesignFieldTypeFileReaderBuilderDefFilterTermDesignIdSelectorDefinitionLinkLuminesceBinaryTypeLusidProblemDetailsMappableFieldMappingFlagsMultiQueryDefinitionTypeOptionsCsvOptionsExcelOptionsParquetOptionsSqLiteOptionsXmlOrderByDirectionOrderByTermDesignQueryDesignQueryDesignerBinaryOperatorResourceListOfAccessControlledResourceSourceSourceTypeTaskStatusViewParameterWriterDesignDocumentation For AuthorizationAuthentication schemes defined for the API:oauth2Type: OAuthFlow: implicitAuthorization URL:https://lusid-fbn-ci.okta.com/oauth2/aus49h9b8rQPvouCH2p7/v1/authorizeScopes: N/AAuthorinfo@finbourne.com