PyBMKG
PyBMKG is an asynchronous Python API wrapper designed to harness the power of BMKG's open data on weather forecasts and earthquake information in Indonesia. Powered by the Meteorology, Climatology, and Geophysics Agency (BMKG), this project aims to streamline access to crucial meteorological and seismic data.
Key Features
- Asynchronous Operations: Utilizes
asyncioandaiohttpfor efficient API requests. - Data Schema: Built with Python's
dataclassfor clear and structured data representation. - Comprehensive Documentation: Explore detailed documentation for seamless integration and usage.
Installation
pip install PyBMKG
Usage
import asyncio
from bmkg import Earthquake, WeatherForecast
async def main():
async with Earthquake() as earthquake:
latest_earthquake = await earthquake.get_latest_earthquake()
strong_earthquake = await earthquake.get_strong_earthquake()
felt_earthquake = await earthquake.get_felt_earthquake()
print(f"Latest Earthquakes: {latest_earthquake}")
print(f"Strong Earthquakes: {strong_earthquake}")
print(f"Felt Earthquakes: {felt_earthquake}")
async with WeatherForecast() as weather_forecast:
weather_forecast = await weather_forecast.get_weather_forecast("11.01.01.2001")
print(f"Weather Forecast: {weather_forecast}")
asyncio.run(main())
Docs
You can start reading the documentation here.
Contributing
We welcome contributions to enhance PyBMKG! Please review our contributing guidelines before getting started.
Acknowledgements
We would like to thank the Meteorology, Climatology and Geophysics Agency (BMKG) for its open data service on weather forecasts and latest earthquake information.
Metadata
Release files for PyBMKG 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybmkg-3.0.1.tar.gz | 12.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybmkg-3.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.8 kB
Release files / pybmkg-3.0.1.tar.gz
| Download URL | pybmkg-3.0.1.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb27e3098917161bf0c4aeb19acb0144053b2714be32dfaa9dfa6e519b9dae31
|
|
BLAKE2b-256 checksum How to use checksums |
57358645bf509da1c669923e00d33ad3dfd2d939b33763a5d6bd293507332f6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
poetry/1.8.5 CPython/3.13.1 Linux/6.5.0-1025-azure
|
Release files / pybmkg-3.0.1-py3-none-any.whl
| Download URL | pybmkg-3.0.1-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c795fabf52c3412fabdc78982ce9b31f3194ae6f30448279a9043219c507f63a
|
|
BLAKE2b-256 checksum How to use checksums |
9183808e3bc7b9785caa39b1253114fa78c76be4c8da05031021e093cec06377
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
poetry/1.8.5 CPython/3.13.1 Linux/6.5.0-1025-azure
|