
Network Programming in Python : The Basic
Network Programming and Management
- English
- ePUB (mobile friendly)
- Available on iOS & Android
About this book
For programmers who need to use Python for network-related activities and apps
Key Features
? Comprehensive coverage of Python 3's improved SSL support.
? Create an asynchronous I/O loop on your own.
? A look at the "asyncio" framework, which is included with Python 3.4.
Description
This book includes revisions for Python 3 as well as all of the classic topics covered, such as network protocols, network data and errors, email, server architecture, and HTTP and web applications. ⢠Comprehensive coverage of Python 3's improved SSL support
⢠How to create an asynchronous I/O loop on your own.
⢠A look at the "asyncio" framework, which is included with Python 3.4.
⢠The Flask web framework's URL-to-Python code connection.
⢠How to safeguard your website from cross-site scripting and cross-site request forgery attacks.
⢠How Django, a full-stack web framework, can automate the round journey from your database to the screen and back.
What you will learn
⢠asynchronous models and socket-based networks
⢠Monitor distant systems using Telnet and SSH connections
⢠Interact with websites using XML-RPC, SOAP, and REST APIs
⢠Configure virtual networks in various deployment scenarios
⢠Analyze security weaknesses in a network
Who this book is for
This book is for Python programmers who need a thorough understanding of how to use Python for network-related activities and applications. This book covers all you need to know about web application development, systems integration, and system administration.
Table of Contents
1. Client-Server Networking
2. UDP(User Datagram Protocol )
3. Transmission control protocol (TCP)
4. Domain name system & socket names
5. Data and Errors on the Internet
6. SSL/TLS
7. Architecture of the Server
8. Message Queues and Caches
9. HTTP Clients
10. Servers that handle HTTP
11. www (world wide web)
12. E-mail Construction And Parsing
13. Simple Mail Transfer Protocol(SMTP)
14. Post Office Protocol (POP)
15. Internet Message Access Protocol (IMAP)
16. SSH and Telnet
17. File Transfer Protocol (FTP)
18. Remote Procedure Call (RPC)
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Information
CHAPTER 1
Client-Server Networking: An Overview
Structure
- Layers of Application
- Talking a protocol
- A Network Conversation in its Natural State
- Turtles, Turtles, Turtles
- The Foundation: Stacks and Libraries
- The process of encoding and decoding
- The Internet Protocol (IP)
- Internet Protocol (IP Addresses)
- Routing
- Fragmentation of packets
- Learning More About internet protocol
- Conclusion
Objective:
The Foundation: Stacks and Libraries
- The concept of a protocol stack, in which basic network services are utilized as the foundation for more complex services to be built.
- The fact that youâll frequently be utilizing Python libraries containing previously written codeâwhether modules from Pythonâs built-in standard library or packages from third-party distributions you download and installâthat already know how to communicate with the network protocol you want to utilize.
$ virtualenv âp python3 geo_env$ cd geo_env$ ls bin/ include/ lib/$ . bin/activate $ python -c âimport pygeocoderâTraceback (most recent call last): File â<string>â, line 1, in ImportError: No module named âpygeocoderâ$ pip install pygeocoderDownloading pygeocoder-1.2.1.1.tar.gzRunning setup.py egg_info for package pygeocoderDownloading/unpacking requests>=1.0 (from pygeocoder)Downloading requests-2.0.1.tar.gz (412kB): 412kB downloadedRunning setup.py egg_info for package requestsInstalling collected packages: pygeocoder, requestsRunning setup.py install for pygeocoderRunning setup.py install for requestsSuccessfully installed pygeocoder requests 2The pygeocoder package will now be available in the virtualenvâs python binary.$ python -c âimport pygeocoderâ#!/usr/bin/env python3# Network Programming in Python: The Basicsfrom pygeocoder import Geocoderif __name__ == â__main__â: address = taj mahalâprint(Geocoder.geocode(address)[0].coordinates) Layers of Application
#!/usr/bin/env python3# Network Programming in Python: The Basics import requestsdef geocode(address):base = âhttps://nominatim.openstreetmap.org/searchâparameters = {âqâ: address, âformatâ: âjsonâ}user_agent = â Client-Server Networking: An Overview search2.pyâheaders = {âUser-Agentâ: user_agent}response = requests.get(base, params=parameters, headers=headers)reply = response.json()print(reply[0][âlatâ], reply[0][âlonâ])if __name__ == â__main__â:geocode(âtaj mahalâ)$ python3 search2.py {âlatâ: 27.1751° N, âlngâ: - 78.0421° E } Table of contents
- Cover Page
- Title Page
- Copyright Page
- Dedication Page
- About the Author
- About the Reviewer
- Acknowledgements
- Preface
- Errata
- Table of Contents
- 1. Client-Server Networking: An Overview
- 2. UDP(User Datagram Protocol)
- 3. Transmission control protocol (TCP)
- 4. Domain name system & socket names
- 5. Data and Errors on the Internet
- 6. SSL/TLS
- 7. Architecture of the Server
- 8. Message Queues and Caches
- 9. HTTP Clients
- 10. Servers that handle HTTP
- 11. www (world wide web)
- 12. E-mail Construction And Parsing
- 13. Simple Mail Transfer Protocol(SMTP)
- 14. Post Office Protocol(POP)
- 15. Internet Message Access Protocol (IMAP)
- 16. SSH and Telnet
- 17. File Transfer Protocol (FTP)
- 18. Remote Procedure Call (RPC)