Code Monkey home page Code Monkey logo

vaccinator's Introduction

Vaccinator

Hasta La Vista Corona

Vaccinator is a python script to find open slots for vaccination in India based on pincode (or multiple pincodes) or state and district. This script will recheck after every few minutes and as soon the slots open, inform you via

  • Beeping sound
  • Desktop notification
  • Email (optional)
  • Telegram Bot (optional)

Since India has started the vaccination drive for those above 18 years of age, there is a heavy rush and slots get booked soon. This script will come in handy for finding those slots as soon as they open.

Alt Text

Features

  • Search slots through multiple pincodes.
  • -w or --wizard option for noobs.
  • Recieve notifications through multiple channels.

Tech

Vaccinator requires Python3 to work and contains only two modules outside the standard python libray which are as follows:

  • plyer (2.0.0)
  • requests (2.25.1)

The data is retrieved using the open public APIs at API Setu. It works on both Linux and Windows.

Installation

Vaccinator requires Python3 and pip3 to run. To use the script, download it and install the dependencies using the following commands:

git clone https://github.com/vikas-kundu/vaccinator
cd vaccinator
pip3 install -r requirements.txt
python3 vaccinator.py -h

Updating

cd vaccinator
git pull

Build

You can build your own executables using the Pyinstaller module.

cd vaccinator
pip install pyinstaller
pyinstaller --hidden-import plyer.platforms.win.notification --onefile vaccinator.py

Your executable will now be present inside the dist folder.

Usage

Options:

-h, --help

Show help message and exit.

-p, --pincode

Pincode(s) to look for slots.

-a, --age

Age of the user(Default=18).

-d, --date

Date from which to start looking(Format=DD-MM-YYYY).

-w, --wizard

For calling using user friendly interface for beginners.

-e, --email

Email on which to notify when slots are available.

-s, --state

State in which to find open slots.

-t, --district

District of the state to find open slots.

-i, --interval

Interval in seconds after which to recheck the slots(Default=300) i.e. 5 minutes.

--port

Port of the SMTP server(Default=587)

--smtp-server

SMTP Server address to use for sending email.

--sender-email

Email of the sender to connect to SMTP server for sending email.

--sender-pass

Password of the sender to connect to SMTP server for sending email.

--bot-token

Token of the telegram bot to send messages.

--bot-chatid

Chat id of the telegram bot to send messages.

Examples:

python3 vaccinator.py -p 110003 -d 09-05-2021
python3 vaccinator.py -s haryana -d sonipat
python3 vaccinator.py -p 110003 -a 24 -e [email protected]
python3 vaccinator.py -p 110003 -a 24 -e [email protected] --smtp-server smtp.gmail.com --sender-email [email protected] --sender-pass my_gmail_password
python3 vaccinator.py -w 

See usage examples for more info.

License

MIT

Free Software, Hell Yeah!

vaccinator's People

Contributors

vikas-kundu avatar

Stargazers

 avatar Divya Goswami 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.