Flask-Scheduler-0.0.51
توضیحات
Background scheduler for Flask
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | Flask-Scheduler-0.0.51 |
| نام | Flask-Scheduler |
| نسخه کتابخانه | 0.0.51 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Furqon Romdhani |
| ایمیل نویسنده | danixml31@gmail.com |
| آدرس صفحه اصلی | https://github.com/furqonat/flask-scheduler |
| آدرس اینترنتی | https://pypi.org/project/Flask-Scheduler/ |
| مجوز | MIT |
# Flask Scheduler
Flask Scheduler is a simple Flask extension that allows you to schedule tasks to run at specific times.
It uses the APScheduler library to schedule tasks.
## Installation
Install Flask Scheduler using pip:
```shell
pip install Flask-Scheduler
```
## Usage
To use Flask Scheduler, import the extension and initialize it with your Flask app:
```python
from flask import Flask
from flask_scheduler import Scheduler
app = Flask(__name__)
# Initialize the extension
scheduler = Scheduler(app)
# scheduler config interval
app.config['SCHEDULER_API_INTERVAL'] = 5 # in seconds
@scheduler.runner()
def my_task():
print('hi im running every 5 seconds')
# if you have separate task, and you don't want to run it every 5 seconds
# you can use interval argument in decorator
@scheduler.runner(interval=10)
def my_task1():
print('hi im running every 10 seconds')
```
## Contributing
Contributions are welcome! Please submit a pull request.
نیازمندی
| مقدار | نام |
|---|---|
| - | Flask |
| - | apscheduler |
نحوه نصب
نصب پکیج whl Flask-Scheduler-0.0.51:
pip install Flask-Scheduler-0.0.51.whl
نصب پکیج tar.gz Flask-Scheduler-0.0.51:
pip install Flask-Scheduler-0.0.51.tar.gz