一个可以在到达目标时间时执行任务的第三方库
Project description
Countdown
python第三方库,实现到达目标时间执行函数
安装
pip isntall FuyaoCountdown
使用
from FuyaoCountdown.countdown import Countdown
def job():
print("job is running")
if __name__ == '__main__':
cd = Countdown("2025-09-16", 5, 20)
cd.threadExecutor(True, job)
参数说明
Countdown(
date: str 日期,如 "2025-09-16",
hour: int 小时,如 5
minute: int 分钟,如 20
second: int 秒,如 0
nextTime: bool 当前目标时间到达后是否继续进行倒计时任务(明天的目标时间)
)
Countdown.threadExecutor(
useThread: bool 是否启用新线程
job: Callable[..., Any] 可调用的任意对象/函数(任务对象)
jobArgs: tuple 任务对象所需的参数
)
项目结构
Countdown 项目名
src 源代码
FuyaoCountdown 软件包
pyproject.toml 打包信息
README.md 说明文件
更新日志
v0.0.1
1.支持新线程执行任务
v0.0.2
修复bug: 1.修复函数传参少的问题 2.修复传入datetime.date类型数据无法解析的问题 3.修复控制台输出不换行的问题
更新: 1.添加对执行到下一个目标时间的可选参数
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fuyaocountdown-0.0.2.tar.gz
(5.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fuyaocountdown-0.0.2.tar.gz.
File metadata
- Download URL: fuyaocountdown-0.0.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3685dddc59c643712b9dc9105d95a6263101ec7ede4b34fd83e83e8f2fb03e99
|
|
| MD5 |
9a166a4e6e98e3ccbc28c2b9631153be
|
|
| BLAKE2b-256 |
51528e9b24f2a315eb38a6d44ebe392d09c9735522a0e241b332497004dc38c2
|
File details
Details for the file fuyaocountdown-0.0.2-py3-none-any.whl.
File metadata
- Download URL: fuyaocountdown-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00019b91f764ffcfb62397b2ab5fd22354ba962e5bd35fc9ec95da910bee2c83
|
|
| MD5 |
9d10b187ec078ccfa28de064f297cf9a
|
|
| BLAKE2b-256 |
91e4437954898c61a7c22c988a85f727d595ebf8f07a713ce065f42c9852aa73
|