Introduction
This knowledge base article guides you through the process of setting up your system to use the ARMOR fleet management Python scripts available at github.com/armor-fleet-mgmt. These scripts are designed to enhance your fleet management capabilities by leveraging Python, a powerful programming language.
Prerequisites
Before you can use the ARMOR fleet management Python scripts, you need to install Python and the Requests library on your system.
Installing Python
1. Accessing the Microsoft Store:
- Click on the Start menu.
- Navigate to the Microsoft Store.
2. Finding Python:
- In the Microsoft Store's search bar, type in Python.
- Look for the latest version, which at the time of writing is Python 3.12.
3. Installing Python:
- Click the Get button next to Python 3.12. This action will start the download and installation process.
- Wait for the installation to complete. You will see a notification in your taskbar, and the Microsoft Store window will indicate that Python is Installed.
4. Confirmation:
- Once installed, you will receive a notification in your taskbar. You can then close the Microsoft Store window.
Installing the Requests Library
1. Opening Windows Terminal as Admin:
- Right-click on the Start menu.
- Choose Windows Terminal (Admin).
2. Installing Requests:
- In the terminal, type the following command and press Enter:
pip install requests
- This command installs the Requests library, a Python package that allows you to send HTTP requests easily.
Testing a Sample Script
1. Choosing a Script:
- Locate the script you want to execute on the ARMOR GitHub page. For demonstration, we'll use the legacy raw report.py script.
2. Preparing the Script:
- Copy the desired script.
- Open your terminal and right-click to paste the script.
3. Configuring Script Parameters:
- Add details such as:
- `-d` followed by the number of days (e.g., `7`) for the report duration.
- `-c` followed by the customer name in all caps, which is available in the ARMOR asset management portal.
- `-t` followed by your token, which can be found under the "API Tokens" tab in the ARMOR asset management portal. The token starts with `AT:` followed by a series of numbers and characters.
4. Executing the Script:
- Once you've filled in the necessary details, press Enter to execute the script.
- The script will generate a report based on the parameters you've provided, using ARMOR's Python scripting capabilities.
Conclusion
By following these steps, you'll have Python installed and be ready to utilize ARMOR's fleet management Python scripts. These scripts offer a flexible and efficient way to manage your fleet data, providing valuable insights into your operations. If you encounter any issues or have further questions, please refer to the ARMOR support resources for assistance.
-- ARMOR Support
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article