Share E-Book

Mastering Python Networking Utilize Python Packages and Frameworks for Network Automation, Monitoring, Cloud, and Management (Eric Chou)(Z-Library)

Author

Rating No ratings yet

Log in to rate

Framework
Language English

Networks in your infrastructure set the foundation for deploying, maintaining, and servicing applications. Python is the ideal language for network engineers to explore tools that were previously available to systems engineers and application developers. Mastering Python Networking, Fourth edition, guides you on a Python-driven journey from traditional network engineering to modern network development. This new edition incorporates the latest Python features and DevOps frameworks. In addition to new chapters on introducing Docker containers and Python 3 Async IO for network engineers, each chapter is updated with the latest libraries and working examples to ensure compatibility and clarity of the concepts. Starting with a basic overview of Python, the book teaches you how it can interact with both legacy and API-enabled network devices. You will learn to leverage high-level Python packages and frameworks to perform network automation tasks, monitoring, management, and enhanced network security, followed by AWS and Azure cloud networking. You will use Git for code management, GitLab for continuous integration, and Python-based testing tools to verify your network. By the end of this book, you'll be a confident network developer capable of automating modern infrastructure using Python, DevOps practices, and cloud technologies.

Format PDF
Size 35.5 MB
6
Views
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
(This page has no text content)
Page 2
Mastering Python Networking Fourth Edition Utilize Python packages and frameworks for network automation, monitoring, cloud, and management Eric Chou BIRMINGHAM—MUMBAI “Python” and the Python Logo are trademarks of the Python Software Foundation.
Page 3
Mastering Python Networking Fourth Edition Copyright © 2023 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book. Packt Publishing has endeavoured to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Senior Publishing Product Manager: Aaron Tanna Acquisition Editor – Peer Reviews: Gaurav Gavas Project Editor: Namrata Katare Content Development Editor: Liam Thomas Draper Copy Editor: Safis Editing Technical Editor: Srishty Bhardwaj Proofreader: Safis Editing Indexer: Rekha Nair Presentation Designer: Ganesh Bhadwalkar Developer Relations Marketing Executive: Meghal Patel First published: April 2016 Second edition: August 2018 Third edition: January 2020 Fourth edition: January 2023 Production reference: 1130123 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-80323-461-8 www.packt.com
Page 4
To my wife, Joanna, who inspired me to explore. To my children, Mikaelyn and Esmie, may you find the fire to explore the world as well.
Page 5
Foreword The book you are holding in your hands or are reading on your screen has a power that can be yours if you take time to study it. Programming can amplify your existing knowledge and skillset. Many people are told they should learn programming and Python for their own sake. Program- ming skills are in demand, so you should be a programmer. That is probably good advice. But better advice would be to answer the question, “How can you take your existing expertise and leap ahead of peers by automating and extending that experience with software skills?” This book aims to do just that for network professionals. You’ll learn about Python in the context of network configuration, administration, monitoring and more. If you are tired of logging in and typing in a bunch of commands to configure your network, Python is for you. If you need to be certain the network configuration is solid and repeatable, Python is for you. If you need to monitor, in real-time, what is happening on the network, well, you guessed it, Python is for you. You are probably in agreement about learning software skills that can be applied to network engineering. After all, terms like Software-Defined Networking (SDN) have been all the buzz in the last few years. But why Python? Maybe you should learn JavaScript or Go or some other language. Maybe you should just double down on Bash and shell scripting. Python is well suited for network engineering for two reasons. Firstly, as Eric will demonstrate throughout this book, there are many Python libraries (sometimes called packages) designed specifically on network engineering. With libraries such as Ansible, you can create complex network and server configurations using simple configuration files. Using Pex- pect or Paramiko, you’ll be able to program against remote legacy systems as if they had their own scripting API. If the gear you’re configuring has an API, chances are you can use a purpose-built Python library to work with it. So clearly, Python is well-suited for the job. Secondly, Python is special amongst programming languages. Python is what I call a full spectrum language. My definition of this term is that it is both a language that is incredibly easy to get started (print ("hello world" ) anyone?) and also very powerful, being the technology behind incredible software such as YouTube.
Page 6
This is not normal. We have solid beginner languages for quickly building software. Visual Basic comes to mind here. So does Matlab and other commercial languages. Yet, when these are pushed too far, they fall down badly. Can you imagine Linux, Firefox, or an intensive video game created with any of these? No way. At the other end of the spectrum, we also have very powerful languages such as C++, .NET, Java and many others. C++ is, in fact, the language used to build some Linux kernel modules and large open-source software such as Firefox to some degree. Yet, they are not beginner-friendly. You have to learn about pointers, compilers, linkers, headers, classes, accessibility (public/private), and on and on just to get started. Python lives in both realms making it incredibly easy to be productive with just a few lines of code and simple programming concepts. Yet it grows to be the language of choice for some of the world’s most significant software behind YouTube, Instagram, Reddit, and others. Microsoft chose Python as their language to implement the CLI for Azure (although you don’t have to know or use Python to use their CLI of course). So, here’s the deal. Programming is a superpower. It can take your network engineering expertise and launch it into the stratosphere. Python is one of the world’s fastest growing and most pop- ular programming languages. And Python has many highly polished libraries for working with networks in many facets. Therefore, this book, Mastering Python Networking, combines all of these and will change the way you think about networking. Enjoy the journey. Michael Kennedy Portland, OR Founder of Talk Python
Page 7
Contributors About the author Eric Chou is a seasoned technologist with over 20 years of experience. He has worked on some of the largest networks in the industry while working at Amazon, Microsoft, and other Fortune 500 companies. Eric is passionate about network engineering, Python, and helping companies build better automation culture. Eric is the author of other top-selling books on security, data processing, and programming. Eric holds multiple U.S. patents in IP telephony and networking. He shares his deep interest in technology through his books, online classes, speaking engagements, and contributing to open source projects. I would like to thank the open source community members for generously sharing their compassion, knowledge, and code. Without them, many of the projects referenced in this book would not have been possible. I hope I made small contributions to the wonderful communities in my own way as well. I would like to thank the Packt team for the opportunity to collaborate on the fourth edition of this book. Special thanks to the technical reviewer, Josh VanDeraa, for generously agreeing to review this book. To my family, your constant support and encouragement make me want to be the best version of myself. I love you.
Page 8
About the reviewer Josh VanDeraa is a 20-year networking veteran who has been doing network automation for the past 7 years. He has worked in large enterprise retail, travel, managed services, and most re- cently, professional services industries. He has worked on networks of all sizes, bringing multiple different network automation solutions to the table to drive real value with Python, Ansible, and Python web framework solutions. Josh is the author of Open Source Network Management and maintains a blog site (https://josh-v. com) to provide additional content to those on the web. I’d like to thank my family first and foremost, who have allowed me the time to dive in and review the topic. I would also like to thank Eric for taking the time to share his experiences. This is a tough thing to do and Eric has done a masterful job at putting time and real-life experiences into the book to be consumed. I love how the book has evolved over the revisions, with my first reading of the book coming in the second edition. And lastly, I would like to thank the greater network automation community. This is a journey for all of the individuals, no matter the organization. Please join, teach, and share your experiences with the community so network automation can continue to evolve!
Page 9
Join our book community To join our community for this book – where you can share feedback, ask questions to the author, and learn about new releases – follow the QR code below: https://packt.link/networkautomationcommunity
Page 10
(This page has no text content)
Page 11
(This page has no text content)
Page 12
(This page has no text content)
Page 13
(This page has no text content)
Page 14
(This page has no text content)
Page 15
(This page has no text content)
Page 16
(This page has no text content)
Page 17
(This page has no text content)
Page 18
(This page has no text content)
Page 19
(This page has no text content)
Page 20
(This page has no text content)
The above is a preview of the first 20 pages. Register to read the complete e-book.

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
← Back to List