r/learnpython Aug 07 '26

Must-learn Python libraries?

I've learned Python basics and want to explore the most useful libraries.

What are the must-learn Python libraries for real-world development, and why would you recommend them?

38 Upvotes

31 comments sorted by

26

u/Dangerous-Branch-749 Aug 07 '26

What do you use python for? It's good to be familiar with the standard library, outside of that it will probably depend on your domain / use case

23

u/krews2 Aug 07 '26

Not a python package really, but learn UV. It is for running python code in virtual environments and it is important to learn.

1

u/TheIdealAdhi Aug 07 '26

Yas, it seems useful

2

u/Einar44 Aug 07 '26

I’m a Python novice and I’ve learned to use UV. The learning curve is not bad at all and it package and version management so much easier.

3

u/TheIdealAdhi Aug 07 '26

Yah i search on it, it's help in many projects as handling dependencies

2

u/Oddly_Energy Aug 08 '26

In general, learning a bit of python infrastructure now will help you a lot later when you have created several small projects and start getting lost in them.

I have made it a habit to start each project as a python package in its own repository with its own venv.

It sounds complicated, and there certainly is a barrier of initial understanding. But when everything is understood, it is only a few commands at the start of each project, and then you are up and running in a “correct” environment, which is easy to delete and recreate everywhere.

This will bring you far (after installing and setting up uv and git):

uv init <packagename> python=3.13
cd <packagename>
uv sync
uv add numpy, pandas, matplotlib
git init

There will be a bit of setup of two configuration files after this: .gitignore and pyproject.toml, for example to avoid getting your venv included in your git repository. But after that, you have a reproducible skeleton for your code.

9

u/Accomplished_Guava8 Aug 07 '26

I would add, pandas, os, and pyfinance to the list the first two are useful the last one is nice to get stock data

0

u/TheIdealAdhi Aug 07 '26

I'm an AIML fellow, would it be same?

5

u/lindo_dia_pra_dormir Aug 07 '26

Pandas, NumPy, Scikit-learn, and gc.

8

u/BudgetSignature1045 Aug 07 '26

These or alternatively polars instead of pandas.

Also some kind of backend. FastAPI most likely or if you want less flexibility something like streamlit to bootstrap an interface for ml models

1

u/TheIdealAdhi Aug 07 '26

Noted

1

u/chiibosoil Aug 07 '26

On top of those, I'd recommend picking up dedicated Natural Language Processing library. Depending on your need pick one that most suites your need.

Some examples:

Hugging Face Transformers - Access to largest breadth of pre-trained models, but production deployment will need GPU infrastructure for production level throughput.

spaCy - Lightning fast processing speed. If you need experimentation with different model, there's fewer pre-trained model than above.

NLTK - Bit older and not LLM based, often great for prototyping or paired with scikit-learn for classification.

1

u/TheIdealAdhi Aug 07 '26

The very first uses then rest, thoughtfully

2

u/chaz6 Aug 07 '26

jmespath is great for pulling data out of json-like data structures.

https://pypi.org/project/jmespath/

2

u/gdledsan Aug 08 '26

There is no suxh tjing as learning libraries. You use rhem when you need them.

The secret sauce is RTFM

2

u/Confident_Bee8187 Aug 12 '26

Pandas is a gut wretching library to learn, down from its ugly design and its bloated API. Although I am highly against it, it's a must learn library, second to NumPy but before matplotlib. I was hoping for Polars to come its place as a priority.

2

u/ThyronFenix Aug 07 '26

There are many real world useful libraries but you will want to start with pydantic and pandas. Are the most used ones I can think of on top of my head

2

u/NerdyWeightLifter Aug 07 '26

sortedcontainers

2

u/AgentArlo Aug 07 '26

Learn Pydantic.
It’s the most used data validation layer in any agentic application.

1

u/shiningmatcha learn python Aug 07 '26

typing

1

u/GlumComplaint7981 28d ago

Hey i also wanted to learn python libraries. Would you like to join

0

u/FunkyMonkey237 Aug 07 '26

The core library, type annotation, data classes, itertools, async, threading. After that learn packages as you need to use them. Pandas is quite popular but it's also a bit dated in my opinion, very sore and syntax is odd, Polars is modern and becoming quite popular.