Archived
添加了api接口需要key的规则
This commit is contained in:
9 files changed
+151
-40
No files matched your search
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -- coding:utf-8 --
|
||||
# @Author: markushammered@gmail.com
|
||||
# @Development Tool: PyCharm
|
||||
# @Create Time: 2022/4/5
|
||||
# @File Name: decorators.py
|
||||
|
||||
import time
|
||||
from functools import wraps
|
||||
|
||||
|
||||
def time_it(func):
|
||||
@wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
print('I: 数据库文件开始下载')
|
||||
start = time.time()
|
||||
result = func(*args, **kwargs)
|
||||
end = time.time()
|
||||
print('I: 下载结束, 耗时 {} 秒'.format(round(end - start, 2)))
|
||||
return result
|
||||
|
||||
return wrapper
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user