PyBMKG


NamePyBMKG JSON
Version 3.0.1 PyPI version JSON
download
home_pagehttps://github.com/kiraware/PyBMKG
SummaryPython BMKG API Wrapper
upload_time2025-01-02 05:27:17
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 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](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/57/35/8645bf509da1c669923e00d33ad3dfd2d939b33763a5d6bd293507332f6f/pybmkg-3.0.1.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 Earthquake, WeatherForecast\n\nasync def main():\n    async with Earthquake() as earthquake:\n        latest_earthquake = await earthquake.get_latest_earthquake()\n        strong_earthquake = await earthquake.get_strong_earthquake()\n        felt_earthquake = await earthquake.get_felt_earthquake()\n\n        print(f\"Latest Earthquakes: {latest_earthquake}\")\n        print(f\"Strong Earthquakes: {strong_earthquake}\")\n        print(f\"Felt Earthquakes: {felt_earthquake}\")\n\n    async with WeatherForecast() as weather_forecast:\n        weather_forecast = await weather_forecast.get_weather_forecast(\"11.01.01.2001\")\n        print(f\"Weather Forecast: {weather_forecast}\")\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": "3.0.1",
    "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": "9183808e3bc7b9785caa39b1253114fa78c76be4c8da05031021e093cec06377",
                "md5": "f3828ee857b7f4def7281eb900eb8a51",
                "sha256": "c795fabf52c3412fabdc78982ce9b31f3194ae6f30448279a9043219c507f63a"
            },
            "downloads": -1,
            "filename": "pybmkg-3.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f3828ee857b7f4def7281eb900eb8a51",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 18741,
            "upload_time": "2025-01-02T05:27:15",
            "upload_time_iso_8601": "2025-01-02T05:27:15.454489Z",
            "url": "https://files.pythonhosted.org/packages/91/83/808e3bc7b9785caa39b1253114fa78c76be4c8da05031021e093cec06377/pybmkg-3.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57358645bf509da1c669923e00d33ad3dfd2d939b33763a5d6bd293507332f6f",
                "md5": "9213396493b782d9c27ed6d93c2b2a4c",
                "sha256": "bb27e3098917161bf0c4aeb19acb0144053b2714be32dfaa9dfa6e519b9dae31"
            },
            "downloads": -1,
            "filename": "pybmkg-3.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9213396493b782d9c27ed6d93c2b2a4c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 12076,
            "upload_time": "2025-01-02T05:27:17",
            "upload_time_iso_8601": "2025-01-02T05:27:17.819244Z",
            "url": "https://files.pythonhosted.org/packages/57/35/8645bf509da1c669923e00d33ad3dfd2d939b33763a5d6bd293507332f6f/pybmkg-3.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-02 05:27:17",
    "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: 0.35187s