The main purpose for hook connection with db, based on flask-sqlalchemy and Flask-APScheduler.
Project description
Flask Database Pacemaker
python_requires>=3.6
Flask>=1.0.2
Flask-APScheduler>=1.11.0
Flask-SQLAlchemy>=2.3.2
- How to use
- Import package at
app.py
from flask_dbpacemaker import DBPacemaker
- Append this after you declare
config
andapp
DBPacemaker.run(app=app, config=config, interval=60, display=True)
- If you already have a exist scheduler, remember add it as parameters.
DBPacemaker.run(app, config, 60, True, secheduler=secheduler)
Note: The job trigger is 'interval', and interval unit is set as seconds.
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
Built Distribution
File details
Details for the file Flask-DBPacemaker-0.0.1.tar.gz
.
File metadata
- Download URL: Flask-DBPacemaker-0.0.1.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5643707cb69684a33571343691ec0f7dfe99851e14f7a105461d26acfa95a834 |
|
MD5 | 9b3a476125ab740d8dcd5046eca24fb8 |
|
BLAKE2b-256 | 9724a1811c36e4b66e83f0d5ac843d45964f763edcbd1fdedde7f90bc0e4486c |
File details
Details for the file Flask_DBPacemaker-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: Flask_DBPacemaker-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 775e45a4c7c2e0bd8318cfe6f151abff3f9e49fb41b3922e7d0388d433920a08 |
|
MD5 | f515e103b6ec56abb5d4cfc81503e22a |
|
BLAKE2b-256 | dfc26a14992ee25aa245a15f78406573944baceb1f1bd8b42e50780fd0dbd105 |