Skip to main content

structloglint

A fast, opinionated linter for structlog log calls in Python. Written in Rust.

Status: Early developmentGitHub

Installation

pip install structloglint

Usage

structloglint --path src/
structloglint --path . --select SL001,SL002 --ignore SL007 --output-format concise
structloglint --path . --max-event-length 40 --event-case-style camel_case

See RULES.md for the full list of rules (SL001--SL009) and configuration options.

Configuration

Add a [tool.structloglint] section to your pyproject.toml:

[tool.structloglint]
# Event string rules
event-case-style = "snake_case"
max-event-length = 30

# Loop logging
loop-log-level = "info"

# Rule selection (omit to run all)
select = ["SL001", "SL002", "SL003", "SL004", "SL005", "SL006", "SL007", "SL008", "SL009"]
ignore = []

# File discovery
include = ["src/**/*.py", "app/**/*.py"]
exclude = ["tests/**", "migrations/**"]
extend-exclude = ["generated/**"]

# Import detection
check-imports = true

# Per-rule severity overrides
[tool.structloglint.rules]
SL007 = "off"       # disable loop check
SL009 = "error"     # promote to error

Alternatively, create a standalone structloglint.toml in your project root (takes precedence over pyproject.toml). In standalone format, omit the [tool.structloglint] table wrapper:

# structloglint.toml (standalone)
event-case-style = "camel_case"
max-event-length = 50
loop-log-level = "info"
select = ["SL001", "SL002", "SL003", "SL004", "SL005", "SL006", "SL007", "SL008", "SL009"]
ignore = ["SL007"]
exclude = ["tests/**"]
check-imports = true

[rules]
SL007 = "off"

See RULES.md for all configuration options and rule descriptions.

See ROADMAP.md for the project plan.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

structloglint-0.6.0-py3-none-win_amd64.whl (2.4 MB view details)

Uploaded Python 3Windows x86-64

structloglint-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

structloglint-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

structloglint-0.6.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.4 MB view details)

Uploaded Python 3manylinux: glibc 2.5+ x86-64

structloglint-0.6.0-py3-none-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

structloglint-0.6.0-py3-none-macosx_10_12_x86_64.whl (2.3 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file structloglint-0.6.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for structloglint-0.6.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 961d57b0ef720cb689799ddc2768209e15bf6fad0938f41bf291079532dd0acc
MD5 7e1495208cce4af68e67a95becc09ee3
BLAKE2b-256 c94428d44c6c401cf14ed085029384abb790eaf9de80874e95475f489b3348d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.6.0-py3-none-win_amd64.whl:

Publisher: release.yml on maxilar20/structloglint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file structloglint-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for structloglint-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3020d0a785f4dfb814f3f3dbcef6e31b80d188f4912d81f4e52feff9a4ff1cd6
MD5 b4be725ae81fe731e07fcba577f4e684
BLAKE2b-256 b09655bebb6239936d05146494f66ca0830dd32a8010dbb1f9d97f0bf1348722

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on maxilar20/structloglint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file structloglint-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for structloglint-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 55b8971f464cc608ec78d85f9eeda7b609492ef19167ace9abbf5946236748f8
MD5 ec5213d48490ad1e896c0f31d0438ff6
BLAKE2b-256 dd0fe74c953a7ad34b4a1529b1e7b3fa23aeb2c9ccd9d6456bc851c2ef100446

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on maxilar20/structloglint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file structloglint-0.6.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for structloglint-0.6.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0bf5206d6543fea960c496e2abd3545adc04eb283c8a0978bd278022f1f85256
MD5 f40d2f8e3bfe1995463413d4f8eb1237
BLAKE2b-256 1c8186c78fbf34e45b2efdae23a271c30f56ec49d2886029a65927cce968d333

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.6.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl:

Publisher: release.yml on maxilar20/structloglint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file structloglint-0.6.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for structloglint-0.6.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c024a6e2fc7cdeeacefb0a42851f841ec6e832a5d566ac7a983b660d38011cf2
MD5 f03f1d25f077440af65bedafcc64ebf9
BLAKE2b-256 8a7ce6f069d058facbbec0c718be148a8ed72f9d1319aeb9aa49d8a5c2b8b4e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.6.0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on maxilar20/structloglint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file structloglint-0.6.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for structloglint-0.6.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3267d30b5fe3a126f2e0e2ac086c045d97373211eb493ac1842de5c9714eb38d
MD5 69e175fdeec7edbbdfb2996a4b992536
BLAKE2b-256 d580d2f05be6f1dd73a4f0a48456ef790c627aa2e41561b6c5280d0486d007e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.6.0-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on maxilar20/structloglint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.6.0 This release

6 files

0.5.0

6 files

0.4.1

6 files

0.4.0

6 files

0.3.0

6 files

0.2.0

6 files

0.1.1

6 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