20 Actually Useful Python Libraries (2026)
Skip requests, skip numpy, skip pandas. You already know those. The libraries here solve real problems that the standard library or the usual suspects handle poorly — faster JSON, actual datetime sanity, terminal apps that don’t look terrible, and a linter that’s an order of magnitude faster than what you’re using.
Terminal & CLI
rich — Beautiful terminal output with colored text, tables, progress bars, markdown rendering, and syntax highlighting. A single console.print() call replaces dozens of lines of formatting logic.
from rich.console import Console
c = Console()
c.print("[bold red]Error:[/bold red] Something went wrong", style="yellow")textual — TUI framework for building terminal applications with CSS-based layouts, widgets, and async event loops. Turns terminal tools into interactive apps without Electron.
typer — Build CLI apps from Python type annotations. Generates --help docs, argument validation, and autocomplete automatically.
import typer
def main(name: str, count: int = 1):
for _ in range(count):
print(f"Hello {name}")
typer.run(main)click — The battle-tested CLI framework. More verbose than Typer but more flexible for complex CLI trees with subcommands.
pipx — Installs and runs Python CLI tools in isolated environments. pipx install black keeps Black’s dependencies from interfering with your project packages.
Data & Serialization
polars — DataFrame library written in Rust with a pandas-like API. 10-100x faster than pandas on large datasets, lazy evaluation, and no index headaches.
import polars as pl
df = pl.read_csv("large.csv")
df.filter(pl.col("value") > 100).group_by("category").agg(pl.col("value").mean())orjson — JSON serializer that’s 3x faster than the stdlib json. Handles numpy arrays, datetimes, and UUIDs natively.
import orjson
data = orjson.dumps({"key": "value"})pydantic — Data validation via Python type hints. Defines schemas with type coercion, custom validators, and serialization. The backbone of FastAPI and the modern Python data layer.
from pydantic import BaseModel
class User(BaseModel):
id: int
name: str
email: str
user = User(id="42", name="Alice", email="alice@example.com")pydantic-settings — Settings management using Pydantic models. Loads from env vars, .env files, secrets, and more with full validation.
Web & Networking
httpx — Modern HTTP client with async support, HTTP/2, connection pooling, and a requests-compatible API. Drop-in replacement for requests when you need async.
import httpx
response = httpx.get("https://api.github.com", follow_redirects=True)fastapi — Modern async web framework with automatic OpenAPI docs, dependency injection, and type-based validation. The fastest-growing Python web framework for good reason.
Date & Time
pendulum — Drop-in replacement for datetime with proper timezone support, humanized diffs (“2 hours ago”), and intuitive API. No more pytz timezone hell.
import pendulum
now = pendulum.now("UTC")
later = now.add(days=5)
print(later.diff_for_humans()) # "in 5 days"Development & Tooling
ruff — Python linter written in Rust. Replaces flake8, isort, pycodestyle, and autoformat all at once at 100x the speed. Integrates as a VS Code extension too.
ruff check . --fixicecream — Debug printing with context. ic() shows the expression, file, line number, and value. Replaces print() for debugging entirely.
from icecream import ic
x = 42
ic(x) # → ic|x: 42loguru — Logging that doesn’t require 10 lines of setup. Single import, file rotation, colored output, and exception catching.
from loguru import logger
logger.add("file.log", rotation="1 week")
logger.info("Started processing")attrs — Classes without boilerplate. Define data classes with less code than dataclasses, plus validators, converters, and slots.
System & File
watchdog — Monitors filesystem events with a clean observer API. React to file creation, modification, or deletion with custom handlers.
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandlerpython-dotenv — Reads .env files into environment variables. Essential for local development without hardcoded secrets.
Package Management
pdm — Modern Python package manager with PEP 517/518 support, lockfiles, and monorepo management. Faster than pipenv and poetry for large projects.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro