Skip to content

Python wrapper for COWIN API. Classes for Co-WIN Public APIs, Co-WIN Protected APIs, Co-Win Vaccinator APIs and utilities for SHA256 hashing of the OTP.

Notifications You must be signed in to change notification settings

NiD27/pyCowinAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python wrapper for the COWIN API.

  • Please refer the official website - https://apisetu.gov.in/public/api/cowin/cowin-public-v2 for API rules, limitations, official documentation and schemas.
  • Sandbox api-key provided by the official website is used by default, refer official website to obtain your own api-key.
  • This library is under development and certain features may be unstable, stay updated with the latest version.

Classes

The official documentation of the api has been categorized into:

  • Co-WIN Public APIs
  • Co-WIN Protected APIs
  • Co-WIN Vaccinator APIs

USAGE

  • Requirements
pip install -r requirements.txt
  • Co-WIN Public APIs
from cowinApi import cowinPublicApi
obj = cowinPublicApi()
#FOR PRODUCTION URL AND API-KEY
from cowinApi import cowinPublicApi
obj = cowinPublicApi(production = True, api_key_production = "INSERT_API_KEY_HERE")
  • Co-WIN Protected APIs
#FOR SANDBOX URL AND API-KEY
from cowinApi import cowinProtectedApi
obj = cowinProtectedApi()
#FOR PRODUCTION URL AND API-KEY
from cowinApi import cowinProtectedApi
obj = cowinProtectedApi(production = True, api_key_production = "INSERT_API_KEY_HERE")
  • Co-WIN Vaccinator APIs
#FOR SANDBOX URL AND API-KEY
from cowinApi import cowinVaccinatorApi
obj = cowinVaccinatorApi()
#FOR PRODUCTION URL AND API-KEY
from cowinApi import cowinVaccinatorApi
obj = cowinVaccinatorApi(production = True, api_key_production = "INSERT_API_KEY_HERE")

ROADMAP

  • Fake User Agent implementation.
  • Rate limiting/monitoring.
  • Request timeouts.
  • Testing and stabalization of unstable functions.
  • ASYNCIO version.

DISCLAIMER

  • I am in no way affiliated with COWIN API.
  • Use this library at your own risk, I or any contributors to this library are not responsible for any damages caused.