From bc6b4ddbdde231f6a55750e2245b018527b5c2b9 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Mon, 21 Sep 2020 23:14:32 +0300 Subject: Initial FastAPI server --- iss.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'iss.py') diff --git a/iss.py b/iss.py index fa4aeff..215b7c3 100644 --- a/iss.py +++ b/iss.py @@ -1,3 +1,4 @@ +from fastapi import FastAPI from skyfield.api import Topos, load TEL_AVIV = Topos('32.0853 N', '34.7817 E') @@ -21,3 +22,12 @@ def get_predictions(location=TEL_AVIV, satellite_name=ISS): name = ('rise above 30°', 'culminate', 'set below 30°')[event] print(ti) print(ti.utc_strftime('%Y %b %d %H:%M:%S'), name) + + + +app = FastAPI() + + +@app.get("/") +async def root(): + return {"message": "Hello World"} -- cgit v1.3.1