A package to prevent Dependency Confusion attacks against Yandex.


License
MIT
Install
pip install yat==1.1.3

Documentation

yat

Yet Another Timer for Python code.

  • pip install yat

Usage

Decorator

import time

from yat import YAT


@YAT()
def decorate_timer():
    time.sleep(1)


decorate_timer()

# Output: decorate_timer (example.py:7) took 1.00000 seconds to run.

Context Manager

import time

from yat import YAT


def context_timer():
    with YAT():
        time.sleep(1)


context_timer()

# Output: context_timer (example.py:7) took 1.00000 seconds to run.

Other (Custom Message)

import time

from yat import YAT

with YAT("a message"):
    time.sleep(1)

# Output: a message (example.py:5) took 1.00000 seconds to run.