[Python] What is correct mapped annotation for `JSON` in SQLAlchemy 2.x version?

Discussão em 'Python' iniciado por Stack, Março 16, 2025.

  1. Stack

    Stack Membro Participativo

    The new version of SQLAlchemy introduced the ability to use type annotations using Mapped[Type] (link).

    My question is, what should we use as an annotation for sqlalchemy.types.JSON? Is just dict will be ok?

    I'm just using dict, but I want to understand the correct option for this.

    Continue reading...

Compartilhe esta Página