Skip to main content

Provide some practical Python decorators.

Project description

Torbjorn

🔨 提供一些实用的 Python 装饰器~

安装

pip install torbjorn

使用

import torbjorn as tbn

# run_time 计算函数运行时间
@tbn.run_time
def calculate_million_numbers():
    number = 0
    for i in range(1000000):
        number += 1
        
# output:
# >> function "calculate_million_numbers" cost time: 0:00:00.059892

许可

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

torbjorn-0.0.1.tar.gz (2.2 kB view hashes)

Uploaded Source

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