Flask to FastAPI Endpoint Mapping

Job ID: 38522894

Budget: €8 – €30 EUR

I'm looking for a professional with experience FastAPI. Your task will be to map existing Flask routing and URL paths to FastAPI.

Key Skills:
- Knowledge of FastAPI
- Proficient in Python
- Experience with API development and mapping

Please note that this project does not involve migrating from Flask to FastAPI, but rather mapping the existing Flask endpoints to FastAPI in a very basic Flask application. Just to provide a hint on how to do it.


Objective:
Develop a Python script that dynamically maps endpoints from a Flask application to a FastAPI application, allowing for identical functionality across both frameworks.

Requirements:
1. Endpoint Mapping:
- Dynamically extract Flask application endpoints and map them to equivalent FastAPI endpoints. As demonstrated in the example, the Flask application provides the endpoint:
```python
@app.route('/system/routes', methods=['GET'])
```
This endpoint lists all routes in the Flask application. You could use this endpoint for mapping.
- Ensure that the functionality provided by the Flask endpoints is preserved in the FastAPI implementation.

2. Example Applications:
Included are scripts that demonstrate the Flask application and its testing. The provided code should be compatible with this application. Modifications to the Flask application code are not permitted.

3. Testing:
- Ensure the FastAPI endpoints are tested to verify they mirror the Flask functionality.

4. Concurrency:
- Both the Flask and FastAPI applications should be capable of running simultaneously on different ports.

6. Remark (Requirements):
- The final script should not include hardcoded values or dependencies that aren't necessary for the endpoint functionality.
- The resulting code should be compatible with this application.
- Modifications to the Flask application code are not permitted.


Deliverables:
- A Python script for mapping Flask endpoints to FastAPI.
- A testing script for the FastAPI endpoints (similar to the provided Flask script).
Related categories: Python FastAPI