Skip to main content

Unofficial library to retrieve details of mykurve.com account

Project description

mykurve library

Unofficial async library to retrieve details of https://api.mykurve.com/ or https://www.mykurve.com/ account This was done for personal project but feel free to use on your own risk

Hope will be useful to someone and if there is any issues (what I think there is...) please open PR or issue will try to help/fix in mean time

Note

  • This will work only if you don't have 2FA enabled (2FA is still NOT supported)

TODO:

  • handle 2FA

How to use

import asyncio

from mykurve import MyKurveApi
from mykurve.data_classes import TimeRange

userName = "<your_account>"
password = "your_password"

async def main():
    api = MyKurveApi()
    
    # Get token
    token = api.get_token(userName, password)
    print(token)

    # Get account
    account = api.get_accounts(token.access_token)
    print(account)

    # Get account info
    account_info = api.get_account_info(token.access_token, account.accounts[0].accountNumber)
    print(account_info)

    # Get dashboard
    dashboard = api.get_dashboard(token.access_token, account.accounts[0].accountNumber)
    print(dashboard)

    #Get consumption hraph data
    dashboard = api.get_consumption_graph(token.access_token, account.accounts[0].accountNumber, TimeRange.DAY, 0)
    print(dashboard)


if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    try:
        loop.run_until_complete(main())
    except KeyboardInterrupt:
        pass
    finally:
        loop.close()

If you like what I'm doing please support me
"Buy Me A Coffee"

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

mykurve-0.0.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

mykurve-0.0.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file mykurve-0.0.1.tar.gz.

File metadata

  • Download URL: mykurve-0.0.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mykurve-0.0.1.tar.gz
Algorithm Hash digest
SHA256 12b1e82960a00d572134bee918caa4fa81941a0cc15d05c28aea36c426c5dcdf
MD5 6f44b9628d24c6c99dcf589c473ed212
BLAKE2b-256 4aa5c6cc9b23b8be040f7b08b68100a82fd1fa16dbac33c3ea6ca5c27c546fb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mykurve-0.0.1.tar.gz:

Publisher: release.yml on ddB0515/mykurve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mykurve-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mykurve-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mykurve-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f62219f47614596fcec05ddb19ad67477aa08d6265273024c6fc34abf5708fc6
MD5 6cc5e74eb7b8e5593501087c1e677851
BLAKE2b-256 57ef7598fa6c8eed4eae195b3e3be0ae13145ccd2f25c5bf3ac2a2b64d6bf4fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for mykurve-0.0.1-py3-none-any.whl:

Publisher: release.yml on ddB0515/mykurve

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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