python modules and third-party libraries used functional finishing Profile

Preface:

  A superior advantage of Python appealing is that it has a large number of third-party libraries, can achieve more efficient development, after finishing with matching, sorting the common module operation and maintenance related, and features its profile, which is important for common modules, the next blog will make the appropriate details and features the use.

Python common operation and maintenance of 20 libraries:

1, psutil is a cross-platform library (https://github.com/giampaolo/psutil)
can achieve access to the system running processes and system utilization (memory, CPU, disk, network, etc.), mainly used for system monitoring, analysis and resource management systems and processes.

2, IPy (http://github.com/haypo/python-ipy), IP aid planning.

3, a DNS tool dnspython (http://dnspython.org) Python implementation package.

4, difflib: difflib Python as standard modules, without having to install, is to compare the difference between the text.

5, filecmp: the system comes, can achieve a file, directory, sub-directory traversal differences, the comparison function.

6, smtplib: E-mail module

7, pycurl (http://pycurl.sourceforge.net) is a C language written in libcurl Python implementation, powerful, supporting the agreement: FTP, HTTP, HTTPS, TELNET, etc., it can be understood as the curl command function under Linux Python wrapper.

8, XlsxWriter: Operation Excel worksheet text, numbers, formulas, charts and the like.

9, rrdtool: change for tracking objects, generate charts these changes go

10, scapy (http://www.wecdev.org/projects/scapy/) is a powerful interactive packet processing program, it is possible to counterfeit packets or unpacked, involves sending a packet, packet sniffing, response and feedback functions.

11, Clam Antivirus free open-source anti-virus software, pyClamad, Python module that allows direct use of ClamAV virus scanning daemon calmd.

12, pexpect: expect under Linux can be understood as a Python package, we can achieve by pexpect for ssh, ftp, passwd, telnet and other interactive command-line automatically without the need for human intervention to achieve the purpose of automation.

13, paramiko is installed SSH2 connection remote Python-based implementation, certification and support for key ways. Can be achieved remote command execution, file transfer, intermediate SSH proxy functions. Pexpect with respect to the higher level, the package, function closer to the SSH protocol, official website address: http: //paramiko.org (dependent: Crypto, Ecdsa, Python development package python-devel)

14, fabric is based on the SSH command-line tool Python implementation, simplifying the SSH application deployment and system management tasks, which provides a system-based operating components, can achieve local or remote shell command, including the command execution, file upload, download and complete execution log output function. Fabric made on the basis paramiko a higher level of packaging, the operation easier. Official website address: http: //www.fabfile.org (dependent setuptools, Crypto, paramiko support package)

15, CGIHTTPRequestHandler implement support for CGI's.

16, ansible (http://www.ansibleworks.com/) configuration management of an integrated IT system, application deployment, open source platform to perform specific tasks. Python-based implementation, and is constructed of Paramiko PyYAML two key modules. The biggest difference Ansibl and Saltstack is Ansible without having to deploy any client on the host accused of default were issued under remote command execution or functions directly through the SSH tunnel.

17, YAML: a programming language used to express the data sequence.

18, playbook: a very simple configuration management and deployment of multi-host system.

19, saltstack (http://saltstack.com) is a centralized server infrastructure management platform, it can generally be understood as a simplified version of the puppet and enhanced version of func. Saltstack Python language based, lightweight binding ZeroMQ message queue, and Python constituents per module (Pyzmq, PyCrypto, Pyjinja2, python-msgpack and PyYAML etc.) construct.

20, func, to solve the cluster management and monitoring system design issues need to manage basic framework development.

Operation and maintenance of common Python module

  • csv: For reading csv file is very convenient
  • collections: common data type utility extensions, including  OrderedDict, defaultdict and namedtuple
  • random: generating a pseudorandom number, and a random sequence selected disrupted stochastic
  • string: more a function of the string. This module further comprises a set of letters useful, for example,  string.digits(including all characters are valid numeric string)
  • re: regular expression pattern matching string in
  • math: Some standard mathematical functions
  • os: interact with the operating system
  • os.path: os a sub-module for manipulating path name
  • sys: direct use of the Python interpreter
  • json: suitable for reading and writing json file (for network development)

Third-party software packages (to be installed)

      • IPython - better interactive Python interpreter.
      • requests - easy to use method to provide a network request. Suitable for access to the network API.
      • Flask - a small framework for building applications and network API.
      • Django - a more feature-rich web application framework for building. Django is particularly suitable for the design of complex, content-rich web applications.
      • Beautiful Soup - for parsing HTML and extract information. Suitable for web data extraction.
      • pytest - extends Python built asserted, and is the most units of the module.
      • PyYAML - for reading and writing YAML files.
      • NumPy - 用于使用 Python 进行科学计算的最基本软件包。它包含一个强大的 N 维数组对象和实用的线性代数功能等。
      • pandas - 包含高性能、数据结构和数据分析工具的库。尤其是,pandas 提供 dataframe!
      • matplotlib - 二维绘制库,会生成达到发布标准的高品质图片,并且采用各种硬拷贝格式和交互式环境。
      • ggplot - 另一种二维绘制库,基于 R’s ggplot2 库。
      • Pillow - Python 图片库可以向你的 Python 解释器添加图片处理功能。
      • pyglet - 专门面向游戏开发的跨平台应用框架。
      • Pygame - 用于编写游戏的一系列 Python 模块。
      • pytz - Python 的世界时区定义。

Guess you like

Origin www.cnblogs.com/xiaoyuxixi/p/12238303.html