Unified Python Utils
Project description
Unified Python Utils
Collection of python library utils
Installation
poetry add upils
How to use the logger
First, set up the logger. It accepts string like "INFO" or int 20
logger = configure_logger(20)
And then you can just use it like other logger
logger.info("info")
logger.warning("warning")
Add extra information
How to use the extra logging:
logger.bind(user="ajung", desc="smart").error(
"Inline binding of extra attribute"
)
The output will be
{"level": "ERROR", "time": {"repr": "2023-10-04 12:03:53.043106+07:00", "timestamp": 1696395833.043106}, "message": "Inline binding of extra attribute", "file": {"name": "app.py", "path": "/Users/user/Documents/projects/de-projects/service/statistics-services/app.py"}, "line": 47, "exception": null, "extra": {"ajung": "smart"}}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
upils-0.3.0.tar.gz
(2.3 kB
view details)
Built Distribution
upils-0.3.0-py3-none-any.whl
(2.9 kB
view details)
File details
Details for the file upils-0.3.0.tar.gz
.
File metadata
- Download URL: upils-0.3.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a189f9f3aeb8ef69ee2e3864247481c0b4858a326309f833161413e4f1a3631b |
|
MD5 | 7e4d87795a581aa833fb00bb7e456caa |
|
BLAKE2b-256 | 10642b2f31ed1ec9c467acc2cf07bc920b637cafd401b9dc16024f1f1e660d30 |
File details
Details for the file upils-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: upils-0.3.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52fce3f57679deb39cb7f99a2b20923476513f951966011ca216d93621810fd1 |
|
MD5 | e061accfc515dc19b5b3359af4bc877e |
|
BLAKE2b-256 | 110e09916546341dd75ed20423168d6ff6053d00570d7b061ce9f806413bb5e6 |