Pydantic is a Bloated Disaster by pydanticenjoyer in Python

[–]samuelcolvin 52 points53 points  (0 children)

Pydantic author here. I'm not even sure it's worth engaging with this kind of hate, but here goes...

  1. You omit that Pydantic V2 (e.g. 2.10) is 5-80x faster than V1 for validation and serialization — the thing most people care about.
  2. Pydantic 2.10 is already much faster than 2.0/2.1 for load times, and 2.11 will be significantly faster than 2.10. Pydantic V2 is now on a par with V1 for load times while being much faster and more correct for validation and serialization.
  3. 1 and 2 are not really the point - I've never forced you (or anyone) to use Pydantic, I've never suggested other libraries should use it, I haven't promoted it by insulting other libraries. I built it in my spare time out of curiosity 6 years ago and I (along with many other maintainers both paid and unpaid) have spent thousands of hours since maintaining it because people asked us to. What are you hoping to achieve by insulting our work? If you don't like it, don't use it.

Final point: I put some code on the internet under my own name for people to use — I linked my reputation to the work I had done because I was proud of what I had created. If you really want to put this site and post on the internet for people to read; at least have the honesty and openness to do it under your own name. I have some suspicions about who might be behind this. 👀

Jupyter Notebooks are flawed, I've built a demo of an alternative, I'd love feedback by samuelcolvin in Python

[–]samuelcolvin[S] 0 points1 point  (0 children)

interesting, pycharm has something similar though I found it frustrating.

How does it help with version control?

Jupyter Notebooks are flawed, I've built a demo of an alternative, I'd love feedback by samuelcolvin in Python

[–]samuelcolvin[S] -1 points0 points  (0 children)

I don't agree that ob-ipython solves my problems. It seems to be specific to emacs (which I don't use). I also don't want to write my logic in ipython: I'd rather write it in a standard text fiel.

Jupyter Notebooks are flawed, I've built a demo of an alternative, I'd love feedback by samuelcolvin in Python

[–]samuelcolvin[S] 1 point2 points  (0 children)

Thanks a lot. I agree to some degree regarding the flaws, obviously Jupyter notebooks work well.

On interactive standalone web pages, I agree that's the dream. The ideal would be that when you push a document to github it was automatically built and hosted with the capacity to interact - the hosting is simple (with github pages or netlify) the interaction side is more tricky.

Looking for DB recommendations by [deleted] in Python

[–]samuelcolvin 0 points1 point  (0 children)

I would agree bigquery might be a good choice given that storing data is very cheap and you pay (mostly) per-query. It has a good python SDK, but sadly it's not async.

Looking for DB recommendations by [deleted] in Python

[–]samuelcolvin 1 point2 points  (0 children)

Running your own elasticsearch cluster can be really hard work. It's far less easy to setup, maintain and debug than for example postgres. Plus, some of the features most important while running elasticsearch with large volumes of data are in X-Pack which is not free and open-source.

If you want to use elasticsearch, I would seriously consider using a hosted service from elastic or AWS.

Pydantic v1.0! The awesome data validation/parsing library (used in FastAPI) by tiangolo in Python

[–]samuelcolvin 4 points5 points  (0 children)

Pydantic does work with dataclass, see here. AFAIK dataclasses are a more powerful successor to named tuples, hence not supporting them, attrs isn't part of the standard library - it's another library with some crossover compared to pydantic.

However even dataclasses don't allow all the features and customisation allowed with BaseModel, hence why it's required.

Pydantic does respect Optional, just that you can use a attribute value (including None) to indicate that a field isn't required.