Skip to main content

Emit

A Python library for understated tracing and structured logging.

TL;DR

# This is the big idea. Now let's use it.
def emit(obj):
    return obj.__emit__()

Logging

from emit import emit, Info, Warning

def frobulate_the_quartzle():
    # This works like you expect, no more logger = logging.getLogger(__name__).
    # just emit and the log will originate from the right place.
    emit(Info("Frobulating the quartzle"))

    if not Quartzle.is_polarized():
        emit(Warning("Quartzle isn't polarized, results may be different than expected."))

Structured Logging

from emit import emit, Context

def push_noins():
    emit(Info("Noins updated."))

def shuffle_lorpizoids():
    emit(Context(current_user="Harry Styles"))

    # The log emitted from this code will include the current_user context.
    push_noins()

Say No To Passing Around Loggers Just To Bind Values

# In `structlog`
log = log.bind(key=value)

# In `emit`
emit(Context(key=value))

Metadata

Release files for python-emit 0.0.1

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

Source distribution (sdist)

Source distribution for python-emit 0.0.1
File Size Uploaded Provenance Actions
python-emit-0.0.1.tar.gz 5.7 kB Without provenance Details for python-emit-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-emit 0.0.1
File Interpreter ABI Platform Actions
python_emit-0.0.1-py3-none-any.whl Python 3 none any Details for python_emit-0.0.1-py3-none-any.whl

Total release size: 10.2 kB

Release files / python-emit-0.0.1.tar.gz

Download URL python-emit-0.0.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
89e730b60db57d96e14c7f17099861b474915e27fbbdfa2b2198c5a75908e016
BLAKE2b-256 checksum
How to use checksums
f4fc4bbe733ca7891b994069f941c5ab17491c5a807d431ae0d1cb157f2b1c82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.7

Release files / python_emit-0.0.1-py3-none-any.whl

Download URL python_emit-0.0.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
440d8ddc4b887a0004f83377e4f1b24d0818b5241b48ac13fa7d1879b0562206
BLAKE2b-256 checksum
How to use checksums
1e6c6bff40848b7df748763d205d979f6b8062265a7a34b35cca4bb688a74a90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.7

Security for python-emit 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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