This project contains a Python script designed to automate attendance recording for a My BeCode platform. The script utilizes the BeCode API to record attendance based on a predefined schedule and the student's current location (at home or on-site).
-
Automatic Attendance Recording: The script automates the process of recording attendance at specified times of the day, considering whether the student is at home or on-site.
-
Customizable Schedule: The script allows you to configure the schedule for attendance recording, taking into account specific days of the week and time periods.
-
Location-Based Recording: Attendance is recorded differently depending on whether the student is at home or on-site, ensuring accurate tracking.
This project includes a GitHub Actions workflow that triggers the script based on a schedule defined in the workflow configuration. The workflow runs the script, records attendance, and logs the results.
To use this script make a fork of this repository. In order to authenticate with the BeCode API, you need to provide your personal access token for the BeCode platform as a secret in your GitHub repository settings. The script will use this token for authentication when making API requests. You can find your personal access token at mybecode --> inspect --> network --> fetch/xhr --> name (graph.becode.org) --> headers (request headers) --> authorization. Copy your personal access token and paste it into the Value field in the workflow configuration, using this Tutorial. Give a name to your secret "TOKEN". The script will use this token for authentication when making API requests. You are set! The script will run automatically according to the schedule you defined in the workflow configuration.
Voilà.
This script depends on the following Python libraries:
requests
: Used for making HTTP requests to the BeCode API.enum
: Used to define constants for attendance time periods.datetime
: Used for working with date and time values.os
: Used for accessing environment variables.logging
: Used for generating log files for script execution.
This project was finished on September 29, 2023.
The project was made by Junior AI & Data Engineers:
Andreia Heringer Negreira: LinkedIn, GitHub
Mykola Senko: LinkedIn, GitHub
This project is under GNU General Piblic License which allows to make modification to the code and use it for commercial purposes.
Gent, Belgium September 29, 2023