Skip to main content

pylyzer ⚡

pylyzer_logo_with_letters

vsm-version Build status Build status

pylyzer is a static code analyzer / language server for Python, written in Rust.

Installation

pip

pip install pylyzer

cargo (Rust package manager)

cargo install pylyzer --locked

build from source

git clone https://github.com/mtshiba/pylyzer.git
cargo install --path . --locked

Make sure that cargo/rustc is up-to-date, as pylyzer may be written with the latest (stable) language features.

GitHub Releases

How to use

Check a single file

pylyzer file.py

Check multiple files

# glob patterns are supported
pylyzer file1.py file2.py dir/file*.py

Check an entire package

If you don't specify a file path, pylyzer will automatically search for the entry point.

pylyzer

Start the language server

This option is used when an LSP-aware editor requires arguments to start pylyzer.

pylyzer --server

For other options, check the manual.

What is the advantage over pylint, pyright, pytype, etc.?

  • Performance 🌟

On average, pylyzer can inspect Python scripts more than 100 times faster than pytype and pyright 1. This is largely due to the fact that pylyzer is implemented in Rust.

performance

  • Reports readability 📖

While pytype/pyright's error reports are illegible, pylyzer shows where the error occurred and provides clear error messages.

pyright

pyright_report

pylyzer 😃

report

  • Rich LSP support 📝

pylyzer as a language server supports various features, such as completion and renaming (The language server is an adaptation of the Erg Language Server (ELS). For more information on the implemented features, please see here).

lsp_support

autoimport

VSCode extension

You can install the VSCode extension from the Marketplace or from the command line:

code --install-extension pylyzer.pylyzer

What is the difference from Ruff?

Ruff, like pylyzer, is a static code analysis tool for Python written in Rust, but Ruff is a linter and pylyzer is a type checker & language server. pylyzer does not perform linting & formatting, and Ruff does not perform type checking.

How it works

pylyzer uses the type checker of the Erg programming language internally. This language is a transpiled language that targets Python, and has a static type system.

pylyzer converts Python ASTs to Erg ASTs and passes them to Erg's type checker. It then displays the results with appropriate modifications.

Limitations

  • pylyzer's type inspector only assumes (potentially) statically typed code, so you cannot check any code uses reflections, such as exec, setattr, etc.

  • pylyzer (= Erg's type system) has its own type declarations for the Python standard APIs. Typing of all APIs is not complete and may result in an error that such an API does not exist.

  • Since pylyzer's type checking is conservative, you may encounter many (possibly false positive) errors. We are working on fixing this, but if you are concerned about editor errors, please turn off the diagnostics feature.

TODOs

  • type checking
    • variable
    • operator
    • function/method
    • class
    • async/await
    • user-defined abstract class
  • type inference
    • variable
    • operator
    • function/method
    • class
  • builtin modules analysis
  • local scripts analysis
  • local packages analysis
  • LSP features
    • diagnostics
    • completion
    • rename
    • hover
    • goto definition
    • signature help
    • find references
    • document symbol
    • call hierarchy
  • collection types
    • list
    • dict
    • tuple
    • set
  • typing
    • Union
    • Optional
    • Literal
    • Callable
    • Any
    • TypeVar
    • TypedDict
    • ClassVar
    • Generic
    • Protocol
    • Final
    • Annotated
    • TypeAlias
    • TypeGuard
    • type parameter syntax
    • type narrowing
    • others
  • collections.abc
    • Collection
    • Container
    • Generator
    • Iterable
    • Iterator
    • Mapping, MutableMapping
    • Sequence, MutableSequence
    • others
  • type assertion (typing.cast)
  • type narrowing (is, isinstance)
  • pyi (stub) files support
  • glob pattern file check
  • type comment (# type: ...)
  • virtual environment support
  • package manager support
    • pip
    • poetry
    • uv

Join us!

We are looking for contributors to help us improve pylyzer. If you are interested in contributing and have any questions, please feel free to contact us.


1 The performance test was conducted on MacBook (Early 2016) with 1.1 GHz Intel Core m3 processor and 8 GB 1867 MHz LPDDR3 memory.↩

Metadata

Release files for pylyzer 0.0.82

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pylyzer 0.0.82
File
pylyzer-0.0.82-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
pylyzer-0.0.82-py3-none-win32.whl Python 3 none Windows x86-32 Details
pylyzer-0.0.82-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
pylyzer-0.0.82-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
pylyzer-0.0.82-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl Python 3 none Linux glibc 2.17+ x86-32 Details
pylyzer-0.0.82-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 82.3 MB

Release files / pylyzer-0.0.82-py3-none-win_amd64.whl

Download URL pylyzer-0.0.82-py3-none-win_amd64.whl
Size 15.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
80b87c4e24724ef6d94e16e4d7fbe0922b366a77c8f2e88ad64e8d4cf4c70e83
BLAKE2b-256 checksum
How to use checksums
10c3ab9da76ca458939c1da5fe2186b085c357b64f3526ee7f3f5f2670c11da3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2025.

Transparency log

Release files / pylyzer-0.0.82-py3-none-win32.whl

Download URL pylyzer-0.0.82-py3-none-win32.whl
Size 13.1 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
919ba92368dd6c43236029c68ec4ab33e21ea62b8bda94c9c4c0f2569c61cf57
BLAKE2b-256 checksum
How to use checksums
cee6c9bc99c3cbe643ceeefca9034a776a7901b2b9c1d739d14d4b9df3e5ea65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2025.

Transparency log

Release files / pylyzer-0.0.82-py3-none-musllinux_1_2_x86_64.whl

Download URL pylyzer-0.0.82-py3-none-musllinux_1_2_x86_64.whl
Size 13.5 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
1f0e6d81a291a2b8fa3b85403e4b8b704406e52c8b59025a5f84b885dc9e7f03
BLAKE2b-256 checksum
How to use checksums
17f6e9ee045c0f16a445a73567edeb1093429b276f3783f0e9b92dce70a8b787
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2025.

Transparency log

Release files / pylyzer-0.0.82-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pylyzer-0.0.82-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 13.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
d409ec99edcfbdc38fb12cfb0f22ed4586775e5acff4df269dad1c1029c362f3
BLAKE2b-256 checksum
How to use checksums
5697fbf47c8fd44e1988e3e072d58803ef2f139bcc61842842bfe5d34cc2cccd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2025.

Transparency log

Release files / pylyzer-0.0.82-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL pylyzer-0.0.82-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Size 14.8 MB
Tags Linux glibc 2.17+ x86-32 Python 3
SHA-256 checksum
How to use checksums
2e311b7cf132ebfe3d143e0c19efab9cf1b0628f921601e9794ab15073516fb6
BLAKE2b-256 checksum
How to use checksums
ae9e2c1730bc3ba7725134cb260719952e06d740c885e36280b1c2d2f5924117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2025.

Transparency log

Release files / pylyzer-0.0.82-py3-none-macosx_11_0_arm64.whl

Download URL pylyzer-0.0.82-py3-none-macosx_11_0_arm64.whl
Size 11.9 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fc2088c87de1d6e8813d356a7f7e42768976b8dc1416fd7fdf088630e757e7e5
BLAKE2b-256 checksum
How to use checksums
69cb684ea79840ea01fb4916d361732fd42ee169cf6a05ddcb79715fa35c0ff9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.82 This release

6 release files

0.0.81

6 release files

0.0.80

6 release files

0.0.78

6 release files

0.0.77

6 release files

0.0.76

6 release files

0.0.75

6 release files

0.0.74

6 release files

0.0.72

6 release files

0.0.71

6 release files

0.0.70

6 release files

0.0.68

6 release files

0.0.67

6 release files

0.0.66

6 release files

0.0.63

6 release files

0.0.62

6 release files

0.0.61

6 release files

0.0.60

6 release files

0.0.59

6 release files

0.0.44

4 release files

0.0.41

4 release files

0.0.39

4 release files

0.0.38

4 release files

0.0.33

4 release files

0.0.32

4 release files

0.0.30

4 release files

0.0.29

4 release files

0.0.28

4 release files

0.0.27

4 release files

0.0.24

5 release files

0.0.23

4 release files

0.0.22

4 release files

0.0.21

4 release files

0.0.20

4 release files

0.0.19

4 release files

0.0.16

3 release files

0.0.15

3 release files

0.0.14

1 release file

0.0.13

3 release files

0.0.12

3 release files

0.0.11

3 release files

0.0.9

2 release files

0.0.8

3 release files

0.0.7

3 release files

0.0.5

2 release files

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page