Add base code for REST API using Flask

This commit is contained in:
Lexi / Zoe 2022-03-26 01:07:47 +01:00
parent 0be947b3d1
commit 2da6e43797
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
12 changed files with 266 additions and 14 deletions

14
tofu_api/api/rest_api.py Normal file
View file

@ -0,0 +1,14 @@
from flask import Blueprint
from .tasks import TaskApiBlueprint
class TofuApiBlueprint(Blueprint):
"""
Main blueprint for the Tofu REST API.
"""
def __init__(self):
super().__init__('rest_api', __name__, url_prefix='/api')
self.register_blueprint(TaskApiBlueprint())