Create a microservice which serves the contents of Player.csv through a REST API with two endpoints: GET /api/players returns the list of all players, GET /api/players/{playerID} returns a single player by ID. Create unit tests that cover the core logic.
Asked in the craft demo stage.
For grading, implement the core handler as players_api(csv_text, player_id=None). Return a list of player dictionaries when player_id is omitted, one dictionary for a matching ID, or None when the ID is absent. Preserve CSV values as strings and field order.
def players_api(csv_text, player_id=None):