← Questions
Concurrent Python CLI that queries a local service
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Write a Python command-line tool that looks things up in a service running locally over HTTP, keyed by serial number.
- Take a list of serial numbers and call the service for each one in turn, printing the results.
- Make it robust: requests that time out, answers with a 500 status and bodies that are not valid JSON must not crash the tool; report them per serial number.
- Send the requests concurrently with a thread pool and print a summary of what succeeded and what failed.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding