LSEG Extension for Visual Studio Code
A Visual Studio Code extension with rich support for the LSEG Analytics Python SDK, providing code automation features such as Intelligent Code Completion and Samples.
Introduction
The LSEG Visual Studio Code Extension is designed to assist coders working on financial applications. It offers a suite of predefined code templates tailored for various financial use cases and intelligent code completion features that help suggest parameter values, ensuring accuracy and efficiency in your financial coding tasks.
The extension provides support for the new LSEG Analytics APIs. The first release covers Calendars and FX Forward workflows, with further asset classes covered in future iterations.
Features Overview
- Commands:
- Quickly access and execute LSEG Analytics functions from the command palette.
- Coding Assistance:
- Intelligent Code Completion:
- Enjoy real-time, context-aware code completions specifically for LSEG Analytics parameter values, reducing coding errors and boosting productivity.
- Code Samples:
- Access a library of pre-built code samples for common LSEG Analytics use cases, helping you get started quickly and efficiently.
- Seamless Authentication:
- Easily authenticate to the LSEG Analytics SDK from within Visual Studio Code, ensuring secure and hassle-free access.
Usage
Commands
To use commands, open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:
Command |
Description |
LSEG: Sign in |
Opens window for log in details to start using the extension features. |
LSEG: Sign out |
Logs user out |
LSEG: Refresh completion data for LSEG Financial Analytics |
Updates the cache of completion data which is used for parameter suggestions. |
To see all available LSEG Analytics commands, open the Command Palette and type LSEG.
Coding Assistance
Intelligent Code Completion
Dynamic parameter suggestions, based on the data available to the user. To use Intelligent Code Completion:
- 1.Place your cursor within a piece of code that requires a parameter
- 2.Trigger the parameter to see a list of possible values using one of the following methods
- a. Type the name of the parameter (hovering over the current function will tell you the name) followed by an equals sign (=)
- b. Run the Trigger Suggest command (
Ctrl
/Cmd
+ i
)
Samples
Samples provide templates of code for key analytics functionality. To use samples:
- Select the LSEG icon from the left hand side bar. After logging in, expand 'LSEG Financial Analytics' and select 'Code Samples'.
- Expand the sections to browse through the available samples.
- Open a sample as a python file or notebook.
- Modify it to tailor it to the task you're working on.
Seamless Authentication
The LSEG Visual Studio Code extension (“the extension”) makes it easier to write Python code that uses the LSEG Financial Analytics Python SDK (“the SDK”). However, you need to be authenticated to be able to execute your Python code that uses the SDK.
The SDK provides several authentication mechanisms (see the SDK documentation for more information). One of these is designed to provide a seamless authentication experience when using the extension: if you are logged in to the extension, you do not need to authenticate again to execute your Python code inside Visual Studio Code.
By default this is disabled, to enable it:
- Navigate to Settings → Extensions → LSEG: Analytics
- Select the box 'Enable Automatic Authentication'.
Seamless Authentication - implementation
When the setting is enabled, the extension starts a proxy web server that forwards calls from the SDK to the LSEG Financial Analytics backend APIs, adding the necessary authentication token.
The behaviour of the proxy web server is as follows:
- The proxy web server runs on http://127.0.0.1, so only the user and scripts/apps running locally can make requests to it.
- It will only forward SDK requests to the LFA backend; it will not forward requests to unknown endpoints.
- The extension has an output panel that shows the calls being forwarded to the LFA backend, so it is easy to see all the traffic handled by the proxy.
There is the possibility that other local scripts/apps could try to access the proxy web server and make requests using it. If this concerns you, you can disable the proxy and use one of the other SDK authentication mechanisms.
Privacy Statement
Please read the Privacy Statement governing the use of this extension.
License
See the LICENSE.txt file installed with the extension.
Compatibility
- LFA Python SDK Version v1.0.0b3.post4+
- VS Code Desktop Version only
- VS Code v1.82 from August 2023
- Operating systems: Windows, OS X, Linux
Questions, issues, feature requests, and contributions
If you have feedback for the extension please email analyticschannelsupport@lseg.com
Release notes
Version 1.2.0 - December, 2024
- Support for multiple LSEG Python SDK versions: previous versions only supported lseg_package v1.0.0b2. This version of the extension supports v1.0.0b3.post4 and newer releases.
- Improved logging : more detailed logging to simplify support and troubleshooting
- Minor UX improvements: e.g. improved styling in the Sample UI, minor branding changes
- Minor bug fixes: e.g. removing redundant query parameters from proxy calls
Version 1.1.0 - September, 2024
- Updated Samples UI: A new, easier to navigate Samples UI that adds the option to open a sample in a Jupyter Notebook as well as a Python file.
- Minor bug fixes : e.g. fixing broken help link, adding license check to refresh command.
- Minor UX improvements: e.g. removing redundant commands, improved logging.
Version 1.0.0 - August, 2024
Version 1.0.0 of the LSEG Financial Analytics (LFA) Extension for Visual Studio Code. This extension brings dynamic intelligent code completion features tailored specifically for developers working with the LFA Python SDK, empowering them to write code more efficiently and accurately.
Key Features:
- Intelligent Code Completion: Intelligent code completion supporting FX and Calendars. Providing real-time parameter suggestions based on the resources the authenticated user has access to.
- Samples: A library of code templates for key analytics functionality relating to FX and Calendars.
- Commands: User shortcuts to perform actions relating to LFA.
- Seamless Authentication: Log in functionality using LFA username and password to access the features of the extension. The same credentials can be used to authenticate to the LSEG Analytics SDK from within Visual Studio Code, ensuring secure and hassle-free access.
- LFA Python SDK Compatibility: Compatible with the LFA Python SDK
>=v1.0.0b3.post4
, <v2
Known Issues:
- Not compatible with web version of VS Code.
- If Intelligent Code Completion is unavailable immediately after installing or updating the LSEG Analytics Python SDK, try the following: (1) run the LSEG: Refresh completion data for LSEG Financial Analytics command, (2) log out and log in again, or (3) restart Visual Studio Code.