Python wrapper for Indian CoWin APIhttps://apisetu.gov.in/public/marketplace/api/cowin/cowin-public-v2
Project description
Basic Cowin API
Python API wrapper for CoWin API, for details visit https://apisetu.gov.in/public/marketplace/api/cowin/cowin-public-v2
Basic Example:
from cowin_api import CoWin
cw = CoWin()
# Returns the details of states
result = cw.get_state_list()
print(result)
# Returns the details of districts for a given state
# in this case with state_id 2
result = cw.get_districts_list(2)
print(result)
# Returns the details of districts for a given state with
# open slots for age group 45 and free payment for vaccination.
result = cw.check_by_district_id(district=651, age=45, payment="free")
print(result)
# Returns the details of slots available in area with
# pincode 462003
result = cw.check_by_pincode(462003)
print(result)
# Returns the details of slots available in area with
# district id 650 -> obtained from `get_districts_list`
result = cw.check_by_district_id(650)
print(result)
Install
pip install basic_cowin_api
Notes:
- The API's of CoWin MAY NOT work from servers outside of India.
- Payment Options are:
any
,free
andpaid
. - Age Options are:
18
and45
Roadmap:
- Add a filter to search by age group of 18-45 and 45+
- Add a filter for free and paid vaccine
- Search for multiple pin codes
- Search for multiple districts
- Add a filter based of vaccine
- Implement test cases
License:
GNU 3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
basic_cowin_api-0.0.201.tar.gz
(15.6 kB
view details)
File details
Details for the file basic_cowin_api-0.0.201.tar.gz
.
File metadata
- Download URL: basic_cowin_api-0.0.201.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c265c2a82d49d2fb5c3693561074c4743ebfd131a8ff77df74b55936dad0f49b |
|
MD5 | 689e2c5f5052b813dc802f273648dc3a |
|
BLAKE2b-256 | 0344f113daa490c56f297d4b56c48f4bb28244e15fc62fb739be407b5d8293f7 |