What to do with python programming

藏色散人
Release: 2019-07-04 11:47:02
Original
4077 people have browsed it

What to do with python programming

What can you do with python programming?

1 WEB Development

In China, Douban has used Python as the basic language for web development from the beginning. Zhihu’s entire architecture is also based on the Python language. This makes web development develop very well in China.

Although Python is not currently the first choice for web development, it has always occupied a place that cannot be ignored. There are various web frameworks in Python, whether they are simple micro-frameworks that can be freely matched or full-featured large-scale MVC frameworks, which are also very advantageous in web projects that require agile development. Large-scale web services provided by Python that are widely used (or were widely used) include Zhihu, Douban, Dropbox and other websites. Coupled with the "glue" characteristics of Python itself, it is easy to integrate other languages ​​when large-scale performance-level calculations are required, while retaining the portability and speed of web development.

In addition, there are a large number of "out-of-the-box" modules in Python for related functions such as docking with various other websites. If you want to develop functions related to WeChat public accounts, packages such as wechat-sdk/weixin-python can enable you to almost completely ignore the various server interaction details mentioned in the document and focus on the function implementation to complete the development.

Currently, domestic Python web development mainly has two technology stacks:

(1) Django

Django is an advanced agile web development If you learn the framework, you can build a website very quickly. Of course, if it is purely compared to the speed of the website, Ruby on rails based on ruby ​​is obviously faster, but one advantage of Django is that it has excellent performance and is more suitable for the application scenarios of domestic websites. Pinterest, a well-known foreign picture community, was also developed based on Django in its early days and has withstood the impact of rapid user growth. So if you want to quickly develop a website and also take into account the API calling needs of the APP client, Django can be trusted.

(2) Flask

Compared with Django, Flask is a lightweight web framework. The biggest advantage of Flask is its superior performance and it is suitable for developing background API services with mobile clients. The domestic Restful API service based on Flask is very popular and is also in greatest demand. Well-known companies such as Baidu, NetEase, Xiaomi, Momo, etc. have deployed applications based on Flask. Of course, if you want to build a traditional web website, it is still recommended to use Django. The advantage of Flask is the backend and API, and it is not suitable for building a full-featured website.

2 Web crawler

Web crawler is a commonly used scenario in Python. Internationally, Google used Python language extensively in the early days as the basis for web crawlers, which led to Application development of the entire Python language. In the past, many people in China used collectors to search for content on the Internet. Now it is much easier to use Python to collect information on the Internet than before.

Python has accumulated many tools in this area, whether it is Requests for simulating HTTP requests, PyQuery/BeautifulSoup for HTML DOM parsing, Scrapy for automating distributed crawling tasks, or using Various ORMs that simplify database access have made Python one of the preferred languages ​​for data crawling. In particular, data analysis and calculation after crawling are the areas that Python is best at and are very easy to integrate. Currently, the most popular web crawler framework in Python is the very powerful scrapy.

3 Artificial Intelligence and Machine Learning

Artificial intelligence is a very hot direction now, and the AI ​​boom makes the future of the Python language full of unlimited potential. Most of the several very influential AI frameworks released now are implemented in Python. Why?

Because Python is dynamic enough and has sufficient performance, these are the technical characteristics required by AI technology. For example, some websites based on Python-based deep learning libraries, deep learning directions, machine learning directions, and natural language processing directions are basically implemented through Python. Most of the tool frameworks for machine learning, especially the popular deep learning, provide Python interfaces. Python has always had a good reputation in the field of scientific computing. Its concise and clear syntax and rich computing tools are deeply loved by developers in this field.

Long before deep learning and Tensorflow and other frameworks became popular, scikit-learn existed in Python, which can easily complete almost all machine learning models. It only takes a few simple lines to download classic data sets and build models. code. It can be easily adjusted with tools such as Pandas and matplotlib.

Deep learning frameworks such as Tensorflow, PyTorch, MXNet, and Keras have greatly expanded the possibilities of machine learning. Using Keras to write a deep learning network for handwritten digit recognition only requires a few dozen lines of code, and you can use the underlying implementation to easily call a large number of resources, including GPUs, to complete the work.

It is worth mentioning that no matter what framework, Python is only used as a language for front-end description, and the actual calculation is implemented through the underlying C/C. Because Python can easily introduce and use C/C projects and libraries to achieve expansion in functionality and performance, in such large-scale calculations, developers can focus more on the logic of the data itself, and focus less on complex work such as memory allocation. Liberation is an important reason why Python is widely used in the field of machine learning.

4 Data analysis and processing

In terms of data analysis and processing, Python has a very complete ecological environment. For distributed computing, data visualization, database operations, etc. involved in "big data" analysis, Python has mature modules that you can choose to complete its functions. For both Hadoop-MapReduce and Spark, Python can be used directly to complete the calculation logic. This is very convenient for both data scientists and data engineers.

5 Server operation and maintenance and other gadgets

Python is also very important for server operation and maintenance. Since almost all Linux distributions currently come with a Python interpreter, using Python scripts for batch file deployment and operation adjustments has become a very good choice on Linux servers. Python also contains many convenient tools, from paramiko for controlling ssh/sftp, to supervisor for monitoring services, to build tools such as bazel, and even package management tools for C such as conan, Python provides a full range of tools Collection, and on this basis, combined with the Web, it will become very simple to develop tools that facilitate operation and maintenance.

What’s more interesting is that developers in the Python community have also produced development toolkits such as itchat. You can use WeChat to manage servers or run various services. Think about it, a WeChat robot can report the server or program operation status when an exception occurs, or at a fixed time every day, and even include charts drawn with matplotlib/seaborn, which are clear at a glance, and you send a simple sentence to it , you can complete the adjustment of the server.

6 Desktop program

Python can also be used for desktop software development (such as sublime text, etc.), and even mobile development (see kivy). Python is simple and convenient, and its comprehensive toolkit environment can greatly reduce the burden on developers. The famous UI framework QT has a Python language implementation version PyQT. The simple and easy-to-use features of Python coupled with the elegance of QT make it easy to develop desktop programs with complex interfaces and achieve cross-platform features easily.

7 Multimedia applications

You can use PIL, Piddle, ReportLab and other modules in Python to process images, sounds, videos, animations, etc. You can also use Python Generate dynamic charts and statistical analysis charts. In addition, you can also use the PyOpenGl module to write three-dimensional scenes very quickly and effectively.

Related recommendations: "Python Tutorial"

The above is the detailed content of What to do with python programming. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!