Skip to main content

Python logger that accepts ** values and prints 'em out.

Project description

splatlog

Python logger that accepts ** values and prints 'em out.

Because I'll forget, and because I know I'll look here when I do...

Usage

# Swap `splatlog` for `logging`
import splatlog

# Get a logger instance same as you would from `logging`
log = splatlog.getLogger(__name__)

# In your `__main__.py` or wherever you get started
splatlog.setup(level="info", console="stderr")

Development

Setup the nix package manager on your machine and run:

nix-shell

That's it, you should be in a shell session with uv, python, dr.t, make, sphinx-build, and everything else you'll need available.

What nix-shell did:

  1. Install uv and enter a shell session with it (and other system dependencies) available
  2. Run uv sync to
    1. Install a compatible Python version
    2. Create a new Python Virtual Environment (venv)
    3. Install package dependencies specified in pyproject.toml from PyPi into the venv
  3. Run source .venv/bin/activate to activate the venv, making the Python packages and executables available

These steps are specified in the shell.nix file.

⁉️ If you do not want to use nix for whatever reason, you should be fine getting uv from your OS package manager or the online installer. Just run uv sync and source .venv/bin/activate and you should be good.

⁉️ If you do not want to use uv for whatever reason, you should — in theory — be able to substitute your favorite Python ecosystem tool that understands the pyproject.toml standard.

Building Docs

cd ./docs && make html

Watching and serving:

cd ./docs && make watch

Running Tests

All of them:

tox

Single file:

poe test <filename>

Publishing

  1. Update the version in pyproject.toml.

  2. Commit, tag vX.Y.Z, push.

  3. Log in to PyPI and go to

    https://pypi.org/manage/account/

    to generate an API token.

  4. Use uv to build and publish:

    uv build
    uv publish --token <token>
    
  5. Bump patch by 1 and append a0, commit and push (now we're on the "alpha" of the next patch version).

Project details


Download files

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

Source Distribution

splatlog-0.4.1.tar.gz (69.9 kB view details)

Uploaded Source

Built Distribution

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

splatlog-0.4.1-py3-none-any.whl (85.0 kB view details)

Uploaded Python 3

File details

Details for the file splatlog-0.4.1.tar.gz.

File metadata

  • Download URL: splatlog-0.4.1.tar.gz
  • Upload date:
  • Size: 69.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for splatlog-0.4.1.tar.gz
Algorithm Hash digest
SHA256 8f2a0ba82a06438d985504e15460e8c2300c49e7b1d71d1cf4800e92c011ddb9
MD5 794aa9edb0ac2d6609d75631e6fffc46
BLAKE2b-256 f44d409b61ce383f1556841612d99f97e9a6c0ca08d77a791c536b0842acc390

See more details on using hashes here.

Provenance

The following attestation bundles were made for splatlog-0.4.1.tar.gz:

Publisher: python.yml on nrser/splatlog

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

File details

Details for the file splatlog-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: splatlog-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 85.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for splatlog-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf7cf2e91df8d5d544dd5c1c01068cf988f1554046557e156883873f83c0ab0b
MD5 b5b0c162667cdb81155d7e584b32ff37
BLAKE2b-256 2f85e912e0447c6185ba41bd3d6d115872c4a2f53d7bd1c3c4ddebb5169bea18

See more details on using hashes here.

Provenance

The following attestation bundles were made for splatlog-0.4.1-py3-none-any.whl:

Publisher: python.yml on nrser/splatlog

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