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.9.0.tar.gz (3.5 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.9.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: upils-0.9.0.tar.gz
  • Upload date:
  • Size: 3.5 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.9.0.tar.gz
Algorithm Hash digest
SHA256 3a3a3b9e96d3d18989e54265a058fd784518fe345bc75e654de3b18eba64a2bb
MD5 332ed1f217e59db83b8616cad3d992ae
BLAKE2b-256 26647b9224ed5426722f1b4b0863a00df47b665a0b3b1c0d3f10a029e564ff4d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: upils-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f02e35581b97fb23b781b781b7b87308f63bca30f5ca88e152da58e9d5329f5
MD5 1c759f7d1b5a018983bdec9cda66fbe2
BLAKE2b-256 2a0d1ec5eb9369d7ce517b5f9f7ffd5af2147c118a9b4b1767883c442e77051b

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