aioTaipit
A Python API for Taipit cloud meters.
Installation
Use pip to install the library:
pip install aiotaipit
Usage
from pprint import pprint
import requests
from pytaipit import SimpleTaipitAuth, TaipitApi
async def main(username: str, password: str) -> None:
"""Create the aiohttp session and run the example."""
with requests.Session() as session:
auth = SimpleTaipitAuth(username, password, session)
api = TaipitApi(auth)
meters = api.get_meters()
pprint(meters)
if __name__ == "__main__":
_username = "<YOUR_USER_NAME>"
_password = "<YOUR_PASSWORD>"
main(_username, _password)
The SimpleTaipitAuth client also accept custom client ID and secret (this can be found by sniffing the client).
This will return a price object that looks a little like this:
[{'address': 'Санкт-Петербург, Ворошилова, 2',
'category': 0,
'ecometerdata': {'P_aver': 0.21986280758339,
'P_averSmall': 0.15261778589793,
'P_averSmall_': 109.88480584651,
'P_aver_': 158.30122146004,
'P_aver_TF1': False,
'P_aver_TF2': False,
'P_aver_TF31': False,
'P_aver_TF32': False,
'P_aver_TF33': False,
'P_norm': 0.0066666666666667,
'currentTS': 1671485359,
'ecoStatus': None,
'lastReading': {'energy_a': 1004.85,
'energy_t1_a': 794.45,
'energy_t2_a': 210.4,
'energy_t3_a': 0,
'ts_tz': 1671483628,
'value': 0.02},
'meterCategory': 0,
'time': 1671485359,
'timezone': 3,
'trend': -48.41641561353,
'trendTF1': False,
'trendTF2': False},
'id': 2147485997,
'isLowDataFreq': False,
'isOwner': False,
'isVirtual': 0,
'metername': 'НЕВА МТ 114 (Wi-Fi) (22001110)',
'owner': {'peopleNumber': None, 'type': 0, 'typeCode': 'person'},
'serialNumber': '22001110',
'usericopath': '/uploads/user/photo/3edba895933a54540fbdb88614f24f480a9eeb68.png',
'username': 'Компания Тайпит',
'waterHot': False},
{'address': 'Санкт-Петербург, Ворошилова, 2',
'category': 0,
'ecometerdata': {'P_aver': 0.25422232030182,
'P_averSmall': 0.2494024938596,
'P_averSmall_': 179.56979557891,
'P_aver_': 183.04007061731,
'P_aver_TF1': False,
'P_aver_TF2': False,
'P_aver_TF31': False,
'P_aver_TF32': False,
'P_aver_TF33': False,
'P_norm': 0,
'currentTS': 1671485359,
'ecoStatus': None,
'lastReading': {'energy_a': 11595.62,
'energy_t1_a': 10420.94,
'energy_t2_a': 1174.68,
'energy_t3_a': 0,
'ts_tz': 1671483641,
'value': 0},
'meterCategory': 0,
'time': 1671485359,
'timezone': 3,
'trend': -3.4702750384005,
'trendTF1': False,
'trendTF2': False},
'id': 2147485996,
'isLowDataFreq': False,
'isOwner': False,
'isVirtual': 0,
'metername': 'НЕВА МТ 114 (Wi-Fi) (22001114)',
'owner': {'peopleNumber': None, 'type': 0, 'typeCode': 'person'},
'serialNumber': '22001114',
'usericopath': '/uploads/user/photo/3edba895933a54540fbdb88614f24f480a9eeb68.png',
'username': 'Компания Тайпит',
'waterHot': False}]
Metadata
Release files for pytaipit 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytaipit-1.1.0.tar.gz | 26.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytaipit-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.7 kB
Release files / pytaipit-1.1.0.tar.gz
| Download URL | pytaipit-1.1.0.tar.gz |
|---|---|
| Size | 26.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
496f4327f59c327a5d4e01cd115998afbc842f3e572ba41167498a236a7002c6
|
|
BLAKE2b-256 checksum How to use checksums |
1415f349efbad903106526ee06b7935faaf8eb1c6582a224afab077b440afceb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / pytaipit-1.1.0-py3-none-any.whl
| Download URL | pytaipit-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23115aca923cedd6be85eeb0112483077105f700095a0cdba6f1cb6aa27ccd76
|
|
BLAKE2b-256 checksum How to use checksums |
3a47cc64e9670d9965a03937460c720a230e34f90ad38f86baf9e390823fbd3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Security for pytaipit 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.