Junior — Senior
Develop a FastAPI service with a command menu
livecode
Task condition
Implement an application using FastAPI. Add a route /menu, which:
- Returns a list of available commands
- Accepts the number of the selected command via a request (for example, POST with JSON body)
- Performs the corresponding action depending on the selected command (stubs can be implemented using
printor returning a simple message)
Available commands:
- List users
- Create a new user
- Delete a user
- Exit
Example request body to /menu:
{
"command_id": 2
}