Skip to main content

A lightweight decorator for logging function start, completion, and elapsed time.

Project description

status_update

A minimal Python decorator for logging what your functions are doing and how long they take.


Installation

pip install status-update

Usage

Works out of the box with no configuration:

from status_update import status_update

@status_update
def load_data():
    ...

Or pass in your own logger:

import logging
from status_update import status_update

logger = logging.getLogger("myapp")

@status_update(logger=logger)
def process_data():
    ...

Every call will log three things automatically: INFO Started [load_data]. INFO Completed [load_data] in 2 minutes, 14 seconds.

If the function raises, you get this instead: INFO Started [load_data]. ERROR Failed [load_data] after 1 minute, 3 seconds. Error: ...


License

Free to use and modify for any purpose.
Professional or organisational use requires crediting the author.

© 2025 Alexandru-Gabriel Michiduță — michidutaalexandru1995@yahoo.ro
Improvements and suggestions are always welcome.

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

status_update-1.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

status_update-1.0.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file status_update-1.0.1.tar.gz.

File metadata

  • Download URL: status_update-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for status_update-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5a942ed0b8203db8102f7691033b52d60f499023e82e409feb2fe86a10f0918a
MD5 e2b32517c27d0168871a0faf01a211c5
BLAKE2b-256 bea195f43851ecc47aea8328a3645990c9bdffdca80a51952bae1369a51ac52c

See more details on using hashes here.

File details

Details for the file status_update-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: status_update-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for status_update-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf4efc9c4b9f06968d15b40b24717086285a82a69aded9996c2f21bfb629a75b
MD5 721d96ab915857f44a40c66687a5f9b5
BLAKE2b-256 9575018603d488c97a6ac85d296b5017a2ce95a68152c3f16d2964eabe00f1d0

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