PyBMKG


NamePyBMKG JSON
Version 2.1.0 PyPI version JSON
download
home_pagehttps://github.com/kiraware/PyBMKG
SummaryPython BMKG API Wrapper
upload_time2024-07-16 02:13:45
maintainerKira
docs_urlNone
authorKira
requires_python<4.0,>=3.11
licenseMIT
keywords bmkg api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyBMKG

[![Test](https://github.com/kiraware/PyBMKG/workflows/Test/badge.svg)](https://github.com/kiraware/PyBMKG/actions/workflows/test.yml)
[![CodeQL](https://github.com/kiraware/PyBMKG/workflows/CodeQL/badge.svg)](https://github.com/kiraware/PyBMKG/actions/workflows/codeql.yml)
[![Docs](https://readthedocs.org/projects/pybmkg/badge/?version=latest)](https://pybmkg.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/kiraware/PyBMKG/graph/badge.svg?token=MN6AXAHO0P)](https://codecov.io/gh/kiraware/PyBMKG)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![pypi](https://img.shields.io/pypi/v/PyBMKG.svg)](https://pypi.org/project/PyBMKG/)
[![python](https://img.shields.io/pypi/pyversions/PyBMKG.svg)](https://pypi.org/project/PyBMKG/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/license/MIT)

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](https://bmkg.go.id/)), this project aims to streamline
access to crucial meteorological and seismic data.

## Key Features

- **Asynchronous Operations:** Utilizes `asyncio` and `aiohttp` for efficient API requests.
- **Data Schema:** Built with Python's `dataclass` for clear and structured data representation.
- **Comprehensive Documentation:** Explore detailed [documentation](https://pybmkg.readthedocs.io/en/latest/) for seamless integration and usage.

## Installation

```bash
pip install PyBMKG
```

## Usage

```python
import asyncio

from bmkg import BMKG
from bmkg.enums import Province

async def main():
    async with BMKG() as bmkg:
        weather_forecast = await bmkg.weather_forecast.get_weather_forecast(Province.ACEH)
        latest_earthquake = await bmkg.earthquake.get_latest_earthquake()
        strong_earthquake = await bmkg.earthquake.get_strong_earthquake()
        felt_earthquake = await bmkg.earthquake.get_felt_earthquake()

        print(f"Weather Forecast: {weather_forecast}")
        print(f"Latest Earthquakes: {latest_earthquake}")
        print(f"Strong Earthquakes: {strong_earthquake}")
        print(f"Felt Earthquakes: {felt_earthquake}")

asyncio.run(main())
```

## Docs

You can start reading the documentation [here](https://pybmkg.readthedocs.io/en/latest/).

## Contributing

We welcome contributions to enhance PyBMKG! Please review our
[contributing guidelines](https://pybmkg.readthedocs.io/en/latest/how-to-guides/#contributing)
before getting started.

## Acknowledgements

We would like to thank the Meteorology, Climatology
and Geophysics Agency (BMKG) for its [open data service](https://data.bmkg.go.id/)
on weather forecasts and latest earthquake information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kiraware/PyBMKG",
    "name": "PyBMKG",
    "maintainer": "Kira",
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": "kiraware@github.com",
    "keywords": "bmkg, api",
    "author": "Kira",
    "author_email": "kiraware@github.com",
    "download_url": "https://files.pythonhosted.org/packages/90/1f/f70a8e9d7e0ecd6c42f4f8a04f8fac7bb8c2bf40c67a5735f1778cb46bfe/pybmkg-2.1.0.tar.gz",
    "platform": null,
    "description": "# PyBMKG\n\n[![Test](https://github.com/kiraware/PyBMKG/workflows/Test/badge.svg)](https://github.com/kiraware/PyBMKG/actions/workflows/test.yml)\n[![CodeQL](https://github.com/kiraware/PyBMKG/workflows/CodeQL/badge.svg)](https://github.com/kiraware/PyBMKG/actions/workflows/codeql.yml)\n[![Docs](https://readthedocs.org/projects/pybmkg/badge/?version=latest)](https://pybmkg.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/kiraware/PyBMKG/graph/badge.svg?token=MN6AXAHO0P)](https://codecov.io/gh/kiraware/PyBMKG)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![pypi](https://img.shields.io/pypi/v/PyBMKG.svg)](https://pypi.org/project/PyBMKG/)\n[![python](https://img.shields.io/pypi/pyversions/PyBMKG.svg)](https://pypi.org/project/PyBMKG/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/license/MIT)\n\nPyBMKG is an asynchronous Python API wrapper designed to harness the power of BMKG's open data\non weather forecasts and earthquake information in Indonesia. Powered by the Meteorology,\nClimatology, and Geophysics Agency ([BMKG](https://bmkg.go.id/)), this project aims to streamline\naccess to crucial meteorological and seismic data.\n\n## Key Features\n\n- **Asynchronous Operations:** Utilizes `asyncio` and `aiohttp` for efficient API requests.\n- **Data Schema:** Built with Python's `dataclass` for clear and structured data representation.\n- **Comprehensive Documentation:** Explore detailed [documentation](https://pybmkg.readthedocs.io/en/latest/) for seamless integration and usage.\n\n## Installation\n\n```bash\npip install PyBMKG\n```\n\n## Usage\n\n```python\nimport asyncio\n\nfrom bmkg import BMKG\nfrom bmkg.enums import Province\n\nasync def main():\n    async with BMKG() as bmkg:\n        weather_forecast = await bmkg.weather_forecast.get_weather_forecast(Province.ACEH)\n        latest_earthquake = await bmkg.earthquake.get_latest_earthquake()\n        strong_earthquake = await bmkg.earthquake.get_strong_earthquake()\n        felt_earthquake = await bmkg.earthquake.get_felt_earthquake()\n\n        print(f\"Weather Forecast: {weather_forecast}\")\n        print(f\"Latest Earthquakes: {latest_earthquake}\")\n        print(f\"Strong Earthquakes: {strong_earthquake}\")\n        print(f\"Felt Earthquakes: {felt_earthquake}\")\n\nasyncio.run(main())\n```\n\n## Docs\n\nYou can start reading the documentation [here](https://pybmkg.readthedocs.io/en/latest/).\n\n## Contributing\n\nWe welcome contributions to enhance PyBMKG! Please review our\n[contributing guidelines](https://pybmkg.readthedocs.io/en/latest/how-to-guides/#contributing)\nbefore getting started.\n\n## Acknowledgements\n\nWe would like to thank the Meteorology, Climatology\nand Geophysics Agency (BMKG) for its [open data service](https://data.bmkg.go.id/)\non weather forecasts and latest earthquake information.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python BMKG API Wrapper",
    "version": "2.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/kiraware/PyBMKG/issues",
        "Documentation": "https://pybmkg.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/kiraware/PyBMKG",
        "Repository": "https://github.com/kiraware/PyBMKG"
    },
    "split_keywords": [
        "bmkg",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b44ea9f303d86205f5c52e67ae24ff3e60390fe465e3d6ce1c40ed23e04feee",
                "md5": "72a68574e7fb97a5305310ad4a2793ed",
                "sha256": "cb25338042a5938aec2260cef7ac8f7c9947af99309c047c4c0e97eace56b18b"
            },
            "downloads": -1,
            "filename": "pybmkg-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72a68574e7fb97a5305310ad4a2793ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 32471,
            "upload_time": "2024-07-16T02:13:43",
            "upload_time_iso_8601": "2024-07-16T02:13:43.917398Z",
            "url": "https://files.pythonhosted.org/packages/4b/44/ea9f303d86205f5c52e67ae24ff3e60390fe465e3d6ce1c40ed23e04feee/pybmkg-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "901ff70a8e9d7e0ecd6c42f4f8a04f8fac7bb8c2bf40c67a5735f1778cb46bfe",
                "md5": "b2fdeb446e4432182eea1da63df30c8c",
                "sha256": "baf66967b40c6a696b997c2fe065b26b6e57d29aff17dae45ba43b6011082241"
            },
            "downloads": -1,
            "filename": "pybmkg-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b2fdeb446e4432182eea1da63df30c8c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 17726,
            "upload_time": "2024-07-16T02:13:45",
            "upload_time_iso_8601": "2024-07-16T02:13:45.526355Z",
            "url": "https://files.pythonhosted.org/packages/90/1f/f70a8e9d7e0ecd6c42f4f8a04f8fac7bb8c2bf40c67a5735f1778cb46bfe/pybmkg-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-16 02:13:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kiraware",
    "github_project": "PyBMKG",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pybmkg"
}
        
Elapsed time: 1.08028s