Skip to main content

Ondotori WebStorage API クライアント

Project description

ondotori-client

CI PyPI version License

概要

Ondotori WebStorage API(RTR500B/その他機種)を Python から簡単に操作するクライアントライブラリです。

インストール

pip install ondotori-client
# 開発用依存も入れるなら
pip install .[dev]

Quickstart

DataFrame 出力を使う場合

pip install ondotori-client[dataframe]

典型的な使い方

from ondotori_client.client import OndotoriClient, parse_current, parse_data
import pandas as pd

# — 設定ファイルを使う場合 —
client = OndotoriClient(config="config.example.json", device_type="rtr500", verbose=True)

# — 1. 現在値取得 —
data_cur = client.get_current("CrZnS1")
ts, temp, hum = parse_current(data_cur)
print(f"現在値: {ts}{temp}℃ / {hum}%")

# — 2. 過去指定期間のログ取得 —
res = client.get_data("CrZnS1", dt_from="2025-05-01T00:00:00", dt_to="2025-05-02T00:00:00")
times, temps, hums = parse_data(res)
df = pd.DataFrame({"time": times, "temp": temps, "hum": hums})
print(df.head())

# — 3. 直近300件ログ(または hours=1)を DataFrame で —
df_latest = client.get_data("CrZnS1", hours=1, as_df=True)
print(df_latest.tail())

# — 4. アラートログ取得 —
alerts = client.get_alerts("CrZnS1")
print(alerts)

License

MIT © Hiroki Tsusaka

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ondotori_client-0.2.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ondotori_client-0.2.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file ondotori_client-0.2.1.tar.gz.

File metadata

  • Download URL: ondotori_client-0.2.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for ondotori_client-0.2.1.tar.gz
Algorithm Hash digest
SHA256 312859f1344a414522c5383fe63fbe1d5f3fce5ec19c24ff68bb371609a8f798
MD5 b53e3e8740c18b56b93a3de760275f8c
BLAKE2b-256 5cddc59ed1e1958ff2d4140bc1851f985633d3e0efd4af5b444d6c7e72322019

See more details on using hashes here.

File details

Details for the file ondotori_client-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ondotori_client-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6fc678f35d2b30a2718bedbd2cd9a5c68c6ede4a0437f3b80834b8053e7d6f35
MD5 29bec1839bb21d790384a52f2340a0ae
BLAKE2b-256 01ce40dd608cea1cce53e4fec7bc732597a9671a06e9f5fdcd156fe6f630dab0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page