Unofficial BMKG API Python Wrapper.
Project description
bmkg
Unofficial Python wrapper for the BMKG (Meteorology, Climatology, and Geophysical Agency) API.
Installation
$ pip install bmkg
Importing
from bmkg import BMKG
Usage
P.S: wrap this example in an async function!
# initiate the class
bmkg = BMKG()
# get history of the latest earthquakes
earthquakes = await bmkg.get_recent_earthquakes()
for earthquake in earthquakes:
print(earthquake)
# get wind forecast image
image = await bmkg.get_wind_forecast()
with open("wind-forecast.jpg", "wb") as f:
f.write(image)
f.close()
# close the class once done
await bmkg.close()
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
bmkg-0.1.0.tar.gz
(5.5 kB
view hashes)