https://github.com/dontsovcmc/pyowencloud
Клиент к REST API облака api.owencloud.ru
https://github.com/dontsovcmc/pyowencloud
Last synced: 8 months ago
JSON representation
Клиент к REST API облака api.owencloud.ru
- Host: GitHub
- URL: https://github.com/dontsovcmc/pyowencloud
- Owner: dontsovcmc
- License: lgpl-3.0
- Created: 2019-12-28T12:06:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-17T16:18:58.000Z (over 6 years ago)
- Last Synced: 2025-07-09T06:03:34.025Z (12 months ago)
- Language: Python
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyowencloud
Неофициальный клиент к REST API облака https://owencloud.ru
(Официального не нашёл)
## Установка
pip install pyowencloud
## Пример
### Авторизация
```
cloud = OwenClient()
cloud.login(user, password)
```
### Получение устройства по его имени
```
termometer = cloud.devices(u'термометр')[0]
```
### Последнее значение параметра
```
# Получаем id параметра
temperature_id = cloud.parameters(termometer['id'], u'Температура')[0]
# Запрашиваем последнее значение с временной меткой
value, timestamp = cloud.last_value_with_dt(temperature_id)
```