HomeGuidesAPI Reference
GuidesAPI ReferenceGitHubAirheads Developer CommunityLog In
Guides

Getting Started with pyafc

Overview of Python and pyafc

What is Python?

Python is a high-level programming language that is used widely across various disciplines. Highly regarded for its simplified syntax, beginner-friendliness, and abundance of third-party libraries, Python is among the most popular programming languages in the world. The networking community especially embraces Python due in no small part to extensive vendor support as well as a low barrier of entry for getting started with automation and scripting.

📘

pyafc on Pypi

The latest supported version of the pyafc package can be found here on Pypi.

Installing Python

Please refer to Python's official documentation for instructions on how to install Python3 to your machine.

Once Python is installed you're ready to install & use the pyafc package. For instructions on how to use the package follow Using the pyafc Package , for instructions on how to install the package follow Installing pyafc.

Installing pyafc

Creating a Virtual Environment

It is recommended that you create a separate virtual environment for this project. This allows your project to have its own isolated environment and dependencies that will not interfere with or be interfered with by other projects' environments and dependencies. More information about virtual environments can be found in the official Python documentation here.

To create a virtual environment, first determine a suitable location for your virtual environment, in which packages and a new separate instance of the Python executable will be installed, and then execute the following command: python3 -m venv /<path>/<to>/<virtual>/<env>

Installing pyafc via Pip

Python comes with a package management system, pip. Pip can install, update, or remove packages from the Python environment. Package installations/updates/removal done by pip will apply only to the environment active when the pip command is executed.

We'll want to install pyafc in the virtual environment we've created for this project. We can do so with the following steps:

  1. Make sure that the virtual environment is activated by executing the following command:
  • Linux or MacOS shell: $ source /<path>/<to>/<virtual>/<env>/bin/activate
  • Windows Command Prompt: C:\> \<path>\<to>\<virtual>\<env>\Scripts\activate.bat
  1. Install pyafc with pip in your activated virtual environment:
  • The recommended method is to install pyafc from the official Python Package Index (PyPI). To do so, run the following command: pip install pyafc
  • If your machine can't access PyPI, you can install pyafc from our GitHub repo. To do so, run the following command: pip install git+https://github.com/aruba/pyafc