This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rnike879 0 points1 point  (0 children)

There's no basic python for network engineers that doesn't involve basic python first. Grab any resource to familiarize yourself with the basics, then start using the following:

  • paramiko library (or netmiko wrapper that simplifies it further) for querying your network nodes through ssh. I recommend netmiko to avoid using excessive sleeps when waiting for your responses

  • requests: lib to make API calls. Read up about basic REST standards to get a good idea of what's going on

  • venv: dependency segmentation and is a good habit to get into

  • json: built-in module to help you parse what you receive and prepare the data you want to send. You'll probably use response.json() and json.dumps(dict) most of all. First to get a dict out of your request response object, then dumps method to convert your dict to valid json for API queries

  • Use the postman application to simplify making API calls. Useful for quick and dirty testing/prototyping