Ekahau Automation, Optimising project workflow – Part 1
This is Part 1 to a how-to guide on Ekahau Automation, focusing on optimising project workflow through python scripts. This chapter specifically targets on extracting and reading JSON project files.
Being able to read the project file is the logical first step when looking at automation within Ekahau. It’s relatively straight forward too. The project is a zip file, with a different file extension. Within is a series of JSON files, and potentially other files – example images.
I rely on 3 main libraries for any of my python scripts. These are “ZipFile”, “JSON”, and “argparse”. You need to ensure each library is installed on your machine, and import them into your script using the following:
import zipfile from ZipFile import json import argparse
Ekahau Automation – Argparse
Argparse is used to parse parameters into a script from the command line. You can have multiple parameters required, or optional. Each parameter is parsed to a variable which can be used later in your scripts.
Ekahau Automation – ZipFile
ZipFile is used to decompress, and if required, recompress the project file. In the above example, we require the Ekahau project file to be provided when executing the script. This parameter is then used with ZipFile to decompress the project file.
Ekahau Automation – JSON
JSON is used to read the JSON files which contain data within the project file. Once the project file is decompressed, you are left with a series of JSON files which can be used for automation purposes.
This concludes the first part to my how-to guide for automating Ekahau workflow. We have successfully parsed arguments into a script, extracted a project file, and read a JSON file into a variable. In the next portion, we will begin to manipulate the data from the JSON files.
Resources / Links
Here’s some additional information that you might find useful: