Skip to main content

Python implementation of the Language Server Protocol.

Reason this release was yanked:

deprecated

Project description

Language Server Protocol 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

lsprotocol-2022.0.0a1.tar.gz (63.6 kB view details)

Uploaded Source

Built Distribution

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

lsprotocol-2022.0.0a1-py3-none-any.whl (61.8 kB view details)

Uploaded Python 3

File details

Details for the file lsprotocol-2022.0.0a1.tar.gz.

File metadata

  • Download URL: lsprotocol-2022.0.0a1.tar.gz
  • Upload date:
  • Size: 63.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for lsprotocol-2022.0.0a1.tar.gz
Algorithm Hash digest
SHA256 25d01716269558ab923fadb58b7d2200119aebb7d0d46a1397283df0532891da
MD5 58468b267a987fc216efec6fd3293096
BLAKE2b-256 d223827aac33dd3860064158175a3eecaea1a7c75274ccbc07f1f92b3687640f

See more details on using hashes here.

File details

Details for the file lsprotocol-2022.0.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for lsprotocol-2022.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 99966805b06356ad46b2353c50751f2c51e14913ecb61eec674a9dea2da2bbcd
MD5 9dfe64e5e586977a753ededeaf9d5d63
BLAKE2b-256 8033cf71344750410f1d091cfc6c4deaf6fb8f8c8a1284fbff9e1eae5509cf0b

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