Recent posts

Multithreading with Python and Netmiko

June 28, 2020 | 6 minute read

If you ran the script in the previous post, you will have found it took approximately 18 seconds to run. While that may not feel like a lot of time, what if we wanted to connect to five devices? Or ten? Our execution time will grow exponentially. What originally took seconds begins to take minutes. So, how do we solve this problem? We use multi...

Network Automation with Cisco Modeling Labs (CML2)

June 26, 2020 | 3 minute read

Coming from a network engineering background, network automation has always interested me. In fact, it was network automation which spiked my interest in DevOps. The beauty of being able to make safe, repeatable and automated changes at scale cannot be overstated. But I digress. Cisco recently released CML2 (formerly known as VIRL). As per the ...

Python: Covering all your bases with Coverage

June 17, 2020 | 2 minute read

Test Driven Development (TDD) in Python touched on TDD and pytest. Then in Taking pytest for a test drive we dived deeper on both subjects. Now that we’ve got those two covered off, it’s time to talk about pytest-cov. In a nutshell, pytest-cov tells us how much of our code base is covered by our tests. This is useful because as our project grow...

Taking pytest for a test drive

June 16, 2020 | 2 minute read

In the previous post we got a glimpse of pytest. In this post, we’ll be diving a little deeper. To do this, we’ll be build a basic Flask app. Before we start coding though, let’s first set up our directory structure. Thankfully, pytest gives us a few examples in their Directory Structure and Good Practices pages. For the purposes of this post,...

Test Driven Development (TDD) in Python

June 15, 2020 | 3 minute read

Have you heard of Test Driven Development (TDD)? If you haven’t, you’re in for a real treat. TDD is a development methodology. Before writing a new function or method, a dev will write a “test” for it. The test’s job is to ensure the code produces the correct output. As the code does not yet exist, the test will of course fail the first time i...