trabajo-profesional-fiuba / assignment-service

Backend Service in charge of assignments, users, students and more.
https://tpp-g4-fiuba.azurewebsites.net/api/docs
MIT License
1 stars 0 forks source link

[back] - Endpoint para subir csv de alumnos #94

Closed alejovillores closed 3 months ago

alejovillores commented 4 months ago

Necesitamos la posibilidad de subir un csv de los alumnos del cuatrimestre via endpoint.

Para esto lo que debemos validar es que el csv tenga 4 columnas. NOMBRE, APELLIDO, PADRON, MAIL. A partir de estos datos se debe crear un usuario para cada alumno la password es su padron hasheado (usar en lo posible un sha1-255)

alejovillores commented 4 months ago

Notas generales

Libreria de hash https://docs.python.org/3/library/hashlib.html# https://www.geeksforgeeks.org/sha-in-python/

Links utiles https://www.[iana.org/assignments/media-types/text/csv](https://www.iana.org/assignments/media-types/text/csv) https://fastapi.tiangolo.com/tutorial/testing/#testing-file https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types https://www.starlette.io/requests/#request-files https://fastapi.tiangolo.com/tutorial/request-files/ https://fastapi.tiangolo.com/reference/uploadfile/?h=uploadfile#fastapi.UploadFile.read https://fastapi.tiangolo.com/tutorial/request-files/#multiple-file-uploads

alejovillores commented 4 months ago

Corregir la conexion de la base de datos y el get_dependencies Crear un before all que cree las instancias https://docs.pytest.org/en/6.2.x/reference.html#hooks https://stackoverflow.com/questions/34466027/what-is-conftest-py-for-in-pytest https://blog.miguelgrinberg.com/post/what-s-new-in-sqlalchemy-2-0