Test1hdhs718 commited on
Commit
62eb5a2
·
1 Parent(s): ef603eb

initial project

Browse files
Files changed (3) hide show
  1. .gitignore +28 -0
  2. main.py +11 -0
  3. requirements.txt +0 -0
.gitignore ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Virtual environment
2
+ venv/
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.pyc
7
+ *.pyo
8
+ *.pyd
9
+
10
+ # Compiled C extension
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ dist/
15
+ build/
16
+ *.egg-info/
17
+
18
+ # Local development
19
+ db.sqlite3
20
+
21
+ # IDE files
22
+ .vscode/
23
+ .idea/
24
+
25
+ # Ignore Docker-related files (if you are using Docker)
26
+ Dockerfile
27
+ docker-compose.yml
28
+ .dockerignore
main.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/")
6
+ def read_root():
7
+ return {"message": "Hello, World!"}
8
+
9
+ @app.get("/items/{item_id}")
10
+ def read_item(item_id: int, query_param: str = None):
11
+ return {"item_id": item_id, "query_param": query_param}
requirements.txt ADDED
Binary file (506 Bytes). View file