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

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

structloglint-0.4.1-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.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for structloglint-0.4.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c4f3d93582ae9b8697b27bc35e20ec48d7b767b745427558bc7f6b08a594889a
MD5 cdec0f7399089ab2a1efca10ecbd22a1
BLAKE2b-256 55011d6f1c95234917b47829fbca13678f93f576697ee3e957000bb21e52fa0e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for structloglint-0.4.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56e22d8a0773e36eff6d8200232420fe91561bce526e1b38a89d908ac89424e6
MD5 4ef7ee1737a8b79a3170a4ecd09e35af
BLAKE2b-256 4c5e33e84a1b08634259ea1e68b0ca6f8b889c242e6fa4c1220801fe29b30eda

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for structloglint-0.4.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 110caee6ea6b1a427703a49f0e8c50669b77f337383d75c64d84ff7b4a006c1c
MD5 ce1f73865cd8d3261675fbfb02ba2329
BLAKE2b-256 65a34ceec387b712cae45fa5187bf8b9a964bf61a948010bacfb86ef27c4aa37

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for structloglint-0.4.1-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 31614a7c49a0ba0252b5f472bec523087cc58a43870d5229cc74d8c5c7081d76
MD5 583da315b558b7285d7c6c7c26d83384
BLAKE2b-256 bac89b2b057098986fb5b8662b99c82fa40e261ddac8a6630923e7def32c615a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for structloglint-0.4.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0feb77f5fe74a5a9e3e7564f4450c5e64e323b194b559ab4f811b98d6dea7ce2
MD5 0a20c9a8b25968d97907dfed33b7d10b
BLAKE2b-256 397e7dd029002d27318b1c54a3dd8d927e5c5d7216052f0d9f691b49b0c0d2d7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for structloglint-0.4.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 23335fc70e075f9352aef926d70a0e627283250202b55c38f063a33cecb252a3
MD5 2156db3f34e5f63a7d20e3dbbdc16c11
BLAKE2b-256 ecab70f192cefbcdf6784636c922674abb24442f3bd30fa9596dfc8a00477aea

See more details on using hashes here.

Provenance

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