Aiotrenergy
Asyncio library for interacting with the Trenergy API.
Installation
pip install aiotrenergy
Usage
from aiotrenergy import TrenergyClient
from aiotrenergy.enums import ConsumptionType
client = TrenergyClient("your_api_key", "https://nile-core.tr.energy/api/consumers") # default url is https://core.tr.energy/api/
# Show account information
account = await client.account.show()
print(account)
# Transit wallets usage (https://tr.energy/ru/consumers/faq//#faq10)
consumer_create_response = await client.consumers.create(
15,
"TY3dRk4eQ75dCrW7tUcCzggU9rnz4V111",
False,
ConsumptionType.STATIC,
200000,
"test"
)
await client.consumers.activate(consumer_create_response.data.id)
To do
Fixes
client.consumers.toggle_auto_renewal returns 422 with no error message... (on params -> True, [54])
Tests
Docs
Release files for aiotrenergy 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiotrenergy-0.0.9.tar.gz | 9.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiotrenergy-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.8 kB
Release files / aiotrenergy-0.0.9.tar.gz
| Download URL | aiotrenergy-0.0.9.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5be19af44a6436ea81a8b94ab4048582a4113b198d33bcf49e00455fcaf11dc4
|
|
BLAKE2b-256 checksum How to use checksums |
43bd55f6f635e3e149f51d2fe8033640cc7e60e8745e0e714e604cd8307a63b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.11 Windows/10
|
Release files / aiotrenergy-0.0.9-py3-none-any.whl
| Download URL | aiotrenergy-0.0.9-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04a3e27cd711ee1d9e379b9e55f4abd5e6d6742cf9c9d64df86b5895ba79b621
|
|
BLAKE2b-256 checksum How to use checksums |
a169e47a63dbd7d4eef051e96c57f5ca1629765f46d4070cd55565c781425f54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.11 Windows/10
|