Now I can see the full picture. The vultr-python library's high-level methods already extract the nested key from the response. Here's every place the Vultr provider gets this wrong:
| Line | Code | Issue |
|---|---|---|
| 57 | result.get("instance", result) |
create_instance returns a dict (the instance directly) |
| 65 | result.get("instance", result) |
get_instance returns a dict (the instance directly) |
| 81 | result.get("instances", []) |
list_instances returns a list directly |
| 100 | result.get("ssh_keys", []) |
list_keys returns a list directly |
| 175 | result.get("ssh_keys", []) |
list_keys returns a list directly |
Lines 111-121, 134-150, 152-158 use raw self._client.get()/self._client.post() which return the raw JSON dict, so those are fine.
Let me fix all the issues: