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
liforra_utils-0.2.0.tar.gz
(8.2 kB
view details)
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.2.0.tar.gz.
File metadata
- Download URL: liforra_utils-0.2.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
985a13ed07a55f800d810c4656917da22ec0c8ad19cafe7f9dc80fa88041d01f
|
|
| MD5 |
922fd3bb750c3ca016704c5d0f6d28b1
|
|
| BLAKE2b-256 |
fb209ad8c0fb4ee6a03ea2124958ae21806ebeeb4cb5456c9f4e42e1a9f05121
|
File details
Details for the file liforra_utils-0.2.0-py3-none-any.whl.
File metadata
- Download URL: liforra_utils-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cb81bc51e27c39aed879d391d15d631fe90b41f15caf9af469aa9845f1988ed
|
|
| MD5 |
ea7dcb2cda8cf09e90b2e9efae361683
|
|
| BLAKE2b-256 |
2fa9def27edc2dce4bfc9a713e35edfa7a39503526157b239e0e4370cbab5079
|