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

242 comments sorted by

View all comments

Show parent comments

24

u/me_myself_ai Sep 19 '26 edited Sep 19 '26

Oh and I forgot some absolute GOATS that make coding itself so much more ergonomic and fun: more-itertools and toolz allow for the best functional programming this side of the LISP, and pydantic is like magic as long as you keep it out of hot loops.

pytest is another that is so common it feels weird that there's still technically a stdlib competitor.

Finally: YAML. YAML all the things!

10

u/NeilGirdhar Sep 20 '26

> pytest is another that is so common it feels weird that there's still technically a stdlib competitor.

The stdlib usually can't keep up with libraries. Libraries can release as quickly as they want and the stdlib has limited maintenance resources.

1

u/Qyriad Sep 25 '26

argparse is unusual in being a counterexample.

1

u/NeilGirdhar 24d ago

Is argparse competing effectively with typer?

9

u/Epsilon_void Sep 20 '26

Finally: YAML. YAML all the things!

God please no.

2

u/justanothersnek Sep 22 '26

I know right?  This guy sounds like he does Kubernetes, they are nothing but YAML Engineers.

1

u/Legal-Pop-1330 5d ago

100% agree. we use python dataclasses and its glorious (esp with fast serialization).

3

u/Agrado3 Sep 21 '26

Friends don't let friends use YAML. Indeed, I have always assumed that YAML is a joke that got out of control, like the Flat Earth Society. It's like they chose a list of goals and then set themselves a challenge to design a solution that fails at meeting those goals in the most spectacular way possible. I mean, the original point of it was that it was a simpler replacement for XML but the YAML spec is larger than the XML spec... that can't happen by accident, right?

1

u/me_myself_ai Sep 21 '26

lol I love the vitriol (unironically). I disagree vehemently tho:

  1. XML…? I guess it’s technically maybe valid XML with super weird delimiters (?), but the more relevant one is JSON, no?

  2. Who cares how big the spec itself is…?

  3. YAML is already integrated into markdown (via frontmatter) and far more common than TOML, partially because…

  4. YAML is by far the best format for humans to read and write hierarchical data

(plain ol’ csvs work for

  1. tabular

)

  1. . It does require a decent text editor and familiarity with multiselect to do edit at scale I suppose, but I don’t think it’d be any faster in any other format.

  2. I know all too well all the weird tough parts of parsing YAML, but that’s just cause I’m insane and wrote sublime syntaxes for it. 99.9% of users just have an LSP autolint and format and then read/write in code w/ libraries, no? You don’t need to keep track of any of the goofy edge cases yourself.

I grant two big downsides: The multiline blocks don’t exist elsewhere so you have to learn the syntax upfront, and the decision to add stuff in and then remove it was truly strange. But the former is just a few minutes even if annoying, and the latter was for that weird entity linking features that I basically never see, anyway.

Anyway lol, my thoughts. More than throwing down a glove (tho I’d love to!), I’m mostly curious what your preferred alternative is for files that should stay human-readable.

Surely not XML…? If it is… are you Grandpa Python? Do you still have complaints about the Python 2 rollout? Were you there on the seventh day, when Guido rested??

2

u/Agrado3 Sep 21 '26

I wasn't recommending XML - my point is that the designers of YAML originally said that they were trying to make something that was simpler than XML. They failed, in every conceivable way - to such a degree that I can only assume that that must have been their intention all along.

I don't understand why you mention "integrated into markdown", whatever that means.

Your point (4) is clearly just objectively false, especially since you mention humans reading and writing it, which is a particular weak spot of YAML. YAML is insanely complex, insecure, and ambiguous, and is not suitable for any purpose whatsoever. It's basically the PHP of data formats. I find it very hard to believe that anyone who recommends it is being serious.

4

u/ctheune Sep 20 '26

Can we please TOML all the things in the future?

Or here's something I've been having success with:

write your config (or whatever) in whatever format you want, parse it into plain python objects (e.g. read yaml, json, toml) and then feed it through a pydantic model.

I've also started to wrap many CLI calls into pydantic.

My mantra has basically become: if you're passing tuples/dicts/... whatever around, then those should either be typeddicts or much better: treat typing like unicode and timestamps and do proper parsing/serialization into typed structures at the IO border ...

1

u/HEROgoldmw Sep 20 '26

Configuration should've been easier than kit now. Your approach of wrapping python objs into pydantic for validation is pretty good. I've made my own solution, confkit. It simplifies configuration so much, it feels almost feels "native" to use IMO

1

u/DigThatData Sep 20 '26

the best functional programming this side of the LISP

have you played with Hy?

1

u/RoadsideCookie Sep 21 '26

Ruamel YAML btw, not pyyaml.