Home > Backend Development > Python Tutorial > Ten Python libraries you must know

Ten Python libraries you must know

高洛峰
Release: 2016-10-19 13:26:36
Original
1301 people have browsed it

Docopt. Ditch optparse and argparse and use docstrings to build elegant, readable, and (if you need it) complex command line interfaces. IMO the best library created in 2013.

Requests, or HTTP as humans use it, is a more pythonic way of handling HTTP requests that is better and easier to use than urllib2. The reputation can be seen, he has been downloaded more than 5,000,000 times on PyPI :)

lxml is a combination of libxml2 and libxslt. If you are dealing with XML or HTML, lxml is your best choice.

Bottle is a fast, simple, lightweight WSGI micro web framework. Build small sites and APIs in seconds. All frameworks have only one py file, and you can even put it in any directory.

sh is a mature Python subprocess interface tool that allows you to run any program like a function. Super easy to use.

Structlog is an advanced logging processor. It integrates multiple existing logging tools, including the Python standard library. You can create plain loggers and add content as you wish, making your logs durable and readable.

Watchdog is a cross-platform Python library and shell tool that can monitor file system events. Super easy to use and easy to use.

Delorean can be a very convenient way for you to process data and time. Set time zones, truncate to seconds, minutes, hours, or even use special methods to iterate from one piece of data to another. Browse the documentation, there are many examples.

PEW. I discovered this project a month ago and already like it. PEW is a set of tools for managing multiple virtual environments and runs perfectly on bash, zsh, fish and powershell. Go try it.

antigravity. Run a Python shell (version >= 2.7) and enter import antigravity.


Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template