search
HomeBackend DevelopmentPython TutorialSummary of the most powerful Python libraries in 2020

Summary of the most powerful Python libraries in 2020

Jan 05, 2021 am 10:06 AM
linuxpythonrear endprogrammerOperation 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
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete
Python's Execution Model: Compiled, Interpreted, or Both?Python's Execution Model: Compiled, Interpreted, or Both?May 10, 2025 am 12:04 AM

Pythonisbothcompiledandinterpreted.WhenyourunaPythonscript,itisfirstcompiledintobytecode,whichisthenexecutedbythePythonVirtualMachine(PVM).Thishybridapproachallowsforplatform-independentcodebutcanbeslowerthannativemachinecodeexecution.

Is Python executed line by line?Is Python executed line by line?May 10, 2025 am 12:03 AM

Python is not strictly line-by-line execution, but is optimized and conditional execution based on the interpreter mechanism. The interpreter converts the code to bytecode, executed by the PVM, and may precompile constant expressions or optimize loops. Understanding these mechanisms helps optimize code and improve efficiency.

What are the alternatives to concatenate two lists in Python?What are the alternatives to concatenate two lists in Python?May 09, 2025 am 12:16 AM

There are many methods to connect two lists in Python: 1. Use operators, which are simple but inefficient in large lists; 2. Use extend method, which is efficient but will modify the original list; 3. Use the = operator, which is both efficient and readable; 4. Use itertools.chain function, which is memory efficient but requires additional import; 5. Use list parsing, which is elegant but may be too complex. The selection method should be based on the code context and requirements.

Python: Efficient Ways to Merge Two ListsPython: Efficient Ways to Merge Two ListsMay 09, 2025 am 12:15 AM

There are many ways to merge Python lists: 1. Use operators, which are simple but not memory efficient for large lists; 2. Use extend method, which is efficient but will modify the original list; 3. Use itertools.chain, which is suitable for large data sets; 4. Use * operator, merge small to medium-sized lists in one line of code; 5. Use numpy.concatenate, which is suitable for large data sets and scenarios with high performance requirements; 6. Use append method, which is suitable for small lists but is inefficient. When selecting a method, you need to consider the list size and application scenarios.

Compiled vs Interpreted Languages: pros and consCompiled vs Interpreted Languages: pros and consMay 09, 2025 am 12:06 AM

Compiledlanguagesofferspeedandsecurity,whileinterpretedlanguagesprovideeaseofuseandportability.1)CompiledlanguageslikeC arefasterandsecurebuthavelongerdevelopmentcyclesandplatformdependency.2)InterpretedlanguageslikePythonareeasiertouseandmoreportab

Python: For and While Loops, the most complete guidePython: For and While Loops, the most complete guideMay 09, 2025 am 12:05 AM

In Python, a for loop is used to traverse iterable objects, and a while loop is used to perform operations repeatedly when the condition is satisfied. 1) For loop example: traverse the list and print the elements. 2) While loop example: guess the number game until you guess it right. Mastering cycle principles and optimization techniques can improve code efficiency and reliability.

Python concatenate lists into a stringPython concatenate lists into a stringMay 09, 2025 am 12:02 AM

To concatenate a list into a string, using the join() method in Python is the best choice. 1) Use the join() method to concatenate the list elements into a string, such as ''.join(my_list). 2) For a list containing numbers, convert map(str, numbers) into a string before concatenating. 3) You can use generator expressions for complex formatting, such as ','.join(f'({fruit})'forfruitinfruits). 4) When processing mixed data types, use map(str, mixed_list) to ensure that all elements can be converted into strings. 5) For large lists, use ''.join(large_li

Python's Hybrid Approach: Compilation and Interpretation CombinedPython's Hybrid Approach: Compilation and Interpretation CombinedMay 08, 2025 am 12:16 AM

Pythonusesahybridapproach,combiningcompilationtobytecodeandinterpretation.1)Codeiscompiledtoplatform-independentbytecode.2)BytecodeisinterpretedbythePythonVirtualMachine,enhancingefficiencyandportability.

See all articles

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.