Skip to main content

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

Project description

structloglint

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

Status: Early development (v0.3.0)

Installation

uv 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 camelCase

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-case-style = "snake_case"
max-event-length = 30
loop-log-level = "info"
select = ["SL001", "SL002", "SL003", "SL004", "SL005", "SL006", "SL007", "SL008", "SL009"]

[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 = "camelCase"
max-event-length = 50

[rules]
SL007 = "off"

See RULES.md for all configuration options.

See ROADMAP.md for the project plan.

License

MIT

Project details


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.4.0-py3-none-win_amd64.whl (2.3 MB view details)

Uploaded Python 3Windows x86-64

structloglint-0.4.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.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

structloglint-0.4.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.4.0-py3-none-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

structloglint-0.4.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.4.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for structloglint-0.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 45fd64ac5fc78f55ced9f9d7e721dcf76d55957b6033a986ac1b290a25242030
MD5 2d6ce9dfe807a5fdcaf0c97c14bf91a2
BLAKE2b-256 0f393b36de2f092f4b38e3a5e821c4707b83c27087e05ed7e0690bad912211ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.4.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.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for structloglint-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 623fa336ce40dcd88e6f16afb8b1a8178eec4d744567b0fa2d4ad640b51e275d
MD5 62fe7887872b063feda76d5edae0f752
BLAKE2b-256 fa656c08891fb83e3d1b1c1a4dbd11948db72684d3d6fad1fe239295c9f01c5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.4.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.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for structloglint-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c0a874da90e3a7f2de8aa7ac9b3d35c9812f7828e95bcdff75db71d6ad2e2ab9
MD5 9aef80d7d8375c979b0b74a8420bea12
BLAKE2b-256 3c064ec33bcfbfd2c4a0083b3111214145cc84cf17fae322191df1b78d5a0d77

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.4.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.4.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for structloglint-0.4.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 aed5a455da09820eb81e357ba8172ecab59d85b446a622320189867b48a4e6c4
MD5 c3429ab2772c446651deada1ffb6f5a3
BLAKE2b-256 6ab5cf55ff9cea0e79cfbddca7396f42f401e9e0d51f7fd279968449f96d2c06

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.4.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.4.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for structloglint-0.4.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fc5127dc5cca0e3bf93435507c2290c32463924b834d4bbf745901944670b56
MD5 beeeb2eebfc25914f6aade727492402c
BLAKE2b-256 4fe243d512a2875f9460026d91919a5140dba193c41a30ab7fa30d3f15b36aed

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.4.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.4.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for structloglint-0.4.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 579014a02ceae417f9a6649a436c7accd1fefe60cd875efcb73c67de42b5f2e5
MD5 b86ed5d84b55c73680d3f70a3492661f
BLAKE2b-256 b6b86c8c34a2f2d2d7b9a62c41af6a9691595b71097f19dae816adac7a88ebdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for structloglint-0.4.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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page