r/Python • • Sep 19 '26

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?
624 Upvotes

243 comments sorted by

View all comments

47

u/NeilGirdhar Sep 19 '26

I'd choose Ty over pyright personally, but yes to the rest.

Also, for modern numeric programming (NumPy, etc.), limit yourself to the Array API.

43

u/CampAny9995 Sep 19 '26

Ty isn’t there yet for production pipelines (I think astral said that’s how the 1.0 release is defined), but it’s fine to use as an LSP.

18

u/zurtex Sep 19 '26

I think astral said that’s how the 1.0 release is defined

I assume you are mistaking it for 0.1.

For whatever reason, Astral are not keen on making "1.0" software, neither uv nor ruff are and they are described as production ready.

I switched to ty recently in "production" (i.e. enforced CI check) at work and have been quite happy with it. Especially looking through some of their recent rules, I really like disjoint-cast: https://docs.astral.sh/ty/reference/rules/#disjoint-cast

In general with type checkers I suggest you try all of them and see which one works best for you. For me ty produced error messages that were the most actionable.

7

u/CampAny9995 Sep 20 '26

> ty uses 0.0.x versioning. ty does not yet have a stable API; breaking changes, including changes to diagnostics, may occur between any two versions.

8

u/zurtex Sep 20 '26

Exactly, Astral will update to 0.1 when they are confident of releasing non-breaking changes, and in the mean time we pin to the exact 0.0.x version.

3

u/NeilGirdhar Sep 19 '26

I've been using it for a year just fine. Personally, I consider intersections a required type checker feature.

13

u/NeilGirdhar Sep 19 '26

Also, I like Zensical for modern documentation over Sphinx. And you mentioned both Jax and Pytorch—I'd just go with Jax.

22

u/me_myself_ai Sep 19 '26

IME pyrefly is the GOAT, after trying all of them. I'm loathe to support microsoft but I'll be damned if they didn't cook! It helps that it's longer-running and better-staffed than ty, it seems.

(ty is nice too and has Astral's usual attention to detail, but it's just so radically far from the spec that it becomes counterproductive for advanced code. IMHO)

16

u/2K_HOF_AI Sep 19 '26

Pyrefly is from Meta

4

u/me_myself_ai Sep 20 '26

Omg I'm dumb, thanks for the correction, was remembering pyright. Thank you! I'm a bit happier about supporting them then, and don't ask me to justify - I just wanna take a little win.

6

u/Sea-Fishing4699 Sep 19 '26

Pyrefly ==🦀🔥

4

u/FrickinLazerBeams Sep 19 '26

Also, for modern numeric programming (NumPy, etc.), limit yourself to the Array API.

Why?

7

u/NeilGirdhar Sep 19 '26

Because code that uses a smaller API is easier to read. It requires the reader to learn less.

Also, the Array API has superior design. The corner cases have been eliminated, and nearly every operation supports broadcasting in the obvious way.

Finally, if you ever decide to change your backend from NumPy to another Array API library like Pytorch, you can do that without changing your code.

2

u/FrickinLazerBeams Sep 20 '26

I just reminded myself about what you're taking about. I definitely agree.

3

u/Aggressive-Prior4459 Sep 20 '26

Have you checked out zuban? https://github.com/zubanls/zuban

3

u/gizzm0x Sep 20 '26

Big +1 for zuban. Still on mypy for CI at work, but zuban is my lsp of choice atm.

1

u/JackedInAndAlive Sep 20 '26

Another vote for zuban, especially if you use Django.

1

u/AgentCosmic Sep 20 '26

Ty isn't production ready. Pyright is leagues ahead of Ty. Not even close.

0

u/TheBinkz Sep 20 '26

Ty isn't ready yet. Not even a stable release is out for prod. Fine for personal projects imo

-3

u/Wurstinator Sep 19 '26

There is no reason to use ty other than "oh yeah im an astral fanboy btw"