For those of you who are automating your networks with Python, here's a little tool that will save you a ton of time and also make your code look like it's been written by a pro! Its called Black.

Black is an awesome code formatter that you simply point at your code, and it does the work to auto-format it against all the Python PEP formatting standards, in a blink!

Below shows an example:

There is an online version as well if you need to quickly format a block of code, which can found at https://black.now.sh/.

Become a Network Automation Jedi
Join our membership and enjoy:
  • Deep Dive Library
  • Community Support
  • Hands-on Examples
  • Multivendor Labs (beta)

100% Satisfaction Guaranteed!
Cancel your membership at any time.


Join our Community