commit f22eeef608fa2e93b71dfa7708a778d30ddb29d6 Author: maxid Date: Sat Feb 8 18:35:32 2025 +0100 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..986773d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +venv +MediaManager.iml \ No newline at end of file diff --git a/MediaManager/src/MediaManager/main.py b/MediaManager/src/MediaManager/main.py new file mode 100644 index 0000000..6d7c6d9 --- /dev/null +++ b/MediaManager/src/MediaManager/main.py @@ -0,0 +1,13 @@ +from fastapi import FastAPI + +app = FastAPI() + + +@app.get("/") +async def root(): + return {"message": "Hello World"} + + +@app.get("/hello/{name}") +async def say_hello(name: str): + return {"message": f"Hello {name}"} diff --git a/MediaManager/test/MediaManager/test_main.http b/MediaManager/test/MediaManager/test_main.http new file mode 100644 index 0000000..a2d81a9 --- /dev/null +++ b/MediaManager/test/MediaManager/test_main.http @@ -0,0 +1,11 @@ +# Test your FastAPI endpoints + +GET http://127.0.0.1:8000/ +Accept: application/json + +### + +GET http://127.0.0.1:8000/hello/User +Accept: application/json + +###