Python for Network & Systems Engineering
This is a course for network engineers and systems engineers, devops staff, hardware engineers, and back-end developers.
Some familiarity with programming concepts (in any language) is assumed.
By the end of the course, you will have all the knowledge you need to write and interact with Python code for a variety of purposes, with a particular focus on controlling machines, automating system processes, and interacting with APIs. You will understand the elegance and power of Python and have had experience using several important standard and third-party libraries, including for parsing text and log files, matching strings with regular expressions, and scripting tasks via SSH connections. You will also have learned about consuming and creating web APIs and some best practices in Python for writing maintainable code.
Day 1: Python basics
Day 1 covers how to use Python for general programming tasks, including tips and tricks for making this easy. The syllabus is as follows:
- Setting up your Python development environment (IDE, Jupyter notebook)
- Packages and modules
- Python syntax and concepts: an introduction through examples
- Functions and their arguments
- Essential data types, tips and tricks: strings, tuples, lists
- String methods; input and output of text data (including CSV files)
- Dictionaries and their applications
- Worked example: consuming web APIs
- Raising and handling exceptions
Day 2: Handling, Analysing, and Presenting Data in Python
Day 2 will introduce further important concepts and tools for making the most of Python. In particular, it will give you a comprehensive introduction to reading and writing the most important data formats; slicing, dicing and analysing data in powerful ways, and exploratory data visualisation.
- Further important data types: namedtuples and sets
- Classes and objects
- Reading and writing essential data formats: JSON, CSV, Excel, SQL
- Indexing and filtering data in Pandas
- Data fusion: joining & merging datasets
- Summarisation with “group by” operations; pivot tables; hierarchical indices; reshaping data
- Handling dates, times, and time-series
- Interactive visualisation and data exploration with Altair
Day 3: Essential Python libraries and tools
Day 3 gives you a tour of the amazing standard library and important 3rd-party tools for automating various systems-level tasks with Python:
- Python developer tools and debugging tools
- Parsing log files with regular expressions
- Handling dates, times, and IP addresses
- Working with files and paths
- Cryptographic hashing of file contents (SHA256, MD5 etc.)
- Compressing and uncompressing data (zip, tar, bzip2 etc.)
- Automatically sending emails
- Running external commands as subprocesses
- Process and system monitoring with psutil
- Worked example: finding duplicate files (by contents)
Day 4: Real-world programming in Python
Day 4 shows you how to automate a variety of further tasks, such as consuming and creating web APIs. It also teaches you about some "best practices" of development using Python:
- Accessing web APIs in more depth (sessions, OAuth)
- Intro to creating web APIs with Flask
- Templating with Jinja2; automatically creating config files (e.g. YAML)
- Network automation via SSH with Fabric
- Best practices for maintainability; tips and tricks
- Creating scripts that take command-line arguments
- Creating reusable modules and packages
- Logging and unit testing
We will supply you with printed course notes and a USB stick containing electronic versions of the course notes as Jupyter notebooks, solutions to the programming exercises, several written tutorials, and reference documentation on Python and the third-party packages covered in the course.
- Personal help:
- Your trainer(s) will be available after the course each day for you to ask any one-on-one questions you like — whether about the course material and exercises or about specific problems you face in your work and how to use Python to solve them.
- Food and drink:
- We will provide lunch, morning and afternoon tea, and drinks.
- The course will run from 9:00 to roughly 17:00 each day, with breaks of 45 minutes for lunch and 20 minutes each for morning and afternoon tea.
An internet-connected computer will be provided for you for the training.
Python for Network & Systems Engineering:
108 Robinson Road (Level 11), Singapore
13 May – 16 May 2019
Python for Network & Systems Engineering: