From ba1666f86463ebda39adeca44e49380e5a860a39 Mon Sep 17 00:00:00 2001 From: Karol Tylenda Date: Thu, 8 Feb 2024 11:00:46 +0100 Subject: [PATCH] add readme --- python/python-weather-args/README.md | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 python/python-weather-args/README.md diff --git a/python/python-weather-args/README.md b/python/python-weather-args/README.md new file mode 100644 index 00000000..39dfd345 --- /dev/null +++ b/python/python-weather-args/README.md @@ -0,0 +1,40 @@ +# Python Weather Data Scraper + +## Description + +This project contains a sequence to run on ScramjetTransformHub for fetching weather data for specified cities. The script is written in Python and uses the OpenMeteo API for data retrieval. + +## Running on Scramjet Hub + +To run the sequence on ScramjetTransformHub, follow these steps: + +1. Download the package containing the sequence: `python-weather-args.tar.gz`. + +2. Prepare the JSON configuration file in the following format: + +```json +{ + "appConfig": { + "current": [ + "temperature_2m", + "is_day", + "rain", + "snowfall", + "wind_speed_10m" + ] + }, + "args": [{ "cities": ["Warsaw", "Berlin", "Moscow"] }] +} +``` + +Where: + +- The appConfig key contains optional application configuration. In this case, it defines typical parameters such as the type of data to be fetched. The available options for the current key can be found on the open-meteo.com website. +- The args key contains a list of arguments passed to the application. In this case, we pass a list of cities for which data should be fetched. + +3. Execute the `si seq deploy` command, providing the path to the package and the startup configuration file in JSON format: + `si seq deploy python-weather-args.tar.gz --startup-config ` + or + `si seq deploy dist --args [{"cities":["Warsaw","Berlin","Boston"]}]` + +4. To read data from the application, use the command `si inst output `.