Skip to main content

Unified Python Utils. Requires python 3.10 and later

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


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.13.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

upils-0.13.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file upils-0.13.0.tar.gz.

File metadata

  • Download URL: upils-0.13.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.18 Darwin/25.3.0

File hashes

Hashes for upils-0.13.0.tar.gz
Algorithm Hash digest
SHA256 576280caf3c9278422d39e99d9e4f6b269ed90026df77fd42ef564f80c390446
MD5 de2ba3a8fb7b22207f3cecd06c8217ed
BLAKE2b-256 6310be961003baf4a4954d332c4b40e571c54f5db2d0b36dcc0a1cc5c4a74d69

See more details on using hashes here.

File details

Details for the file upils-0.13.0-py3-none-any.whl.

File metadata

  • Download URL: upils-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.18 Darwin/25.3.0

File hashes

Hashes for upils-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 585aa0514ab2ab272c4dcf28bbebf5094d0fef144227fc7e629bb7b928fb3b07
MD5 4ad2ab172302ac34ed455bfec639e4ef
BLAKE2b-256 1d7d85a04d2d1bbf12069f5e6689d5ac74785f3d719e0f87cd8a32ecaf86e7bf

See more details on using hashes here.

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