We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68e7459 commit 5b6925dCopy full SHA for 5b6925d
1 file changed
Covid-API-With-Python
@@ -0,0 +1,18 @@
1
+import requests
2
+
3
+state = 'Maharashtra'.lower()
4
+city = 'Mumbai'.lower()
5
+api_address = "https://api.covid19india.org/state_district_wise.json"
6
+json_data = requests.get(api_address).json()
7
+num=range(1,39)
8
9
+for n in num:
10
+ for state in num:
11
+ if city == json_data[state]['districtData'][n].lower():
12
+ formatted_json = json_data['state']['districtData'][n]['active']
13
+ state+=1
14
+ n+=1
15
+print(f"Active Case in {state} is {formatted_json}")
16
17
18
0 commit comments