Skip to content

oopt-gnpy-api v1.0

Latest

Choose a tag to compare

@EstherLerouzic EstherLerouzic released this 17 Sep 09:57
v1.0
8cb4026

Migration of API from Flask to FastAPI

This commit marks a significant step in refactoring the API by migrating the web server from Flask to FastAPI. Key changes include:

  • Replacing Flask with FastAPI: The application is now built with FastAPI, providing better performance and native support for OpenAPI documentation.
  • Route updates: Routes have been adapted to use FastAPI's syntax and decorators (@app.get, @app.post, etc.).
  • Error handling: Exception management has been adjusted to work with Starlette, the underlying framework of FastAPI.
  • Automatic documentation: OpenAPI documentation is now accessible via the /openapi.json endpoint, facilitating API testing and integration.
  • Dependency updates: The setup.cfg has been modified to include fastapi and uvicorn as required dependencies.

This migration enhances the API's performance, maintainability, and documentation capabilities while maintaining compatibility with existing clients.