Skip to content

Instantly share code, notes, and snippets.

@iuridiniz
Created July 7, 2025 11:10
Show Gist options
  • Save iuridiniz/4b3fadc250d04168bc722a266e021ede to your computer and use it in GitHub Desktop.
Save iuridiniz/4b3fadc250d04168bc722a266e021ede to your computer and use it in GitHub Desktop.
8 Python Libraries So Good, I Stopped Writing My Own Scripts

Source

1. Rich πŸ’…

It transforms plain command-line outputs into visually appealing and readable formats. You can easily add styled tables, markdown, syntax-highlighted tracebacks, and progress bars to make terminal applications more user-friendly.


2. Typer ⌨️

It dramatically simplifies the creation of Command Line Interfaces (CLIs). By using Python's type hints, it automatically generates the necessary command-line arguments and help text, allowing for the rapid development of polished and easy-to-use tools.


3. Pendulum πŸ•°οΈ

It offers a more intuitive and robust way to handle dates and times compared to Python's built-in datetime module. Pendulum excels at managing time zones, calculating durations, and parsing human-readable time strings, which prevents common bugs in time-related code.


4. Pydantic βœ…

It provides powerful and easy-to-use data validation. By simply defining a data structure with type hints, Pydantic automatically parses, validates, and documents your data, which is especially useful for working with API responses and configuration files.


5. Faker 🎭

It allows you to generate a wide variety of realistic-looking fake data. This is perfect for populating development databases, creating mock API responses, or testing applications without using sensitive real-world information.


6. Tqdm πŸ“Š

It adds smart, clean, and responsive progress bars to any iterable in your code with minimal effort. This is invaluable for monitoring the progress of long-running loops or tasks, providing visual feedback to prevent the appearance of a frozen script.


7. Requests-HTML πŸ•ΈοΈ

It simplifies web scraping by combining the user-friendly HTTP requests of the requests library with powerful parsing capabilities. A key feature is its ability to execute JavaScript, allowing you to scrape modern, dynamic websites.


8. Loguru πŸ“œ

It makes logging simple and powerful. Loguru offers a much more straightforward approach than Python's default logging module, allowing you to set up file rotation, different logging levels, and colorful console output with just a single line of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment