-
Notifications
You must be signed in to change notification settings - Fork 295
Extension API
The Jupyter extension exposes a set of APIs that allows 3rd party extensions to
- Execute code against Kernels
https://github.com/microsoft/vscode-extension-samples/tree/main/jupyter-kernel-execution-sample - Contribute Jupyter Servers Allowing users to select and execute code against Kernels from Jupyter servers contributed by 3rd party extensions) https://github.com/microsoft/vscode-extension-samples/tree/main/jupyter-server-provider-sample
You can install the npm package @vscode/jupyter-extension
to get access to the latest API.
At Visual Studio Code, we take Extension API compatibility seriously. We give our best effort to avoid breaking API changes, and extension authors could expect published extensions to continue to work. However, this puts great limitation on us: once we introduce an API, we cannot easily change it anymore.
Proposed APIs solve the problem for us. Proposed APIs are a set of unstable APIs that are implemented in VS Code but not exposed to the public as stable APIs does. They are subject to change, only available by installing the npm package npm i @vscode-insiders@proposed
and cannot be used in published extensions. Nevertheless, extension authors could test these new APIs in local development and provide feedback for VS Code team to iterate on an API. Eventually, proposed APIs find their way into the stable API and becomes available for all extensions.
One of the proposed APIs allows 3rd party extensions to intercept all http/websocket messages sent to the remote servers contributed by the same 3rd party extension. I.e. http/websocket messages sent to other Jupyter servers/kernels cannot be intercepted.
This is useful to allow support for custom authentication, intercepting and modifying request/response messages.
The protocols/format of messages sent over http/websocket to the remote servers are documented here https://jupyter-server.readthedocs.io/en/latest/developers/rest-api.html https://jupyter-server.readthedocs.io/en/latest/developers/websocket-protocols.html
Given these are contributed by 3rd party packages/applications, changes to these messages/protocols are beyond the control of the Jupyter extension. These are some of the dangers of using Proposed APIs
.
- Contribution
- Source Code Organization
- Coding Standards
- Profiling
- Coding Guidelines
- Component Governance
- Writing tests
- Kernels
- Intellisense
- Debugging
- IPyWidgets
- Extensibility
- Module Dependencies
- Errors thrown
- Jupyter API
- Variable fetching
- Import / Export
- React Webviews: Variable Viewer, Data Viewer, and Plot Viewer
- FAQ
- Kernel Crashes
- Jupyter issues in the Python Interactive Window or Notebook Editor
- Finding the code that is causing high CPU load in production
- How to install extensions from VSIX when using Remote VS Code
- How to connect to a jupyter server for running code in vscode.dev
- Jupyter Kernels and the Jupyter Extension