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:
- Install uv and enter a shell session with it (and other system dependencies) available
- Run
uv syncto- Install a compatible Python version
- Create a new Python Virtual Environment (
venv) - Install package dependencies specified in
pyproject.tomlfrom PyPi into the venv
- Run
source .venv/bin/activateto 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 syncandsource .venv/bin/activateand 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:
dr.t ./splatlog/**/*.py ./docs/content/**/*.md
Single file, fail-fast, printing header panel (so you can find where they start and end easily during repeated runs):
dr.t -fp <filename>
Publishing
-
Update the version in
pyproject.toml. -
Commit, tag
vX.Y.Z, push. -
Log in to PyPI and go to
https://pypi.org/manage/account/
to generate an API token.
-
Throw
poetryat it:poetry publish --build --username __token__ --password <token> -
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file splatlog-0.3.5.tar.gz.
File metadata
- Download URL: splatlog-0.3.5.tar.gz
- Upload date:
- Size: 46.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6494446a6698a1a9ca56c039d88f61cb4d9393d56cad3f45ec08b8243ab07f5
|
|
| MD5 |
9a77cd80570684cbc169176dc10a8f4f
|
|
| BLAKE2b-256 |
e4088fae000c973624f872dda4d2b6d7baaeaeea133d295a7b88a6bbd07c20e3
|
Provenance
The following attestation bundles were made for splatlog-0.3.5.tar.gz:
Publisher:
python.yml on nrser/splatlog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
splatlog-0.3.5.tar.gz -
Subject digest:
f6494446a6698a1a9ca56c039d88f61cb4d9393d56cad3f45ec08b8243ab07f5 - Sigstore transparency entry: 736054622
- Sigstore integration time:
-
Permalink:
nrser/splatlog@66539ba4701b9c9e85e503b20c409d477de01dea -
Branch / Tag:
refs/tags/v0.3.5 - Owner: https://github.com/nrser
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yml@66539ba4701b9c9e85e503b20c409d477de01dea -
Trigger Event:
push
-
Statement type:
File details
Details for the file splatlog-0.3.5-py3-none-any.whl.
File metadata
- Download URL: splatlog-0.3.5-py3-none-any.whl
- Upload date:
- Size: 62.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
615e4d9d516efe00be0ef34e9e3973a3f73e155c8df7b2591d37d2adbb2ba938
|
|
| MD5 |
43ddd6eb32c5d50ec51b89b0df9546a9
|
|
| BLAKE2b-256 |
ad5fedfe8864fcb43775e92b86d0f342eadc09f04efe1547019a00402f0db3cf
|
Provenance
The following attestation bundles were made for splatlog-0.3.5-py3-none-any.whl:
Publisher:
python.yml on nrser/splatlog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
splatlog-0.3.5-py3-none-any.whl -
Subject digest:
615e4d9d516efe00be0ef34e9e3973a3f73e155c8df7b2591d37d2adbb2ba938 - Sigstore transparency entry: 736054626
- Sigstore integration time:
-
Permalink:
nrser/splatlog@66539ba4701b9c9e85e503b20c409d477de01dea -
Branch / Tag:
refs/tags/v0.3.5 - Owner: https://github.com/nrser
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yml@66539ba4701b9c9e85e503b20c409d477de01dea -
Trigger Event:
push
-
Statement type: