Name | lsprotocol JSON |
Version |
2023.0.1
JSON |
| download |
home_page | None |
Summary | Python implementation of the Language Server Protocol. |
upload_time | 2024-01-09 17:21:12 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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
```python
from lsprotocol import types
position = types.Position(line=10, character=3)
```
### Using built-in type converters
```python
# 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:
```console
> python test.py
{"line": 10, "character": 3}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "lsprotocol",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Brett Cannon <brett@python.org>, Karthik Nadig <kanadig@microsoft.com>",
"keywords": null,
"author": null,
"author_email": "Microsoft Corporation <lsprotocol-help@microsoft.com>",
"download_url": "https://files.pythonhosted.org/packages/9d/f6/6e80484ec078d0b50699ceb1833597b792a6c695f90c645fbaf54b947e6f/lsprotocol-2023.0.1.tar.gz",
"platform": null,
"description": "# Language Server Protocol Types implementation for Python\n\n`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.\n\n## Overview\n\nLSP 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.\n\n## Installation\n\n`python -m pip install lsprotocol`\n\n## Usage\n\n### Using LSP types\n\n```python\nfrom lsprotocol import types\n\nposition = types.Position(line=10, character=3)\n```\n\n### Using built-in type converters\n\n```python\n# test.py\nimport json\nfrom lsprotocol import converters, types\n\nposition = types.Position(line=10, character=3)\nconverter = converters.get_converter()\nprint(json.dumps(converter.unstructure(position, unstructure_as=types.Position)))\n```\n\nOutput:\n\n```console\n> python test.py\n{\"line\": 10, \"character\": 3}\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Python implementation of the Language Server Protocol.",
"version": "2023.0.1",
"project_urls": {
"Issues": "https://github.com/microsoft/lsprotocol/issues",
"Source": "https://github.com/microsoft/lsprotocol"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8d372351e48cb3309673492d3a8c59d407b75fb6630e560eb27ecd4da03adc9a",
"md5": "abbeb83bc277a9e0ea64a413646ce60e",
"sha256": "c75223c9e4af2f24272b14c6375787438279369236cd568f596d4951052a60f2"
},
"downloads": -1,
"filename": "lsprotocol-2023.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "abbeb83bc277a9e0ea64a413646ce60e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 70826,
"upload_time": "2024-01-09T17:21:14",
"upload_time_iso_8601": "2024-01-09T17:21:14.491469Z",
"url": "https://files.pythonhosted.org/packages/8d/37/2351e48cb3309673492d3a8c59d407b75fb6630e560eb27ecd4da03adc9a/lsprotocol-2023.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9df66e80484ec078d0b50699ceb1833597b792a6c695f90c645fbaf54b947e6f",
"md5": "c87b036d08806415f8943aa48ef72de1",
"sha256": "cc5c15130d2403c18b734304339e51242d3018a05c4f7d0f198ad6e0cd21861d"
},
"downloads": -1,
"filename": "lsprotocol-2023.0.1.tar.gz",
"has_sig": false,
"md5_digest": "c87b036d08806415f8943aa48ef72de1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 69434,
"upload_time": "2024-01-09T17:21:12",
"upload_time_iso_8601": "2024-01-09T17:21:12.625828Z",
"url": "https://files.pythonhosted.org/packages/9d/f6/6e80484ec078d0b50699ceb1833597b792a6c695f90c645fbaf54b947e6f/lsprotocol-2023.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-09 17:21:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "microsoft",
"github_project": "lsprotocol",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "lsprotocol"
}