A fast, extensible Python linter for custom rules
Project description
A fast, extensible Python linter for custom rules.
Complements Ruff by letting you
write custom lint rules in Python — with Rust-powered analysis under the hood.
17x faster than Flake8 single-threaded. Custom lint rules in Python, with Rust-powered analysis.
Linting Django (901 files) -- 10 equivalent AST rules, single process
Getting started
# Lints the current workdir
$ uvx rude check
$ uv tool install rude
$ rude --version
rude 0.1a2
# Add rude to your project
uv add rude --dev
Write your first rule
from rude import Rule, Node, NodeType, Diagnostic
from collections.abc import Iterator
class NoDebugPrint(Rule):
code = "DBG001"
message = "Debug print() found"
node_types = {NodeType.CALL}
def check(self, node: Node) -> Iterator[Diagnostic]:
if node.function_name == "print":
yield self.diagnostic(node)
Two base classes: Rule (AST nodes) and LineRule (raw text). Rules can
provide autofixes with import management.
Register as a plugin or as local rules:
# pyproject.toml
[project.entry-points."rude.plugins"]
my_plugin = "my_plugin"
[tool.rude]
local-rules = ["tools/linting/rules.py"]
Key features
- Severity levels -- ERROR breaks CI, WARNING doesn't. Four levels (error, warning, info, hint) per rule, filterable with
--quiet. - Template rules -- lint without writing Python. Ban calls, require base classes, enforce decorators -- all from
pyproject.toml. - Autofix with imports --
Fix.replace(node, text, imports_from=[...])handles insertion, deduplication, and placement automatically. - Fast -- Rust-powered tree-sitter parsing and semantic analysis. Streaming pipeline keeps memory flat across a project (buffered when
--fixrewrites files); the GIL is released during per-file Rust analysis. - Rich Node API --
node.function_name,node.inherits_from("Base"),node.decorator_names. No raw tree-sitter needed. - 104 built-in rules -- pyflakes (F), pycodestyle (E/W), McCabe (C901). Additional rule sets can be added via third-party plugins or local Python rule files.
The sweet spot
| Standard rules | Custom rules | Speed | Memory | Severity | |
|---|---|---|---|---|---|
| Ruff | 800+ | none | fastest | low | all fatal |
| Rude | 104 + plugins | unlimited | fast | low | 4 levels |
| Flake8 | 100+ (plugins) | via packages | slow | medium | all fatal |
| Fixit | ~30 | via LibCST | slow | high | all fatal |
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 Distributions
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 rude-0.1a2.tar.gz.
File metadata
- Download URL: rude-0.1a2.tar.gz
- Upload date:
- Size: 312.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aff71e73bdd5dba2ce743219ad0cc11c1b340d70b4d308b48898dcf70f90f6e0
|
|
| MD5 |
b2301a2422c6227dc99176588f91f8d1
|
|
| BLAKE2b-256 |
0f012888fd0bcdf8ecbce6373374c366e983d8a3c2342c09ce7cfed8114ea053
|
Provenance
The following attestation bundles were made for rude-0.1a2.tar.gz:
Publisher:
release.yml on rude-dev/rude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rude-0.1a2.tar.gz -
Subject digest:
aff71e73bdd5dba2ce743219ad0cc11c1b340d70b4d308b48898dcf70f90f6e0 - Sigstore transparency entry: 1587839192
- Sigstore integration time:
-
Permalink:
rude-dev/rude@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Branch / Tag:
refs/tags/v0.1a2 - Owner: https://github.com/rude-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file rude-0.1a2-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: rude-0.1a2-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 549.8 kB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6bd5ec86abcd95eed3c721a99b4db1fb79bf40ad8f1943fdeeaa241e7697bb5
|
|
| MD5 |
73e73f459f7d7ccfa6f89c5abdfbbc1f
|
|
| BLAKE2b-256 |
24e1db0fd1d36772bfc6d0d61abc287d7226065b998437713a9676b63d5b9a74
|
Provenance
The following attestation bundles were made for rude-0.1a2-cp311-abi3-win_amd64.whl:
Publisher:
release.yml on rude-dev/rude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rude-0.1a2-cp311-abi3-win_amd64.whl -
Subject digest:
a6bd5ec86abcd95eed3c721a99b4db1fb79bf40ad8f1943fdeeaa241e7697bb5 - Sigstore transparency entry: 1587839394
- Sigstore integration time:
-
Permalink:
rude-dev/rude@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Branch / Tag:
refs/tags/v0.1a2 - Owner: https://github.com/rude-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file rude-0.1a2-cp311-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: rude-0.1a2-cp311-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 846.9 kB
- Tags: CPython 3.11+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
439eec2d082b6eefd355d60bb4d1d678dd039f9cef5ae1735fcda641b36446ef
|
|
| MD5 |
22474bf9e9bce30e91089471889146f4
|
|
| BLAKE2b-256 |
09c65848a49dfc68675eecbf9836da4149de1cfed0d3888c421b3127916da9ce
|
Provenance
The following attestation bundles were made for rude-0.1a2-cp311-abi3-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on rude-dev/rude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rude-0.1a2-cp311-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
439eec2d082b6eefd355d60bb4d1d678dd039f9cef5ae1735fcda641b36446ef - Sigstore transparency entry: 1587839279
- Sigstore integration time:
-
Permalink:
rude-dev/rude@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Branch / Tag:
refs/tags/v0.1a2 - Owner: https://github.com/rude-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file rude-0.1a2-cp311-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: rude-0.1a2-cp311-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 787.1 kB
- Tags: CPython 3.11+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5724d6460169bf45cb46fa9bd56e399911a72f5e38883612f3a9fd27c0ee8847
|
|
| MD5 |
209dc8d7b7ef59d9855c07b1a39d4721
|
|
| BLAKE2b-256 |
e074b4ed15dfd7bfdb5b7acbf4536eadf7b39a20eaa744664a459b9e8c9461e6
|
Provenance
The following attestation bundles were made for rude-0.1a2-cp311-abi3-musllinux_1_2_aarch64.whl:
Publisher:
release.yml on rude-dev/rude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rude-0.1a2-cp311-abi3-musllinux_1_2_aarch64.whl -
Subject digest:
5724d6460169bf45cb46fa9bd56e399911a72f5e38883612f3a9fd27c0ee8847 - Sigstore transparency entry: 1587839235
- Sigstore integration time:
-
Permalink:
rude-dev/rude@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Branch / Tag:
refs/tags/v0.1a2 - Owner: https://github.com/rude-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file rude-0.1a2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rude-0.1a2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 633.3 kB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c24a73d1b26b8c61ea51d21580ac049ee4cf6872eb2e1540ef4ce4246eb91df
|
|
| MD5 |
0da3a817a030262d3ef4f339abfcdec9
|
|
| BLAKE2b-256 |
4257b362f18f656659a81a41a2199a9d209ea73754506a857a1561f0c02a0bfb
|
Provenance
The following attestation bundles were made for rude-0.1a2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on rude-dev/rude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rude-0.1a2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
4c24a73d1b26b8c61ea51d21580ac049ee4cf6872eb2e1540ef4ce4246eb91df - Sigstore transparency entry: 1587839480
- Sigstore integration time:
-
Permalink:
rude-dev/rude@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Branch / Tag:
refs/tags/v0.1a2 - Owner: https://github.com/rude-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file rude-0.1a2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: rude-0.1a2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 609.1 kB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
324d2003e08f375699c4f63f0eacd90c812f6830e7793dde3c620826fc542041
|
|
| MD5 |
8022114c610b951554dcb1eb7ad4d0c8
|
|
| BLAKE2b-256 |
dd66bff0a1231d2e691866867a371518c2343b45e69899f3173b98e0e9eb19a8
|
Provenance
The following attestation bundles were made for rude-0.1a2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on rude-dev/rude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rude-0.1a2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
324d2003e08f375699c4f63f0eacd90c812f6830e7793dde3c620826fc542041 - Sigstore transparency entry: 1587839331
- Sigstore integration time:
-
Permalink:
rude-dev/rude@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Branch / Tag:
refs/tags/v0.1a2 - Owner: https://github.com/rude-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file rude-0.1a2-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: rude-0.1a2-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 585.0 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aec1696ebb5a341bb940fd4834e7e5f4c5a1d2c607ffa485d2003a385a3b87b1
|
|
| MD5 |
ae09ed5fbd6b749c37fc6a7a13a2e69f
|
|
| BLAKE2b-256 |
43237c823797d91aa7e597a40f04970a119510180b4fe8b0a459819e1c56f371
|
Provenance
The following attestation bundles were made for rude-0.1a2-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on rude-dev/rude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rude-0.1a2-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
aec1696ebb5a341bb940fd4834e7e5f4c5a1d2c607ffa485d2003a385a3b87b1 - Sigstore transparency entry: 1587839353
- Sigstore integration time:
-
Permalink:
rude-dev/rude@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Branch / Tag:
refs/tags/v0.1a2 - Owner: https://github.com/rude-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file rude-0.1a2-cp311-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: rude-0.1a2-cp311-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 609.8 kB
- Tags: CPython 3.11+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5555501e1722730020089ad372868a607d9fd489d08aed8ed53e347122f515e0
|
|
| MD5 |
6f72aad6d9238914bc1b8aff2ac0ef83
|
|
| BLAKE2b-256 |
68cef2cc038d9fd18c09da5e45ec8e1ed680059af00ff8c4b621bf8e133ec966
|
Provenance
The following attestation bundles were made for rude-0.1a2-cp311-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on rude-dev/rude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rude-0.1a2-cp311-abi3-macosx_10_12_x86_64.whl -
Subject digest:
5555501e1722730020089ad372868a607d9fd489d08aed8ed53e347122f515e0 - Sigstore transparency entry: 1587839439
- Sigstore integration time:
-
Permalink:
rude-dev/rude@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Branch / Tag:
refs/tags/v0.1a2 - Owner: https://github.com/rude-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d6e6fbbcdf0d39e211ce6d2351a6ea87ac7125aa -
Trigger Event:
push
-
Statement type: