RobertCraigie / prisma-client-py

Prisma Client Python is an auto-generated and fully type-safe database client designed for ease of use
https://prisma-client-py.readthedocs.io
Apache License 2.0
1.9k stars 81 forks source link

Support skipping pydantic validation #260

Open RobertCraigie opened 2 years ago

RobertCraigie commented 2 years ago

Problem

One reason for slower performance is that we validate the data that the prisma engine gives us using pydantic models. At least providing an option to skip validation would give a decent performance boost.

However, there are a couple concerns with this:

Suggested solution

Add a config option to disable pydantic validation and if enabled, call BaseModel.construct() instead.

monarchwadia commented 11 months ago

I would also like this for testing/mocking purposes inside unit tests