A simple script to pull data from the GeoGlows python API library and save to a network folder.
-
Git
-
Python < 3.13 (GEOGLoWS python package doesn't support 3.13 yet)
-
Pull the repo to
C:\Scripts. If this location is not viable the.batscript would need to be updated. -
Create a file named
.envin the repo. Optionally make a copy of.env.exampleand rename it to.env. -
Substitute the example paths in your
.envfile, using.env.exampleas an example. The.gitignorefile is set to ignore the.envfile, so don't worry about putting sensitive data in there. -
Create a python virtual environment in the repo directory. This can be done by running the following command in the command prompt:
cd C:\Scripts\geoglows-scheduled-task
python -m venv venv The .gitignore file is set to ignore the venv folder. The .bat script will activate the virtual environment before running the script.
- Run the
.batscript to install the required packages and run the python script. This can be done by running the following command in the command prompt:
geoglows-scheduled-task.bat The .bat script will update the git repo, activate the virtual environment, install the required packages, and run the python script.
- The
.batscript can be scheduled to run at a specific time using the Windows Task Scheduler.