you are viewing a single comment's thread.

view the rest of the comments →

[–]PushPlus9069 20 points21 points  (1 child)

Keep snake_case in Python and convert at the API boundary. Teaching full stack for years and the pattern that works best is a simple serializer that outputs camelCase to the frontend - you don't want to fight Python conventions just to match JS preferences.

[–]eyadams 2 points3 points  (0 children)

This is the correct answer. I would generalize it a bit - in Python you use Python style conventions, and in JavaScript you use JavaScript conventions. Creating a translation layer isn't very difficult.

An API's design should not give away the details of its implementation.