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,freeandpaid. - Age Options are:
18and45
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
Release files for basic-cowin-api 0.0.201
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| basic_cowin_api-0.0.201.tar.gz | 15.6 kB | Details |
Release files / basic_cowin_api-0.0.201.tar.gz
| Download URL | basic_cowin_api-0.0.201.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c265c2a82d49d2fb5c3693561074c4743ebfd131a8ff77df74b55936dad0f49b
|
|
BLAKE2b-256 checksum How to use checksums |
0344f113daa490c56f297d4b56c48f4bb28244e15fc62fb739be407b5d8293f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|