diff --git a/main.py b/main.py deleted file mode 100644 index 0917648..0000000 --- a/main.py +++ /dev/null @@ -1,46 +0,0 @@ -""" -The new 2anki backend API. -""" -import fastapi - -VERSION = "0.0.1" -description: str = """ -The create_deck API helps you create Anki flashcards fast. 🌟 -""" - -tos: str = "https://alemayhu.notion.site/Terms-of-services" \ - "-931865161517453b99fb6495e400061d " - -app = fastapi.FastAPI( - title="create_deck API", - description=description, - version=VERSION, - terms_of_service=tos, - contact={ - "name": "Alexander Alemayhu", - "url": "https://alemayhu.com", - "email": "alexander@alemayhu.com" - }, - license_info={ - "name": "MIT LICENSE", - "url": "https://github.com/2anki/create_deck/blob/main/LICENSE" - } -) - - -@app.get("/") -def read_version(): - """ - Endpoint for reading current version of the API. - :return: version string - """ - return VERSION.encode("utf-8") - - -@app.get("/checks") -def read_checks(): - """ - Endpoint used for performing health checks. - :return: "create_deck" string - """ - return "create_deck" diff --git a/requirements.txt b/requirements.txt index 160455e..6b95ac3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,7 @@ # make sure to update the alemayhu/base-image-n2a # and pull it in the live server: ssh root@2anki.net docker pull alemayhu/base-image-n2a genanki==0.13.0 -fastapi>=0.68.0,<0.96.0 pydantic>=1.8.0,<2.0.0 -uvicorn>=0.15.0,<0.23.0 pylint>=2.17.0 bugsnag>=4.5.0