Small logging and config helper utilities
Project description
lutils
Small logging and config helpers.
Features
- Logging helper with consistent levels, optional color output, and optional file output.
- Config helper with dot-delimited keys and auto-create on missing values.
- Supports TOML/INI/JSON/YAML formats depending on installed parsers.
- Lightweight, minimal dependencies.
Examples
Logging:
import lutils
lutils.set_log_level("debug")
lutils.log("info", "Hello from lutils")
Config (auto-creates missing values when a default is given):
import lutils
lutils.config.set("app.name", "beeper")
print(lutils.config.get("app.name"))
print(lutils.config.get("missing.value", "fallback"))
Config file selection (defaults to ./config.*):
import lutils
lutils.config.set_name("settings")
lutils.config.set_path("./")
Optional dependencies
lutils uses optional parsers if you have them installed:
toml(only needed on Python < 3.11; Python 3.11+ usestomllib)PyYAMLfor YAML supportcoloredlogsfor colored log output
Install with extras (recommended):
pip install "lutils[toml,yaml,colors]"
Individual extras:
pip install "lutils[toml]" # TOML on Python < 3.11
pip install "lutils[yaml]" # YAML support
pip install "lutils[colors]" # coloredlogs output
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 liforra_utils-0.1.0.tar.gz.
File metadata
- Download URL: liforra_utils-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86d532f0dbb85b6cdc0be2ed0980395627b340921e86d39e639c9b9a3e12fa2e
|
|
| MD5 |
d9a356dc8d8f0d0b0f28de27ec410603
|
|
| BLAKE2b-256 |
e3ac68a292f2a7f3d9d92f1eb4e3f6e53921a6f00bab1b6e677569191d9031d8
|
File details
Details for the file liforra_utils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: liforra_utils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a45696fa7b989d0e581aedbf99c32c8b463fd48ba8908ffdf028170c082dad87
|
|
| MD5 |
8892ac49cd7ff2bca127e102ca14284e
|
|
| BLAKE2b-256 |
5aa32497ce24ad8da00609c7374f672749326794b28e584c73cd4e9c1925dd2c
|