This tool/scripts are used to pull EskomSePush data and push events to your selected calendar.
- Visit https://eskomsepush.gumroad.com/l/api and register to gain access to an API key
- Free account gives you 50 api requests per day
- Visit Google Developer Console to create a new project.
- https://console.cloud.google.com/getting-started?pli=1
- Search for the Google Calendar API and enable it for your project.
- Create Credentials:
- In the API & Services dashboard, go to the Credentials page.
- Click on "Create Credentials" and select "OAuth client ID".
- If prompted, configure the consent screen.
- For application type, select "Desktop app" and give it a name.
- Download the JSON file for your credentials.
- Select your project → Go to "OAuth consent screen".
- In the "Test users" section, add the Google accounts (email addresses) that need to use this application, including [your email address]. This will allow these accounts to authorize the application without completing the verification process.
If you intend to make your application available to users outside of your test user list, you'll need to submit it for verification by Google:
- Ensure that your application complies with Google's API Services User Data Policy and the Additional Requirements for Specific API Scopes.
- Complete all the required fields in the "OAuth consent screen" setup in the Google Cloud Console. This includes application name, user support email, developer contact information, and a detailed justification for each requested scope.
- Submit your application for verification by clicking the “Submit for verification” button at the bottom of the OAuth consent screen page.
- For development and testing purposes, continue to add any necessary test users to allow them to use the application without undergoing the full verification process.
- If possible, use the least sensitive scopes necessary for your application to function. Applications requesting fewer and less sensitive scopes are subject to a simpler verification process.
pip install -f requirements.txt
- add EskomSePush API Key as LICENSE_KEY
- add Google credentials to "credentials.json"
Run the location lookup script
python location_search.py
- This script will ask for a location to search for. Type in your nearest address and hit enter.
- From the table of locations, find the one closest to you, then copy the "Id"
- Save Id in .env as ESKOM_LOCATION
Next we need to find the correct calendar to send the schedule to. I would suggest creating a new calendar first, to keep things clean.
Run the list_calendars script
python list_calendars.py
From the table listed, copy the Id of your calendar you want to use and save it in the .env file as CALENDAR_ID
Once we have all the IDs in place, run main.py
python main.py