Skip to main content

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 and paid.
  • Age Options are: 18 and 45

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

Metadata

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)

Source distribution for basic-cowin-api 0.0.201
File Size Uploaded Provenance Actions
basic_cowin_api-0.0.201.tar.gz 15.6 kB Without provenance Details for basic_cowin_api-0.0.201.tar.gz

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

Security for basic-cowin-api 0.0.201

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page