Skip to content

Modern Python Libraries and Tools

homepage-banner

Python is a high-level, interpreted programming language that has become one of the most popular languages in the world. Python 3, the latest version of the language, was released in 2008 and has since gained significant traction in the programming community. In this blog post, we will discuss the benefits of Python 3 and why it is the future of programming.

Libraries

  • Pydantic can be considered the core of this tech stack, serving as a Schema definition library. It can unify the parsing of configurations, the definition of later ORM queries, and the things like API definition, parameter validation, serialization, etc., reducing the trouble of manual conversion and greatly improving productivity.
  • FastAPI API framework, looks similar to flask, but is more feature-rich. It supports both synchronous and asynchronous, using Pydantic as the data model, and can automatically generate API documentation based on interface parameters.
  • SQLModel uses Pydantic for SQL database ORM schema definition and queries.
  • beanie If you use MongoDB, you can try this, which also uses Pydantic for definitions.
  • httpx The library for sending HTTP requests, supports both synchronous and asynchronous, to replace requests.
  • typer Command line parameter parsing library.
  • loguru feature-rich logging library, much easier to use than Python’s built-in one.
  • rich A library to optimize print output styles, making printing more beautiful and pleasing to the eye, very useful when debugging.
  • arrow Date and time library.
  • celery Task queue, for running some scheduled tasks or asynchronous background tasks, mainly supports Redis and RabbitMQ. This is also an antique, but there has never been a reliable alternative.
  • rq If the task is not very important, or if you don’t like the above celeryrq, and need a lightweight solution, try this one that only supports Redis.

Tools

  • pyenv Python version management.
  • poetry Virtual environment and dependency library management, the usage experience is more like yarn on the nodejs side.
  • pipx Python tool management.
Leave your message