Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Take a look at the documentation: https://wyfo.github.io/apischema/ (I've put so much of my sleeping hours in it 😅)
You've surely heard about Pydantic, which has contributed a lot to popularize the use Python typing for JSON serialization. I was so enthusiastic when I discovered for the first time, but I also got frustrated pretty quickly. So I've started to work on my own prototype, and things got more and more serious over time (more than 11k lines of code, as much as Pydantic, 1k download/day).
This month, I've released version 0.17, and it's now blazing fast; there is in fact no more comparison with Pydantic, which more than 5x slower (up to 30x in serialization). It's also faster than alternatives like mashumaro or cattrs. (See the quick benchmark result in documentation, and the code)
This month, I've released version 0.17, and it's now blazing fast; there is in fact no more comparison with Pydantic, which more than 5x slower (up to 30x in serialization). It's also faster than alternatives like mashumaro or cattrs. (See the quick benchmark result in documentation, and the code)
Personally, I rely on static typing, and it rarely deceived me. I'm very impatient concerning https://github.com/python/mypy/issues/9773, which will allow finally to fully type apischema functions. Trends are evolving, TypeScript adoption is a good example.
I used this for parsing a JSON IDL and it worked really well https://github.com/kevinheavey/anchorpy/blob/main/src/anchorpy/idl.py
By the way, while I was looking at the GitHub projects that are using apischema, I've discover https://github.com/mtag-dev/squall, a fork of FastAPI but using apischema among other differences.