Skip to content

Commit 452b284

Browse files
committed
Premier commit pour le projet Python Fast API
0 parents  commit 452b284

File tree

10 files changed

+80
-0
lines changed

10 files changed

+80
-0
lines changed

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/FastAPIProject.iml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Projet Python Studi - FastAPI
2+
3+
Projet d'apprentissage de python avec fast API
4+
5+
### Utilisation :
6+
7+
- Cloner le projet
8+
- pip install -r requirements.txt
9+
- fastapi run main.py _[--port xxxx]_
10+

main.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from fastapi import FastAPI
2+
3+
app = FastAPI()
4+
5+
6+
@app.get("/")
7+
async def root():
8+
return {"message": "Hello World"}
9+
10+
11+
@app.get("/hello/{name}")
12+
async def say_hello(name: str):
13+
return {"message": f"Hello {name}"}

requirements.txt

1.22 KB
Binary file not shown.

test_main.http

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Test your FastAPI endpoints
2+
3+
GET http://127.0.0.1:8000/
4+
Accept: application/json
5+
6+
###
7+
8+
GET http://127.0.0.1:8000/hello/User
9+
Accept: application/json
10+
11+
###

0 commit comments

Comments
 (0)