Home Backend Development Python Tutorial Summary of the most powerful Python libraries in 2020

Summary of the most powerful Python libraries in 2020

Jan 05, 2021 am 10:06 AM
linux python rear end programmer Operation and maintenance

2020 has passed. Troy Labs, a foreign website that specializes in providing Python services, has listed the Top 10 Python libraries released in 2020.

On the list are the upgraded version of FastAPI Typer, Rich that turns the CLI into color, Dear PyGui based on the GUI framework, and PrettyErrors that streamlines error messages... There is always one you want.

Let’s take a look~

Summary of the most powerful Python libraries in 2020

Recommended (free): Python Tutorial (Video)

1. Typer

Typer has the same principle as FastAPI. They are both high-performance frameworks used to build API services in Python.

Summary of the most powerful Python libraries in 2020

It is an upgraded version of FastAPI, which not only accurately records code, but also enables easy CLI verification.

Typer is easy to learn and use, and does not require users to read complex tutorial documents to get started. Supports automatic code completion in editors (such as VSCode) to improve developers' development efficiency and reduce the number of bugs.

Secondly, Typer can also be used with the command line artifact Click, so you can take advantage of Click's advantages and plug-ins to achieve more complex functions.

Open source address:
https://github.com/tiangolo/t...

2, Rich

Who specifies CLI Does the interface have to be black and white? It can also be in color.

Rich API not only provides rich colored text and exquisite formatting in terminal output, but also provides exquisite tables, progress bars, editors, trackers, syntax highlighting, etc. As shown below.

Summary of the most powerful Python libraries in 2020

It can also be installed on the Python REPL, and all data structures can be output or annotated beautifully.

All in all, it's colorful, beautiful, and powerful.

Rich compatibility is also good, suitable for Linux, Mac and Windows and other systems. True Colors/Emojis work with the new Windows Terminal.

But please note that Rich must have Python 3.6.1 or above.

Open source address:
https://github.com/willmcguga...

3.Dear PyGui

As shown above, Although terminal applications can be made to look very beautiful. However, you may also want a real GUI.

Summary of the most powerful Python libraries in 2020

Dear PyGui is an easy-to-use, powerful Python GUI framework. But it is fundamentally different from other Python GUIs.

It uses the immediate mode paradigm and the computer's GPU to implement dynamic interfaces. The real-time mode paradigm is very popular in video games, which means that its dynamic GUI does not need to retain any data, but is drawn independently frame by frame. At the same time, it also uses GPU to build dynamic interfaces.

Summary of the most powerful Python libraries in 2020

Dear PyGui can also draw, create themes, and create 2D games. It also has some gadgets, such as built-in documentation, logging, source code viewers, etc. These gadgets can assist in App development.

Systems that support it are: Windows 10 (DirectX 11), Linux (OpenGL 3) and macOS (Metal), etc.

Open source address:
https://github.com/hoffstadt/...

4. PrettyErrors

PrettyErrors is a streamlined Python error message tool, characterized by a very simple and friendly interface.

Its most significant function is to support color output in the terminal, mark out file stack traces, find error messages, filter out redundant information, extract key parts, and perform color annotation, thereby improving developers' efficiency.

Summary of the most powerful Python libraries in 2020

And it can be directly imported into the project for use without installation, but some parameters need to be configured first. The import and configuration parameters are as follows:

Summary of the most powerful Python libraries in 2020

Open source address:
https://github.com/onelivesle...

5, Diagrams

Programmers are here When programming, sometimes you need to explain to your colleagues the complex structural relationships between the program codes you designed. However, this cannot be explained clearly in one or two sentences. You need to draw a table or make a context diagram.

Generally, programmers use GUI tools to process charts and visualize manuscripts. But there are better ways, such as using the Diagrams library.

Diagrams allows you to draw the cloud system structure directly in Python code without any design tools. Their icons come from multiple cloud service providers, including AWS, Azure, GCP, etc.

Easily create arrow symbols and structure diagrams with just a few lines of code.

Summary of the most powerful Python libraries in 2020

Since it uses Graphviz to render images, Graphviz needs to be installed first.

Open source address:
https://github.com/mingrammer...

6, Hydra and OmegaConf

is making machines When learning a project, you need to do a lot of environment configuration work. Therefore, in some complex applications, the configuration management work becomes correspondingly complicated.

Hydra makes configuration easy. It can overwrite parts from the command line or configuration files, eliminating the need to maintain similar configuration files and configuring them in a combined manner, thus speeding up the running of experiments.

Summary of the most powerful Python libraries in 2020

#Hydra has strong compatibility, has a plug-in structure, and can be well integrated with the developer's operation files. Its plug-in can also publish code to AWS or other cloud systems directly through the command line.

Hydra is also inseparable from OmegaConf. The two are inseparable. OmegaConf provides a collaborative API for Hydra's hierarchical configuration system. The two work together to support YAML, configuration files, objects, CLI parameters, etc.

Open source address:
https://github.com/facebookre...
https://github.com/omry/omega...

7. PyTorch Lightning

PyTorch Lightning is also a research result of Facebook. It is a lightweight PyTorch wrapper for high-performance AI research. Its most important feature is the ability to parse PyTorch code, allowing the separation of code research components and engineering components.

Summary of the most powerful Python libraries in 2020

Its extended model can run on any hardware (CPU, GPU, TPU) and is easily copied, removing a large number of file samples and maintaining its flexibility. Sexy and fast running speed.

Lightning can automate more than 40 parts of DL/ML research, such as GPU training, distributed GPU (cluster) training, TPU training, etc...

Because Lightning will be able to The file is automatically exported to ONNX or TorchScript, so it is suitable for AI researchers doing fast inference, BERT or self-supervised learning research teams, etc.

Open source address:
https://github.com/PyTorchLig...

8, Hummingbird

Hummingbird is a product of Microsoft Research results, it can assemble already trained ML models into tensor calculations, eliminating the need to design new models.

also allows users to use neural network frameworks such as PyTorch to accelerate traditional ML models.

Summary of the most powerful Python libraries in 2020

Its inference API is very similar to the sklearn example, and existing code can be reused, but it is implemented using code generated by Hummingbird.

Hummingbird also provides a convenient unified inference API behind the Sklearn API. This makes it possible to interchange Sklearn models with those generated by Hummingbird without changing the inference code.

It is focused on because it can support a variety of models and formats.

So far, Hummingbird supports various ML models such as PyTorch, TorchScript, ONNX and TVM.

Open source address:
https://github.com/microsoft/...

9. HiPlot

Due to the change of ML model It is getting more and more complex, and there are many hyperparameters, so HiPlot needs to be used. HiPlot is a library released by Facebook in March this year, mainly used for processing high-dimensional data.

Facebook AI uses HiPlot to analyze deep neural networks through dozens of hyperparameters and more than 100,000 experiments.

It uses parallel graphs and other image methods to help AI researchers discover the correlation and models of high-dimensional data. It is a lightweight interactive visualization tool.

Summary of the most powerful Python libraries in 2020

HiPlot has its own unique advantages compared with other visualization tools:

First of all, it is highly interactive because parallel plots are interactive , so it can meet image visualization in a variety of situations.

Secondly, it is simple and easy to use and can be used directly through IPython Notebook or through the service with the "hiplot" command.

It is also scalable. HiPlot's web service can parse CSV or JSON files by default, and can also be provided with a custom Python parser to convert experiments into HiPlot experiments.

Open source address:
https://github.com/facebookre...
Reference link:
https://ai.facebook.com/blog/...

10. Scalene

Scalene is a CPU and memory analyzer for Python scripts. It can correctly handle multi-threaded code and distinguish between Python code and native code. operation hours.

You don't need to modify the code, just run the Scalene script, and it will generate a text report showing the CPU and memory usage of each line of code. Through this text report, developers can improve the efficiency of their code.

Summary of the most powerful Python libraries in 2020

#Scalene is fast and accurate, and can also mark lines of code that consume high energy.

Open source address
https://github.com/emeryberge...

In addition to the above 10, there are also many high-performance Python libraries named, such as Norfair, Quart, Alibi-detect, Einops...etc., see the link at the bottom for details.

So, have you found any useful Python libraries this year?

If you have any, please share them in the comment area~

The above is the detailed content of Summary of the most powerful Python libraries in 2020. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Python: Games, GUIs, and More Python: Games, GUIs, and More Apr 13, 2025 am 12:14 AM

Python excels in gaming and GUI development. 1) Game development uses Pygame, providing drawing, audio and other functions, which are suitable for creating 2D games. 2) GUI development can choose Tkinter or PyQt. Tkinter is simple and easy to use, PyQt has rich functions and is suitable for professional development.

How to start apache How to start apache Apr 13, 2025 pm 01:06 PM

The steps to start Apache are as follows: Install Apache (command: sudo apt-get install apache2 or download it from the official website) Start Apache (Linux: sudo systemctl start apache2; Windows: Right-click the "Apache2.4" service and select "Start") Check whether it has been started (Linux: sudo systemctl status apache2; Windows: Check the status of the "Apache2.4" service in the service manager) Enable boot automatically (optional, Linux: sudo systemctl

How to monitor Nginx SSL performance on Debian How to monitor Nginx SSL performance on Debian Apr 12, 2025 pm 10:18 PM

This article describes how to effectively monitor the SSL performance of Nginx servers on Debian systems. We will use NginxExporter to export Nginx status data to Prometheus and then visually display it through Grafana. Step 1: Configuring Nginx First, we need to enable the stub_status module in the Nginx configuration file to obtain the status information of Nginx. Add the following snippet in your Nginx configuration file (usually located in /etc/nginx/nginx.conf or its include file): location/nginx_status{stub_status

How to use Debian Apache logs to improve website performance How to use Debian Apache logs to improve website performance Apr 12, 2025 pm 11:36 PM

This article will explain how to improve website performance by analyzing Apache logs under the Debian system. 1. Log Analysis Basics Apache log records the detailed information of all HTTP requests, including IP address, timestamp, request URL, HTTP method and response code. In Debian systems, these logs are usually located in the /var/log/apache2/access.log and /var/log/apache2/error.log directories. Understanding the log structure is the first step in effective analysis. 2. Log analysis tool You can use a variety of tools to analyze Apache logs: Command line tools: grep, awk, sed and other command line tools.

What to do if the apache80 port is occupied What to do if the apache80 port is occupied Apr 13, 2025 pm 01:24 PM

When the Apache 80 port is occupied, the solution is as follows: find out the process that occupies the port and close it. Check the firewall settings to make sure Apache is not blocked. If the above method does not work, please reconfigure Apache to use a different port. Restart the Apache service.

How to set up a recycling bin in Debian system How to set up a recycling bin in Debian system Apr 12, 2025 pm 10:51 PM

This article introduces two methods of configuring a recycling bin in a Debian system: a graphical interface and a command line. Method 1: Use the Nautilus graphical interface to open the file manager: Find and start the Nautilus file manager (usually called "File") in the desktop or application menu. Find the Recycle Bin: Look for the Recycle Bin folder in the left navigation bar. If it is not found, try clicking "Other Location" or "Computer" to search. Configure Recycle Bin properties: Right-click "Recycle Bin" and select "Properties". In the Properties window, you can adjust the following settings: Maximum Size: Limit the disk space available in the Recycle Bin. Retention time: Set the preservation before the file is automatically deleted in the recycling bin

The role of Debian Sniffer in DDoS attack detection The role of Debian Sniffer in DDoS attack detection Apr 12, 2025 pm 10:42 PM

This article discusses the DDoS attack detection method. Although no direct application case of "DebianSniffer" was found, the following methods can be used for DDoS attack detection: Effective DDoS attack detection technology: Detection based on traffic analysis: identifying DDoS attacks by monitoring abnormal patterns of network traffic, such as sudden traffic growth, surge in connections on specific ports, etc. This can be achieved using a variety of tools, including but not limited to professional network monitoring systems and custom scripts. For example, Python scripts combined with pyshark and colorama libraries can monitor network traffic in real time and issue alerts. Detection based on statistical analysis: By analyzing statistical characteristics of network traffic, such as data

The importance of Debian Sniffer in network monitoring The importance of Debian Sniffer in network monitoring Apr 12, 2025 pm 11:03 PM

Although the search results do not directly mention "DebianSniffer" and its specific application in network monitoring, we can infer that "Sniffer" refers to a network packet capture analysis tool, and its application in the Debian system is not essentially different from other Linux distributions. Network monitoring is crucial to maintaining network stability and optimizing performance, and packet capture analysis tools play a key role. The following explains the important role of network monitoring tools (such as Sniffer running in Debian systems): The value of network monitoring tools: Fast fault location: Real-time monitoring of network metrics, such as bandwidth usage, latency, packet loss rate, etc., which can quickly identify the root cause of network failures and shorten the troubleshooting time.

See all articles