Coder Social home page Coder Social logo

eskom-se-push-calendar's Introduction

This tool/scripts are used to pull EskomSePush data and push events to your selected calendar.

Prerequisites

EskomSePush API Key

Google Calendar API

  • 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.

For Personal or Internal Use

Go to the Google Cloud Console.

  • 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.

Preparing for Verification

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.

During Development

Add Test Users:

  • 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.

Reduce Scopes:

  • 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.

Install Required Libraries

pip install -f requirements.txt

Configure .env file

  • add EskomSePush API Key as LICENSE_KEY
  • add Google credentials to "credentials.json"

Determine your location ID on EskomSePush

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

Lookup Calendar Id

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

eskom-se-push-calendar's People

Contributors

weekus avatar clschalkwyk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.