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.4.tar.gz (12.7 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.4-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aiotrenergy-0.0.4.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Windows/11

File hashes

Hashes for aiotrenergy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b53279dd091970244405dd44e9ad11a7c9031b9d73d40fea627a41b97a9aba3d
MD5 83c167dec69faf6f050d1e467bec125c
BLAKE2b-256 c3baa338d88f6793554004af92f964370751a76b982ba18d2c6728b608ae15b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiotrenergy-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Windows/11

File hashes

Hashes for aiotrenergy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 75c2f9d707cd20af40cc5555afa9bca2029a24b0648343b1d64d38010f01b50a
MD5 c2db9e5fc04277ce1a1f8adfc9791b64
BLAKE2b-256 2420727e7413d84507b32af4f2f3be62e1ae34469dc570c341c239a43ffb68a6

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