Skip to content
 
 

Repository files navigation

COVID_schools_dashboard

Servidor

Instalar dependencias:

pip install fastapi
pip install uvicorn[standard]

Iniciar el servidor con:

uvicorn server:app

Para desarrollo local se puede iniciar con --reload para reiniciar cuando se hacen cambios en el código:

uvicorn server:app --reload

Docker

La aplicación se despliega como imagen de Docker. Para actualizar la imagen en Docker Hub:

Crear imagen localmente

docker build -t enflujo/colegios-api .

Probar imagen localmente antes de subir a Docker Hub:

docker run --name colegios-api -p 8000:80 enflujo/colegios-api:latest

Actualizar imagen en Docker Hub

docker push enflujo/colegios-api

Sitio

La página queda en localhost:8000

Para pasar parámetros al API:

http://localhost:8000/?city=cali&n_teachers=90

Parametros

nombre type default opciones
city str "bogota"
n_school_going_preschool int 150
classroom_size_preschool int 15
n_teachers_preschool int 5
height_room_preschool float 3.1
width_room_preschool float 7.0
length_room_preschool float 7.0
n_school_going_primary int 200
classroom_size_primary int 35
n_teachers_primary int 6
height_room_primary float 3.1
width_room_primary float 10.0
length_room_primary float 10.0
n_school_going_highschool int 200
classroom_size_highschool int 35
n_teachers_highschool int 7
height_room_highschool float 3.1
width_room_highschool float 10.0
length_room_highschool float 10.0
school_type bool False
masks_type str "N95" "cloth", "surgical" o "N95"
ventilation_level str "alto" "bajo", "medio" o "alto"
class_duration int 6

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages