Metadata-Version: 2.4
Name: FuyaoCountdown
Version: 0.0.2
Summary: 一个可以在到达目标时间时执行任务的第三方库
Author-email: fuyao-norway <1959415641@qq.com>, fuyao-ziqiu <1987239025@qq.com>, fuyaoteam <fuyaoteam@gmail.com>
License: MIT License
        
        Copyright (c) 2025 luo hongwei
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Repository, https://github.com/fuyao-lhw/FuyaoCountdown
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.10.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pathlib>=1.0.1
Dynamic: license-file

# Countdown
python第三方库，实现到达目标时间执行函数

# 安装
``pip isntall FuyaoCountdown``

# 使用
```python
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)


```

## 参数说明
```text

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  任务对象所需的参数
)

```


# 项目结构
```text
Countdown  项目名
    src  源代码
        FuyaoCountdown  软件包
    pyproject.toml  打包信息
    README.md  说明文件
    


```


# 更新日志

## v0.0.1
1.支持新线程执行任务

## v0.0.2
修复bug：
1.修复函数传参少的问题
2.修复传入datetime.date类型数据无法解析的问题
3.修复控制台输出不换行的问题

更新：
1.添加对执行到下一个目标时间的可选参数
