pypls

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

pypls

A fast, incremental type checker and language server for Python, written in Go.

pypls is a persistent daemon. It keeps a type graph in memory and re-analyzes only the code you change, so your editor stays responsive on large projects. It runs entirely on your machine and never sends your code anywhere.

pypls is part of the Go-Python Toolchain. It sits alongside your existing tools and does not ask you to change your code, your project layout, or your commands.

Status

Active development. The parser, syntax and type diagnostics, a persistent cache, and the language server are in place and working. Distribution and packaging are next. Track progress in the issues and releases.

Install

The easiest way is the Python launcher, which downloads the native binary for your platform on first use:

pip install pypls-client
pypls version

Or build from source:

git clone https://github.com/Go-Python-Toolchain/pypls
cd pypls
go build -o pypls .
./pypls version

Building from source requires Go 1.22 or newer.

Usage

pypls --help
pypls version
pypls check path/to/file.py
pypls check src/

check parses the given files or directories and reports any problems it finds, one per line, as file:line:column: severity: message. It reports both syntax errors and type problems, and exits with a non-zero status when any error is found, so it fits cleanly into continuous integration.

Results are cached on disk under your cache directory, so unchanged files are not rechecked. Pass --no-cache to check everything from scratch.

Configuration

pypls reads settings from the [tool.pypls] table of the nearest pyproject.toml, so there is no new config file to add. Every key is optional.

[tool.pypls]
python = "python3.12"        # the interpreter the project targets
venv = ".venv"               # the project's virtual environment
strict = true                # treat warnings as failures for the exit status
exclude = ["build", "*.gen.py"]  # files and directories to skip

The --config flag points at a specific pyproject.toml, and --strict enables strict mode from the command line.

Editor integration

pypls is also a language server. Point your editor's Python language client at:

pypls lsp

It speaks the Language Server Protocol over stdin and stdout, publishes syntax and type diagnostics as you type, re-checks only the parts of a file that changed, and offers basic completion.

Documentation

  • Getting started: install pypls and run your first check.
  • Tutorial: a hands-on walkthrough that catches real problems, fixes them, and shows strict mode and configuration.
  • Editor setup: wire pypls lsp into VS Code or Neovim for live diagnostics.
  • Architecture: how pypls is built and why.
  • Benchmarks: how fast pypls checks, next to mypy and pyright.
  • Limitations: what pypls does not do yet, and the rule behind it.
  • Roadmap: where pypls is headed.
  • examples/: a small runnable project you can check right away.

Design

  • Persistent daemon with incremental analysis.
  • Simplified Hindley-Milner type inference.
  • Local, embedded cache for standard library and popular package types.
  • Full Language Server Protocol support for editor integration.

License

Apache License 2.0. See LICENSE and NOTICE.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
analyzer
Package analyzer runs the parsing pipeline over a source file and returns diagnostics.
Package analyzer runs the parsing pipeline over a source file and returns diagnostics.
ast
Package ast defines the abstract syntax tree produced by the pypls parser.
Package ast defines the abstract syntax tree produced by the pypls parser.
cache
Package cache is a small persistent key-value store backed by BadgerDB.
Package cache is a small persistent key-value store backed by BadgerDB.
checker
Package checker performs local type inference over a parsed module and reports type problems.
Package checker performs local type inference over a parsed module and reports type problems.
config
Package config reads pypls settings from a project's pyproject.toml file.
Package config reads pypls settings from a project's pyproject.toml file.
diagnostic
Package diagnostic defines the shape of a problem reported about a source file.
Package diagnostic defines the shape of a problem reported about a source file.
lexer
Package lexer turns Python source text into a stream of tokens.
Package lexer turns Python source text into a stream of tokens.
lsp
Package lsp implements a Language Server Protocol server for pypls.
Package lsp implements a Language Server Protocol server for pypls.
parser
Package parser turns Python source into an abstract syntax tree.
Package parser turns Python source into an abstract syntax tree.
token
Package token defines the lexical tokens of the Python language as produced by the pypls lexer, along with source position information.
Package token defines the lexical tokens of the Python language as produced by the pypls lexer, along with source position information.
types
Package types defines a small type lattice for pypls and the rules for combining and comparing types during local inference.
Package types defines a small type lattice for pypls and the rules for combining and comparing types during local inference.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL