Registry / devops / python-language-server

python-language-server

JSON →
library0.36.2pypypi✓ verified 86d ago

An implementation of the Language Server Protocol (LSP) for Python. Version 0.36.2 is the final release; the project is deprecated in favor of python-lsp-server (a community fork) and pyright/pylance. It provides IDE features like autocompletion, linting, code navigation, and refactoring.

pip install python-language-server
INSTALL
IMPORT
SIG · PYTHON-LANGUAGE-SE
P
python-language-server
devopspythonv0.36.2
Install
2.5s avg
Import
45ms
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.36.2 · 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.048s · 33.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.5s · import 0.042s · 30MB
29MB installed
● package 29MB
Code
Verified usage

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

pyls
import pyls
from pyls import server
The main entry point is the `pyls` module; direct imports of internal submodules are unsupported.

Basic usage: the server is typically started by an editor plugin. The `pyls` module provides a `ProcessServer` class for programmatic launching.

# Start the language server (usually launched by an editor plugin) # For manual testing, run: # pyls # In code, you can invoke the server programmatically: import pyls server = pyls.ProcessServer() print("Python Language Server started. Use an LSP client to connect.")
pyls --version
Debug
Known issues
deprecatedpython-language-server is deprecated. The Palantir project has been archived and no longer maintained. Users should migrate to python-lsp-server (community fork) or pyright/pylance.
fix
Replace python-language-server with python-lsp-server: `pip install python-lsp-server` and change imports to `import pylsp`.
affects: >=0.36.0
breakingIn version 0.36.0, the configuration format changed. Options that were previously under 'pyls' section are now under the tool's name (e.g., 'pyls.plugins' moved to 'pyls.plugins.jedi' etc.).
fix
Update your .pylsrc or editor settings to match the new schema. See: https://github.com/palantir/python-language-server/releases/tag/0.36.0
affects: 0.36.x
gotchaThe package name on PyPI is python-language-server, but the import module is 'pyls'. Many users mistakenly try `import python_language_server` or `import pyls` with wrong casing.
fix
Use `import pyls` (all lowercase).
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pyls'
The package is installed but not in the current Python environment, or the wrong import name is used.
fix
Ensure the package is installed: `pip install python-language-server`. Then import as `import pyls`.
AttributeError: module 'pyls' has no attribute 'ProcessServer'
Using an older version of pyls that lacks the ProcessServer class (introduced in 0.36.0).
fix
Upgrade to the latest version: `pip install --upgrade python-language-server`.
Error: No configuration found for 'pyls'
Configuration file is missing or uses an outdated format.
fix
Create a `.pylsrc` file in the project root or home directory. See https://github.com/palantir/python-language-server#configuration
Upgrade
Version history
0.36.2latest on PyPI · released Dec 11, 2020
Audit
Dependencies
jedirequiredRequired for autocompletion and code analysis (jedi 0.17+ compatible).
pylintoptionalOptional linting provider.
flake8optionalOptional linting provider.
pycodestyleoptionalOptional linting provider.
mccabeoptionalOptional linting provider.
Agent activity
14 hits · last 30 days
node
10
OpenAI (training)
2
Resources
python-language-server — pip install python-language-server · libregistry