Closed rofinn closed 1 day ago
We could also return a multi-key dict
rather than make a hard decision, so either lookup works.
Another option that mostly fits with the design decisions is to introduce a shared Response
type. Rather than having a custom response class for each endpoint we could just define a wrapper around the dict.
Responsibilities:
response.private_ip
)response['privateIP']
)response.data
)
We currently use
snakecase
for function names and kwargs, but we intentionally don't process the returned jsondict
. My initial thought was that this is technically external / independent of the language and therefore doesn't need to follow the same conventions. That being said, we are already parsing the json into a pythondict
, so I could be convinced otherwise.TODO: Take a look at what boto and a couple other libraries do.