Skip to content

Latest commit

 

History

History
63 lines (40 loc) · 1.74 KB

README.md

File metadata and controls

63 lines (40 loc) · 1.74 KB

WeatherXM Python Integration

Sponsor

About

This Python script facilitates interaction with the WeatherXM API, allowing users to authenticate, fetch device lists, and retrieve weather history data. It's designed to work with WeatherXM's system for users to access weather data from their registered devices.

Features

  • User authentication with the WeatherXM API.
  • Fetching a list of all devices associated with the user's account.
  • Retrieving detailed weather history for each device.
  • Saving weather data to JSON files organized by date.
  • Console output of weather data in a human-readable format.

Getting Started

Prerequisites

  • Python 3.6 or later.
  • requests library.
  • A .env file with your WeatherXM credentials.

Installation

  1. Clone the repository:
git clone https://github.com/simeononsecurity/WeatherXM-Python.git
cd WeatherXM-Python
  1. Install the required Python libraries:
pip install -r requirements.txt
  1. Create a .env file in the root directory of the project with your WeatherXM API credentials:
WEATHERXMUSERNAME=your_username_here
WEATHERXMPASSWORD=your_password_here

Usage

Run the script with Python:

python main.py

The script will authenticate with the WeatherXM API, fetch the list of devices, retrieve weather data for each device, save the data to JSON files, and print a summary to the console.

Contributing

Contributions to enhance the functionality, improve the documentation, or fix bugs are welcome. Please open an issue or submit a pull request.

License

Distributed under the MIT License. See LICENSE for more information.