pygls
A pythonic generic language server (pronounced like 'pie glass')
Decision gist · record as of 2026-08-14
Yes. pygls is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. It is the right choice if you need to build a language server in Python and want to support multiple editors without vendor lock-in. Install it if you are building or extending a language server; skip it if you only need to use an existing language server.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure Python wheel and only three runtime dependencies (attrs, cattrs, lsprotocol).
- Actively maintained with a release 142 days ago and support for current Python versions (3.9 through 3.14).
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 is a permissive license; you can use pygls in commercial and private projects with minimal restrictions, provided you include the license notice.
last release 2026-03-25 (142 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,110,125 downloads/mo, #3,287 on PyPI
Alternatives
Verify before relying
pip install pygls
from pygls.lsp.server import LanguageServer
from lsprotocol import types
server = LanguageServer("my-server", "v0.1")
@server.feature(types.TEXT_DOCUMENT_COMPLETION)
def completions(params: types.CompletionParams):
return types.CompletionList(is_incomplete=False, items=[])
server.start_io()- Whether pygls handles editor-specific protocol variations or edge cases beyond the LSP specification
- Performance characteristics when handling large files or many concurrent language server requests
- Availability of examples or templates for common language server use cases
What it is and what it does
pygls is a Python framework that implements the Language Server Protocol (LSP), a standardized way for editors and IDEs to communicate with language-aware tools. It lets you build a language server—a program that provides features like code completion, error diagnostics, and symbol navigation—by decorating Python functions with feature handlers and starting the server with a single call.
The framework handles all the LSP protocol machinery, including message parsing, workspace management, and client communication. You define what your server does by writing handler functions for specific LSP features (like TEXT_DOCUMENT_COMPLETION or TEXT_DOCUMENT_HOVER), and pygls routes incoming requests to them. It depends on attrs for data classes, cattrs for serialization, and lsprotocol for LSP type definitions, keeping the dependency footprint small.
Use it for
- Build a language server for a domain-specific language or custom syntax to integrate with VSCode, Neovim, or other LSP-compatible editors.
- Add code completion and diagnostics to an existing language or tool by wrapping it in an LSP server.
- Create editor-agnostic language support without writing separate plugins for each editor.
- Prototype or experiment with language features and editor integrations quickly using Python.
- Extend an existing Python project with IDE-like features (completion, linting, navigation) for users.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
pygls is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. It is the right choice if you need to build a language server in Python and want to support multiple editors without vendor lock-in. Install it if you are building or extending a language server; skip it if you only need to use an existing language server.
Install
pygls on PyPI
Before you install
Low install friction with a pure Python wheel and only three runtime dependencies (attrs, cattrs, lsprotocol). Actively maintained with a release 142 days ago and support for current Python versions (3.9 through 3.14).
License in practice
Apache-2.0 is a permissive license; you can use pygls in commercial and private projects with minimal restrictions, provided you include the license notice.
Quickstart
pip install pygls
from pygls.lsp.server import LanguageServer
from lsprotocol import types
server = LanguageServer("my-server", "v0.1")
@server.feature(types.TEXT_DOCUMENT_COMPLETION)
def completions(params: types.CompletionParams):
return types.CompletionList(is_incomplete=False, items=[])
server.start_io()
Verify before relying
- Whether pygls handles editor-specific protocol variations or edge cases beyond the LSP specification
- Performance characteristics when handling large files or many concurrent language server requests
- Availability of examples or templates for common language server use cases
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesattrscattrslsprotocol |
| Maintenance | Actively maintained 142 days since the last release |
| First released | |
| Downloads | 2,110,125 / month, #3,287 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9 |
Evidence: pygls-2.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “lsp implementation framework”
- pyglspygls is a Python framework for building Language Servers that…
- lsprotocolProvides Python object types and converters for the Language Server…
- python-language-serverImplements the Language Server Protocol for Python, providing code…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also jedi-language-server · jupyterlab-lsp · lsprotocol · ruff-lsp · esbonio · jupyter-lsp · pyvim · robotcode · zuban · ty