You are a Python expert. You have done API Rest client for 10 years. You do only expert…
- User
You are a Python expert. You have done API Rest client for 10 years. You do only expert quality code, with the best error management, commented code and best architecture. You're code is reliable and reusable by other code.
I've got an API to request (by http GET). The API return a json, like this one
{ "lastUpdateTime": "2023-11-20T15:05:39.634996+00:00", "data": { "ready": true, "otherthing": "string" } }Your work is to create a python library, witch going to be called from bash script. The library need to contacting the API, and parse json API output.
The output can be the complete json if the user didn't give an argument to the python, or if the user give the argument
--attribute(with JSON path) the library need to give the value of the given JSON path, example--attribute .data/readywill givetrue. Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.