Skip to main content

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


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.8.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

aiotrenergy-0.0.8-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file aiotrenergy-0.0.8.tar.gz.

File metadata

  • Download URL: aiotrenergy-0.0.8.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.11 Windows/10

File hashes

Hashes for aiotrenergy-0.0.8.tar.gz
Algorithm Hash digest
SHA256 9404d227f1883c4853d2518d168b1244361e94310be58f8d212b83d425fd5431
MD5 71c81f1f1fc81240887c3cce36ff1811
BLAKE2b-256 366c0a0b25dee1408fcfca35e5cd17a55a37e05b9cbdde8e1066f46892b8ec6c

See more details on using hashes here.

File details

Details for the file aiotrenergy-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: aiotrenergy-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.11 Windows/10

File hashes

Hashes for aiotrenergy-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 88b2feec27a3216e1e72462e332f554bf35a531722bba93a7746006523b6b0f4
MD5 4b18e0d2667efdd1c7a3371b8049cbe4
BLAKE2b-256 e5c32fad8b61f122dc064a7e493a10dc5e2ccf505ed3b38bc27bc4e95cf8ca56

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