Category: Python fundamentals

This category contains some posts where I talk about some fundamentals in the python language.

You can find the full python 3.x documentation on the official homepage.

Extract CLI commands from Session Logs

I'll like to show you today, how to extract the commands and the associated output from multiple CLI session logs using a simple python script. It doesn't matter if you work programmatic or by hand with this data afterwards, a clear structure is always very useful.

Read more

Validate JSON data using cerberus

During some coding work for my day job, I require a way to validate the format (or schema) for some JSON data. As an additional requirement, the validation step should include default data for certain keys that are not found in the original data. In this post, I'll take a look at cerberus, a library that does exactly that.

Read more

Jupyter: an interactive web-based Python shell

I like to write about a tool today, that I used since several months to write python code for some smaller tasks: Jupyter. It provides a web-based python environment running on your local machine or on a server. This is very useful from my perspective to get started with python programming, play with new libraries and share scripts.

Read more

HTTP calls using the Python requests library

Within this post, I’ll dive deeper into the python code example, where I use the Cisco NX-API on Nexus 5500. We will have a closer look at the HTTP/HTTPs calls using the python requests library and on the interaction with HTTP based interfaces.

Read more