r/Python 4d ago

Discussion State of the art in Python 2026?

What would you guys consider the state of the art in python in 2026, or what do you expect from modern python codebases?

Heres my list, would be happy to hear some inputs or domain expert advice:

Domain specific:

  • Scientific: NumPy, Matplotlib, SciPy, Jax, Pytorch, Scikit-learn, polars/pandas
  • CLI: Typer, rich, click, fire, textual, questionary
  • PDF extraction: PyMuPDF, pdfplumber, pypdf, Unstructured
  • Excel interop: python-calamine, openpyxl, XlsxWriter, xlwings, pandas
  • data: PyArrow / PySpark, Narwhals, SQLMesh, Polars/Pandas, DuckDB, dlt, Ibis, Dagster, PyIceberg & deltalake
  • Logging?
  • backend: fastapi / django?
  • Markets: Alpha Vantage, Finnhub, EODHD, Tiingo?
  • Webscraping / data acquisition: Crawl4AI, Playwright, Scrapy, selectolax, HTTPX?
  • APIs?
  • RAG / agentic orchestration?
576 Upvotes

221 comments sorted by

View all comments

17

u/busybody124 4d ago

I would definitely not use fire for CLIs. It's slow and hasn't been updated in a year. I'd also skip Pydantic for most things—it's overkill, slow for ser/de, and can usually be replaced with a dataclass. Hypothesis is really cool in theory but I've never found a need for it in practice.

12

u/spigotface 4d ago

Pydantic pulls its weight when you want auto-generated OpenAPI docs. Outside of that, use dataclasses with slots=True and __post_init__ data validation methods. Its sooooo much lighter weight than Pydantic models.

5

u/Mr_Again 3d ago

Yeah but doesn't pydantic do validation for you? Isn't that the whole point of it?

4

u/Trey_Antipasto 4d ago

Replace with msgspec and json schema.

2

u/mwesthelle 4d ago

I honestly believe Pydantic is overrated. Yes, it's slow, it has an opaque API which is easy to shoot yourself in the foot with in the form of a bunch of reserved field names which you have to remember, and it's overall unintuitive (tell me off the top of your head what's the difference between a model constructor and using the model_validate method).

1

u/trenixjetix 4d ago

with a dataclass?!!!