Current location - Recipe Complete Network - Complete cookbook of home-style dishes - What are the commonly used python libraries?
What are the commonly used python libraries?
10 top-level practical python library

1 dash

Dash is a relatively new software package, which is an ideal choice for building data visualization app with pure python, so it is especially suitable for anyone who processes data. Dash is a mixture of Flask, Plotly.js and React.js

2. Games

Pygame is python decorator of SDL multimedia library, which is a cross-platform development library, and aims to provide the bottom interface for the following contents: audio, keyboard, mouse, joystick, graphics hardware based on OpenGL and Direct3D.

Pygame is highly portable and can run on almost all platforms and operating systems. Although it has a perfect game engine, you can also use this library to play MP3 files directly from python scripts.

3. Pillows

Pillow is dedicated to image processing. You can use this library to create thumbnails, convert between file formats, rotate, apply filters, display images and so on. This is ideal if you need to perform batch operations on many images.

4. Color

Colorama allows colors to be used in the terminal, which is very suitable for python scripts. This document is short and interesting and can be found on the Colorama PyPi page.

5、JmesPath

It is very easy to use JSON in python, because JSON has a good mapping in python dictionary. In addition, python has its own excellent json library for parsing and creating JSON. For me, this is one of its best functions. If I need to use JSON, I can consider python.

JmesPath makes it easier for python to process JSON, and it allows you to explicitly specify how to extract elements from JSON documents.

6. Request

Requests is built on the world's largest download python library, urllib3, which makes Web requests very simple, powerful and universal.

Requests can complete all the advanced tasks you can think of, such as authentication, using cookie, executing POST, PUT, DELETE and so on. Use a custom certificate, use a session, use a proxy, etc.

7. Simple json

What's wrong with the local json module in python? Don't! In fact, json in python is Simplejson. Python adopted a version of Simplejson and incorporated it into each distribution, but using Simplejson has some advantages: it is suitable for more python versions, updated more frequently than the version that comes with Python, and has a part written in C, so it is very fast.

8. Emoji

Emoji library is interesting, but not everyone likes Yan characters. Emoji software package is very useful in analyzing perspective media data.

9、Python-dateutil

Python-dateutil module provides a powerful extension for standard datetime module. My experience is that python-dateutil appears where the regular Python date-time function ends.

10, beautiful Soup

If you extract some HTML from the website, you need to parse it to get what you actually need. BeautifulSoup is a python library for extracting data from HTML and XML files. It provides a simple way to navigate, search and modify the parse tree. It is very powerful, even if it is damaged, it can handle all kinds of HTML, which is a very powerful function.

Some of its main functions:

①BeautifulSoup will automatically convert incoming documents into Unicode and outgoing documents into UTF-8, so there is no need to consider encoding.

②BeautifulSoup is located at the top of the popular python parser, which allows you to try different parsing strategies or improve flexibility.