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

Uploaded Source

Built Distribution

upils-0.7.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: upils-0.7.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.12.0 Darwin/23.3.0

File hashes

Hashes for upils-0.7.0.tar.gz
Algorithm Hash digest
SHA256 d32314babd7b342c88b38a23202219273c0db87ef66d3c99d596e356d71e552a
MD5 36b8c5f77ff2bc26bec7fd3357442ced
BLAKE2b-256 df83ba4e1d75148374d3d91db3b02301b1851c66591f4ded18ed7199558080ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: upils-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.12.0 Darwin/23.3.0

File hashes

Hashes for upils-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28efa0a4c2ea771fdf3e38135e14f79c91bf79fe51fd3d4bb15c7dd4cb2dd507
MD5 07dba04614a3124a7ffbed880c59e253
BLAKE2b-256 816d16dd1b78d36ece00bf6295fbf3d93f0c634ef08fcc8c45b5fdac9247b983

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page