Learning Python Network Programming
Applications for the Web Let's go through our code. From the top, we create our Flask app by creating a Flask instance, in this ...
Chapter 9 In the view, we check that the name supplied is valid by seeing whether it appears in the docstrings dict. If it's oka ...
Applications for the Web The index.html file will be like this: {% extends "base.html" %} {% block body %} <h1>Python Buil ...
Chapter 9 So what does render_template() do? Well, it looks in the templates folder for the file supplied as the first argument, ...
Applications for the Web There isn't a "right" approach; it's best to experiment with a few and see what works best for you. Whe ...
Chapter 9 You can put images and other resources in the static folder, and reference them in the same way. A note on security If ...
Applications for the Web CSRF The second form of attack is the Cross-Site Request Forgery (CSRF). In this attack, a site is tric ...
Chapter 9 Then in templates with forms, just do the following: <form method="post" action="<whatever>"> <input na ...
Applications for the Web Next you can look at your environment. Are there already preferred packages in your organization for op ...
Chapter 9 CGI In the early days of the Web, web servers would mostly only be required to send clients HTML pages, or the occasio ...
Applications for the Web There obviously needs to be some kind of protocol for the web server and the web application to pass th ...
Chapter 9 With pre-forking and web application embedding, our request's journey might look like this: Here, the request is trans ...
Applications for the Web The second approach to solving CGI's performance problems was to hand off the management of the web app ...
Chapter 9 Event-driven servers Web client numbers continued to grow though, and the need arose for servers to be able to handle ...
Applications for the Web The second approach is for a non-Python server to use an adapter plugin, such as Apache's mod_wsgi, or ...
Chapter 9 Gunicorn uses the pre-fork process model described earlier. You can set the number of processes (Gunicorn calls them w ...
Applications for the Web Summary We've taken a whistle-stop tour of putting Python applications on the Web. We got an overview o ...
Working with Wireshark When developing network applications, it's often useful to be able to see exactly what's being transmitte ...
Working with Wireshark Wireshark The program that we're going to take a look at is called Wireshark. It's an open source packet ...
Appendix Packet sniffing usually works in two steps: first, we run a traffic capture session, and then we analyze the captured t ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf