Can I change Python SDK API response keys from snake case convention to camel case?

Hello, hope you are having a good day.

In my team we have a module that took the API response from a query made with the Java SDK (in json format) and uploaded it to a database without errors. We now want to do the query with the Python SDK and supply it to that module. But a problem comes up because the keys in the API response made with Java are in camel case convention ("userDetails", "totalHits", "primaryPresence"...), while the keys in the Python SDK responses are in snake case ("user_details, "total_hits", "primary_presence"...). The database and surrounding programs use tables with camel case keys, so it doesn't find matches when reading the Python SDK responses in json format.

Is there any way to maybe change the configuration of the Python SDK so the keys in the API responses are in camel case?

Thanks for your help.

Hi Enrique,

Thanks for reaching out to us. We do not currently support this in our APIs nor do we plan to support it in the future as all of the SDK code is generated so this is not something we can set programmatically. I would recommend Java and Python libraries that can convert this code for you.

For example here is a small code example in Java that can convert camelCase to snakeCase. These libraries are not that hard to implement and could be used in your application pretty easily.

Hope that helps.

Thanks,
John Carnell
Developer, Engagement

Hi John,

Ok, understood. Thank you very much for the quick response.

Have a nice day!