Sobes.tech
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 print or returning a simple message)

Available commands:

  1. List users
  2. Create a new user
  3. Delete a user
  4. Exit

Example request body to /menu:

{
  "command_id": 2
}
Develop a FastAPI service with a command menu - Live… - sobes.tech