Skip to content

Commit f990c9f

Browse files
proyecto de Python actualizado
1 parent 3595323 commit f990c9f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

API_Python/app.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import os
2+
from typing import Union
3+
from fastapi import FastAPI
4+
from pydantic import BaseModel
5+
6+
app = FastAPI()
7+
8+
@app.get("/familia")
9+
def get_familia():
10+
rows = ["Amin", "Marce", "Miranda"]
11+
return rows
12+
13+
@app.get("/superheroes")
14+
def get_superheroes():
15+
rows = ["Superman", "Batman", "Flash", "Linterna Verde", "Mujer maravilla", "Aquaman", "Shazam", "Cyborg"]
16+
return rows
17+
18+
@app.get("/consolas")
19+
def get_consolas():
20+
rows = ["Xbox One", "Xbox 360", "Xbox Series S", "Xbos Series X" "Play Station 4", "Play Station 5", "Nintendo Switch", "Game Cube"]
21+
return rows

API_Python/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fastapi
2+
uvicorn[standard]
3+
pydantic

0 commit comments

Comments
 (0)