a pythonic generic language server (pronounced like "pie glass").
Project description
pygls
pygls (pronounced like "pie glass") is a pythonic generic implementation of the Language Server Protocol for use as a foundation for writing language servers using Python (e.g. Python, XML, etc.). It allows you to write your own language server in just a few lines of code.
Quick Intro
Here's how to create a server and register a code completion feature:
from pygls.features import COMPLETION
from pygls.server import LanguageServer
from pygls.types import CompletionItem, CompletionList, CompletionParams
server = LanguageServer()
@server.feature(COMPLETION, trigger_characters=[','])
def completions(params: CompletionParams):
"""Returns completion items."""
return CompletionList(False, [
CompletionItem('"'),
CompletionItem('['),
CompletionItem(']'),
CompletionItem('{'),
CompletionItem('}')
])
server.start_tcp('localhost', 8080)
Show completion list on the client:
Docs and Tutorial
The full documentation and a tutorial is available at https://pygls.readthedocs.io/en/latest/.
Let Us Know How You Are Using pygls
Submit a Pull Request (PR) with your information against the implementations document.
License
Apache-2.0
Contributing
Your contributions to pygls are welcome! Please review the Contributing and Code of Conduct documents for how to get started.
Donation
Open Law Library is a 501(c)(3) tax exempt organization.Help us maintain our open source projects and open the law to all with a donation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygls-0.8.0.tar.gz.
File metadata
- Download URL: pygls-0.8.0.tar.gz
- Upload date:
- Size: 36.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8602f40ad2758e1d9f3062511458b0de12c814fc7bbca5cee8ea257371ba0f8
|
|
| MD5 |
10148643edae5dbcfb49ab2729f46284
|
|
| BLAKE2b-256 |
b5004a9a4f5f7926b0f5ac9e8c1d7a0eb1b6328d22d65dd42a7b5024dfd0e7d4
|
File details
Details for the file pygls-0.8.0-py3-none-any.whl.
File metadata
- Download URL: pygls-0.8.0-py3-none-any.whl
- Upload date:
- Size: 54.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e963b334498a4bd4de9009c71215990b2e8c562478f3ad09669a5acc970ab458
|
|
| MD5 |
5cc3c6076fdc26228dc774290fcc5b3b
|
|
| BLAKE2b-256 |
bb9ffd82498c6bcbf89fa5e17417df2ee4656605b580908d5189180907afbb91
|