Library prototyping based on Calibre with Flask
changelog | ||
flask_calibrestekje | ||
test | ||
.gitignore | ||
.readthedocs.yml | ||
.travis.yml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
MANIFEST.in | ||
mypy.ini | ||
pyproject.toml | ||
README.md | ||
README.rst | ||
setup.cfg | ||
setup.py | ||
tox.ini |
flask-calibrestekje
Library prototyping based on Calibre with Flask
Example
app.cfg
CALIBRESTEKJE_SQLITE_URL = "sqlite:///mymetadata.db"
app.py
from calibrestekje import Book
from flask import Flask, jsonify
from flask_calibrestekje import CalibreStekje
app = Flask(__name__)
app.config.from_pyfile("app.cfg")
db = CalibreStekje(app)
@app.route("/")
def home():
return jsonify({"book-count": db.session.query(Book).count()})
command-line
$ export FLASK_APP=app.py
$ flask run