Async python wrapper for tr.energy api
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiotrenergy-0.0.9.tar.gz
(9.6 kB
view details)
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 aiotrenergy-0.0.9.tar.gz.
File metadata
- Download URL: aiotrenergy-0.0.9.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5be19af44a6436ea81a8b94ab4048582a4113b198d33bcf49e00455fcaf11dc4
|
|
| MD5 |
34b687f5b16ed9bffd26adeab046eac2
|
|
| BLAKE2b-256 |
43bd55f6f635e3e149f51d2fe8033640cc7e60e8745e0e714e604cd8307a63b7
|
File details
Details for the file aiotrenergy-0.0.9-py3-none-any.whl.
File metadata
- Download URL: aiotrenergy-0.0.9-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04a3e27cd711ee1d9e379b9e55f4abd5e6d6742cf9c9d64df86b5895ba79b621
|
|
| MD5 |
d025f7feffcbb2ce32d368f8fa2af001
|
|
| BLAKE2b-256 |
a169e47a63dbd7d4eef051e96c57f5ca1629765f46d4070cd55565c781425f54
|