Demo repo for PyCharm Webcast 2022-Feb-22

jeremyschulman jeremyschulman Last update: Jun 27, 2022

Demo Repository for PyCharm Webcast

This repository contains the code used for the 2022-Feb-22 PyCharm WebcastBeginner Concurrency with Python asyncio.

The code in this repo is designed for use with Arista EOS network infrastructure.You could adapt it for your own use for other networking devices - left as an exercisefor the User.

Installation

You will need to git-clone and install the project files directly as the repois not deployed on PyPi. The project uses poetry, so you will need to createa Python3.8 virtualenv with poetry. Once created, you can install the files:

poetry install

You should then have a script called demo available in your virtualenv. You canverify via:

demo --helpUsage: demo [OPTIONS] COMMAND [ARGS]...  Beginner-Concurency Demo CLIOptions:  --version  Show the version and exit.  --help     Show this message and exit.Commands:  find-host  Find switch-port where host with mac-addresss  versions   Run inventory OS versions demo  xcvrs      Run inventory transceivers demo

Before You Begin

Before you try out the demo features you will need to export two variables intoyour enviornment for network device authentication:

  • NETWORK_USERNAME - the login username value
  • NETWORK_PASSWORD = the login password

You will also need to create a text-file called inventory.text that containsthe list of devices, one per line. The demo must be run on a computer that hasIP reachability to those devices and DNS for devices in the file.

Tags:

Subscribe to our newsletter