Skip to main content

spoor

Tests PyPI PyPI - Python Version

pre-commit Code style: black EditorConfig semantic-release: angular

Track invocation of your functions and methods; display collected statistics for the invocations; export data gathered to external services.

$ pip install spoor

Usage

from spoor import Spoor

s = Spoor()

@s.track
def func(a: int, b: int) -> int:
  return a + b

func(5, 10)
func(23, 42)

assert s.called(func)
assert s.call_count(func) == 2

Configuration

Option Type Default Description
attach bool False Expose called/call_count attributes directly on a function/method object.
distinct_instances bool False Separate metrics collection for each instance of a class. Has no effect if tracking only functions.
skip_dunder bool True Do not track double underscore method calls (like __str__) for class instances. Has no effect if tracking only functions.
disabled bool False Initialize as inactive and ignore metrics collection until enabled explicitly. Can be controlled via enable()/disable() methods later.

Exporters

See also

  • 🍒 podmena for nice commits emoji
  • 🌈 rich for beautiful terminal output
  • 🇺🇦 United 24 to support Ukraine in the war

Metadata

Release files for spoor 0.6.0

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

Source distribution (sdist)

Source distribution for spoor 0.6.0
File Size Uploaded Provenance
spoor-0.6.0.tar.gz 7.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for spoor 0.6.0
File Interpreter ABI Platform
spoor-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 kB

Release files / spoor-0.6.0.tar.gz

Download URL spoor-0.6.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
acafc417cae0b7fb21a9b6e272fe367dce1296d450ed222009a1630d47f08459
BLAKE2b-256 checksum
How to use checksums
73091106a274ef9b74f296e18df1dd1eae0e4ec1d0620b5ed583b10d0995fb62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.10.6 Linux/5.15.0-1024-azure

Release files / spoor-0.6.0-py3-none-any.whl

Download URL spoor-0.6.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c89f279748bbf5d8d01b71b676ad88c364bfbfcab0d3bf845b14816da3355bb4
BLAKE2b-256 checksum
How to use checksums
e6757231818c5d744ce1b0ea4fd15c6a4c297f1f8cc7d49076cae1e40978a6cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.10.6 Linux/5.15.0-1024-azure

Security for spoor 0.6.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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