Skip to content

Convert all Spotify response objects to Pydantic models #975

@MrinalJain17

Description

@MrinalJain17

Is your feature request related to a problem? Please describe.

  • Working with raw JSON response objects/dictionaries is tedious.
  • No concrete information about the type and structure of any particular response. One has to refer to the official Spotify API documentation.

Describe the solution you'd like

All the responses can be represented as Pydantic models. https://docs.pydantic.dev/latest/

  • Enables better developer experience (integrates well with IDEs)
  • Strong type checking (and validation!)

Describe alternatives you've considered

I've used Pydantic before, so biased towards the tool. There might be other options, but the core feature request stays the same -- well-structured and validated python objects in favour of raw JSON responses.

Additional context

This can be thought of as a more rigorous version of #695.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions