๐ Changes: Updated Co-WIN portal API as per the Co-WIN API reference. If you are already using codebase, please fetch the latest changes.
This project developed for tracking COVID-19 vaccine slots available in your pincode and district for 18+ age category. Once available, it will send email notifications at periodic interval to subscribers until slots are available.
Note: The purpose of this project is help humanity in this covid crisis, where people can get vaccination slots easily and save their time.
- Python 3.6+
- Clone this project, open terminal under
/app
folder. - Install the Python packages
python -m pip install -r requirements.txt
OR
pip install -r requirements.txt
- Configure sender's Email credentials - Create
/app/config.json
file for configurations.
Note: This email credentials will be used to send email notification to subscribers. You may need to have App passwords or "Less secure app access" turned on.
{
"email": "[email protected]",
"password": "YourSUPER@secretP@ssw0rd-Here",
"logLevel": "INFO"
}
- Start the Uvicorn server
python -m uvicorn main:app --port 8000
OR
uvicorn main:app --port 8000
- Your API server Started ๐
INFO: Started server process [8408]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
- Navigate to Swagger UI docs - http://localhost:8000/api/docs
This is the place you can manage subscribers list and much more...
- To subscribe yourself to a particular pincode, hit the second enpoint
/api/subscribe/pincode
and enter your email-address and pincode to be checked.
{
"email": "[email protected]",
"pincode": "367005"
}
- You are done, sit back and relax, you will recieve email notification once slots are available โกโก
Example screenshot attached.
- Make sure API server is running.
- One can subscribe to district via
/api/subscribe/district
and enter your email-address and district_id as:
{
"email": "[email protected]",
"district_id": "154"
}
- You can find your
district_id
by referring link
- One can unsubscribe via POST:
/api/unsubscribe/reset
endpoint, resulting in removal of all subscribers.
- Developed with Fast API๐
- Subscribe via District and Pincode, periodically polled to fetch available slots.
- Incase of errors, it is logged in separate logger file.