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.8.0.tar.gz (3.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.8.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: upils-0.8.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.6.0

File hashes

Hashes for upils-0.8.0.tar.gz
Algorithm Hash digest
SHA256 e9f89372f055639562f797a1bae2984c528c1125ef3c5d0070c262631a2c2f1a
MD5 ab65ac1db8d5e2e0c2616d72aba06d0e
BLAKE2b-256 ef5b81295c830a426a1ee41925ba5b385e28416c09a7eabb2c1811f18ada479c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: upils-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.6.0

File hashes

Hashes for upils-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2be072d01068b1e14ed8e1798c1443f99dc667a09cf28dbacb5a89c64108fd36
MD5 7233bf3bedfbfa7ceaad488eb223b408
BLAKE2b-256 75c6b91408b68856973799bdd9553a222841379426e2f7b96479fd82c5ed4381

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