Skip to main content

Python types for Language Server Protocol.

Project description

Language Server Protocol Types implementation for Python

lsprotocol is a Python implementation of object types used in the Language Server Protocol (LSP). This repository contains the code generator and the generated types for LSP.

Overview

LSP is used by editors to communicate with various tools to enables services like code completion, documentation on hover, formatting, code analysis, etc. The intent of this library is to allow you to build on top of the types used by LSP. This repository will be kept up to date with the latest version of LSP as it is updated.

Installation

python -m pip install lsprotocol

Usage

Using LSP types

from lsprotocol import types

position = types.Position(line=10, character=3)

Using built-in type converters

# test.py
import json
from lsprotocol import converters, types

position = types.Position(line=10, character=3)
converter = converters.get_converter()
print(json.dumps(converter.unstructure(position, unstructure_as=types.Position)))

Output:

> python test.py
{"line": 10, "character": 3}

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

omniblack_lsprotocol-2026.0.0.tar.gz (70.1 kB view details)

Uploaded Source

Built Distribution

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

omniblack_lsprotocol-2026.0.0-py3-none-any.whl (71.4 kB view details)

Uploaded Python 3

File details

Details for the file omniblack_lsprotocol-2026.0.0.tar.gz.

File metadata

  • Download URL: omniblack_lsprotocol-2026.0.0.tar.gz
  • Upload date:
  • Size: 70.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for omniblack_lsprotocol-2026.0.0.tar.gz
Algorithm Hash digest
SHA256 a781c3d50baf8cf490d26953162356d3a8606e3572e747404279bed9b98abaca
MD5 4501c4dee2fe0b66b68285065517e89d
BLAKE2b-256 f2b4a9d993ed2d28c5bb87e1d72ca0717a54d50b4f57b9f7393871597d2247ff

See more details on using hashes here.

File details

Details for the file omniblack_lsprotocol-2026.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for omniblack_lsprotocol-2026.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcda0fc701e5bc2d1af2fb6e14ea18753687349eaa5a6701104a02b690864cf2
MD5 24cd9a9433052b7b2bef20c1d11e3dac
BLAKE2b-256 f0473476e87af4e2b45d5b3a3b426848d52835c8f2eb7430a936ca664f81e87e

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