This article will take about 3 minutes to read.

How useful and convenient a language is often depends on the richness of its libraries. Python’s popularity depends to some extent on the fact that it is supported by too many libraries, both officially maintained and developed by third parties, besides its syntax and features. As with machine learning, for example, a very big factor in why so many people use Python is the Python support provided by TensorFlow and PyTorch. Of course, this is not to say that the Python library is completely unnecessary, it is still a work in progress in some areas or project ecology.

What Python libraries have you seen lately? The idea is to find out what Python libraries are very useful for improving productivity. Some of the responses directly post awesome-python and get a lot of likes, of course, but many of them are outdated or not of much value, adding to the cost of library selection. I have generally answered some again, in addition combined with their usual understanding of the content, a little on some basic productivity database to do a simple comb, here to share with you.

It is no longer recommended for specific scenarios, such as Web development libraries, network request libraries, data manipulation libraries, data analysis libraries, machine analysis libraries, and so on. The following is a list of libraries that are useful for building some infrastructure and improving Python productivity in most scenarios.

Attrs, cattrs

GitHub:github.com/python-attr…

Simplify class definition, serialization, deserialization, and so on.

Personal introduction: mp.weixin.qq.com/s/oHK-Y4lOe…

loguru

GitHub:github.com/Delgan/logu…

Simplifies logging.

Written personal profile: mp.weixin.qq.com/s/5Ri1WS5cT…

autopep8

GitHub:github.com/hhatto/auto…

Convert Python code to PEP8 compliant code.

psutil

GitHub:github.com/giampaolo/p…

A Python library that implements task monitoring.

furl

GitHub:github.com/gruns/furl

Url processing is very convenient, much easier than urllib and other libraries.

Retrying, tenacity,

GitHub:github.com/rholder/ret…

The exception retry library, such as the number of retries after an error, is particularly useful for making some HTTP requests, but can also be used elsewhere.

typing

Docs:docs.python.org/zh-cn/3/lib…

Python supports multiple types and nested types. It is also recommended to use Python type annotations.

argparse

Docs:docs.python.org/zh-cn/3/lib…

I have used several command-line parsing tools, such as Docopt, but have since switched back to ArgParse, which is fully functional and powerful.

absl-py

GitHub:github.com/abseil/abse…

Libraries that I find easier to use than ArgParse, such as TensorFlow, use this one and are very handy for defining some flags.

pipenv

GitHub:github.com/pypa/pipenv

More comprehensive package management tool, integrated virtual environment, support the Lock mechanism to Lock the installation package version and dependency information. Of course, there are pit points, you can search by yourself.

drf

Docs:www.django-rest-framework.org/

Django-based REST Framework to quickly implement REST APIS.

watchdog

GitHub:github.com/gorakhargos…

Easy to monitor file system changes.

glob

Docs:docs.python.org/3/library/g…

The operation of files is very convenient.

2to3

Docs:docs.python.org/2/library/2…

Convert Python2 code to Python3 code.

glom

GitHub:github.com/mahmoud/glo…

JSON nesting is handy.

pathlib

Docs:docs.python.org/3/library/p…

More convenient Python path manipulation library.

environs

GitHub:github.com/sloria/envi…

It is very convenient to obtain environment variables, supporting various types, such as int, bool, etc.

pysnooper

GitHub:github.com/cool-RR/PyS…

A very handy and simple Python debugger that tracks the execution status of every detail of code.

tqdm

GitHub:github.com/tqdm/tqdm

Progress bar control display is very convenient.

sh

GitHub:github.com/amoffat/sh

Some Linux command encapsulation, simple and efficient.

faker

GitHub:github.com/joke2k/fake…

Simulate the generation of data.

Written personal profile: mp.weixin.qq.com/s/iLjr95uqg…

Arrow, Dateutil, dateParser, pendulum

GitHub:github.com/crsmithdev/…

Time resolution and processing library, very convenient. Arrow currently has the most stars and the most favorable reviews.

yagmail

GitHub:github.com/kootenpv/ya…

Convenient mail library, instead of its own SMTPLib.

chardet

GitHub:github.com/chardet/cha…

String type encoding detection.

pypinyin

GitHub:github.com/mozillazg/p…

Chinese characters to pinyin, in some Chinese conversion processing is very useful.

Written personal profile: mp.weixin.qq.com/s/NvA3j8Ns1…

sphinx

Docs:www.sphinx-doc.org/en/master/

Most Python library documents are written this way, such as Scrapy, requests.

Example of personal sphinx + Markdown: github.com/Gerapy/Docs

jinja2

GitHub:github.com/pallets/jin…

A handy template engine for rendering pages easily.

click

GitHub:github.com/pallets/cli…

More convenient and flexible implementation of command line parameters.

ray

GitHub:github.com/ray-project…

Distributed multi-process management.

supervisor

GitHub:github.com/Supervisor/…

Process management tools, such as multitasking in the background, are often used when Docker is packaged.

apscheduler

GitHub:github.com/agronholm/a…

Python timed tasks, but K8S is also possible, and individuals may currently prefer K8S.

intelpython

Home:software.intel.com/en-us/distr…

This is not a Python library, but an Intel-based Python interpreter optimized for large scale operations.

To complete.

Ok, recommend so much first, still can accumulate slowly behind, everybody can understand, individual feeling has a lot of library still can raise productivity greatly.

“`php

Highlights of past For beginners entry route of artificial intelligence and data download AI based machine learning online manual deep learning online manual download update (PDF to 25 sets) note: WeChat group or qq group to join this site, please reply “add group” to get a sale standing knowledge star coupons, please reply “planet” knowledge like articles, point in watching

Copy the code