Skip to main content

A library to set up a VS Code server in Google Colab.

Project description

vscode-colab: Connect VS Code to Google Colab Runtimes

PyPI version License: MIT Python Version Open In Colab

vscode-colab is a Python library designed to facilitate the connection of a Visual Studio Code instance (desktop or web-based) to a remote runtime environment, specifically Google Colab or Kaggle notebooks.

It automates the setup of a secure tunnel, enabling users to leverage the features of VS Code while utilizing the computational resources provided by these cloud platforms.

Key Features & Advantages

Official VS Code Tunnels

Establishes the connection using the official code tunnel feature from VS Code. This provides a secure, end-to-end encrypted tunnel managed via Microsoft's infrastructure.

Simplified Setup

The setup_vscode_server function streamlines the process by:

  • Downloading the required VS Code CLI tool.
  • Initiating the code tunnel process.
  • Parsing and displaying GitHub device authentication prompts within the notebook for user action.
  • Automatically installing a default set of useful Python development extensions (e.g., Python language support, Pylance, Black formatter, isort, Jupyter tools).
  • Detecting and displaying the connection URL (vscode.dev) and desktop connection instructions.

Flexible Connectivity

Supports connecting to the remote runtime via:

  • The web-based VS Code editor at vscode.dev.
  • A locally installed VS Code desktop application through the "Remote - Tunnels" extension.

Installation

Install the library using pip:

pip install vscode-colab

Usage

Open In Colab

To set up the VS Code server in Google Colab, simply import the library and call the login() and then connect():

from vscode_colab import login, connect

# Start the VS Code server
login()

connect()

Follow the on-screen instructions for authentication and connection.

Check out the examples/simple_usage.ipynb notebook for a detailed example of how to use the vscode-colab library in Google Colab.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vscode_colab-0.1.2.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vscode_colab-0.1.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file vscode_colab-0.1.2.tar.gz.

File metadata

  • Download URL: vscode_colab-0.1.2.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for vscode_colab-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4d269e35393021ebb89256eec6140477a2ac2a76bd9adcaba4d8e3c23b60da68
MD5 d1b4523c397578c96f0c8c58d1bb27b2
BLAKE2b-256 ed4e5a65857851865f0a1f26f062dbb71d38a9a7f05275c34796daf633351c60

See more details on using hashes here.

File details

Details for the file vscode_colab-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: vscode_colab-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for vscode_colab-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fcae58a0135c2207e7d14080532604a86923d152fb81370bb6944fd984cff3b6
MD5 03a4c88c50154902793d383bcd4f13b4
BLAKE2b-256 2f531ff9f130e6045d14397f18f1b0ad042b1b6d2e5c49168e67bd912b0ba150

See more details on using hashes here.

Supported by

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