aoirint_jmapy
Unofficial JMA weather forecast API wrapper in Python
気象庁天気予報データの非公式Pythonラッパー
2022-05-27時点のAPIに対応
pip3 install aoirint_jmapy
東京都 東京地方のデータを見る例
from aoirint_jmapy import JmaApi
jmaApi = JmaApi()
# 東京都
forecast = jmaApi.forecast(area_id='130000')
print(forecast)
## 東京地方
print(forecast[0])
### 3日間予報
print(forecast[0].timeSeries[0])
### 週間予報
print(forecast[0].timeSeries[1])
### 3日間天気概況
overview_forecast = jmaApi.overview_forecast(area_id='130000')
print(overview_forecast.text)
### 週間天気概況
overview_week = jmaApi.overview_week(area_id='130000')
print(overview_week.text)
area_idを調べる
# エリアリスト
area = jmaApi.area()
## センターリスト(気象台リスト)
print(area.centers)
### 北海道地方: center_id=010100
#### 宗谷地方: area_id=011000
#### 上川・留萌地方: area_id=012000
print(area.centers['010100'])
### 関東甲信地方: center_id=010300
#### 東京都: area_id=130000
#### 神奈川県: area_id=140000
print(area.centers['010300'])
Development
Environment
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
Lock dependencies
pip3 install pip-tools
pip-compile requirements.in
pip-compile requirements.test.in
Test
# Download some JMA API response for test
./get_testdata.sh
pip3 install -r requirements.test.txt
mypy aoirint_jmapy/
pytest tests/
Release
GitHub Releaseを作成するとGitHub Actionsにより自動でPyPIにリリースされる。
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aoirint_jmapy-20220527.3.tar.gz.
File metadata
- Download URL: aoirint_jmapy-20220527.3.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c79abac5df5b7a49e42148a613edb089899aaff1adf3f5b37185b3d1c1ce0442
|
|
| MD5 |
4d93f3dac2171c3492fbbfb826735e6d
|
|
| BLAKE2b-256 |
ea800cba6063d3dfc74e0cf3391ff40182073c768bc9e4192b0945111de307db
|
File details
Details for the file aoirint_jmapy-20220527.3-py3-none-any.whl.
File metadata
- Download URL: aoirint_jmapy-20220527.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37dfe197a11ee31e8aae9fb335838b432811b29315c33349635a57a670712f79
|
|
| MD5 |
a970ff81c122ad524a627d0a172b6900
|
|
| BLAKE2b-256 |
655c6ed2bfc97707dea4f8e155d8e84c73b94ab05e24f277e713395221d5a8fc
|