Registry / http-networking / multilspy

multilspy

JSON →
library0.0.15pypypi✓ verified 79d ago

multilspy is a language-agnostic LSP (Language Server Protocol) client library for Python, providing a high-level interface to interact with language servers. Current version is 0.1.0 (pre-release), with a stable v0.0.15. It supports Python, Rust, Java, Go, JavaScript, Ruby, C#, Dart, PHP, and Elixir. Development is active, with regular releases.

pip install multilspy
INSTALL
IMPORT
SIG · MULTILSPY
M
multilspy
http-networkingpythonv0.0.15
Install
3.7s avg
Import
Disk
37MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.15 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 38.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.7s · import 0.000s · 39MB
37MB installed
● package 37MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LanguageServer
from multilspy import LanguageServer
from multilspy import Multilspy
SyncLanguageServer
from multilspy import SyncLanguageServer
Types
from multilspy import Types

Basic usage: start a language server, open a file, request completions, then stop.

import os from multilspy import Multilspy # Initialize multilspy with a language server (Python in this case) lsp = Multilspy(os.environ.get('PYTHON_LSP', 'pylsp')) # Start the language server lsp.start() # Open a Python file with open('example.py', 'w') as f: f.write('import os\n\nprint(os.getcwd())') lsp.open_document('example.py') # Get completions completions = lsp.request_completions('example.py', line=1, character=0) print(completions) lsp.close_document('example.py') lsp.stop()
Debug
Known issues
gotchaOn Windows, multilspy may fail with 'No module named pwd' if the system does not have the pwd module. This was fixed in v0.0.15, but older versions are affected.
fix
Upgrade to multilspy>=0.0.15
affects: <0.0.15
deprecatedThe `request_references` and `request_document_symbols` methods may raise assertion errors without messages in older versions. Debugging is difficult.
fix
Use multilspy>=0.0.15 or catch AssertionError explicitly.
affects: <0.0.15
breakingIn v0.1.0 (pre-release), the API may have changed significantly. The async `LanguageServer` class may replace `Multilspy`. Stick to stable v0.0.15 for now.
fix
Pin to multilspy>=0.0.15,<0.1.0 or test thoroughly with v0.1.0.
affects: 0.1.0
Upgrade
Version history
0.0.15latest on PyPI · released Apr 3, 2025
Audit
Dependencies
psutilrequiredProcess termination handling on all platforms
Agent activity
12 hits · last 30 days
node
12
Resources
multilspy — pip install multilspy · libregistry