Metadata-Version: 2.4
Name: mykurve
Version: 0.0.5
Summary: Unofficial library to retrieve details of mykurve.com account
License: Apache-2.0
License-File: LICENSE
Author: Dario Budimir
Author-email: dario.budimir@gmail.com
Maintainer: Dario Budimir
Maintainer-email: dario.budimir@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: attr (>=0.3.2,<0.4.0)
Requires-Dist: httpx (>=0.27.0,<0.28.0)
Requires-Dist: pyotp (>=2.9.0,<3.0.0)
Project-URL: Documentation, https://github.com/ddB0515/mykurve
Project-URL: Homepage, https://ddb0515.github.io/mykurve
Project-URL: Repository, https://github.com/ddB0515/mykurve
Description-Content-Type: text/markdown

# 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
- If your account has 2FA enabled, pass either `mfa_code` (a code you already
  generated) or `mfa_secret` (the base32 secret from the QR code shown during 2FA
  setup) to `get_token()`. With `mfa_secret`, the code is generated for you via TOTP.
  If 2FA is required and neither is passed, `get_token()` raises `MfaCodeRequired`.

### How to use 

```python
import asyncio

from mykurve import MyKurveApi
from mykurve.data_classes import TimeRange

userName = "<your_account>"
password = "your_password"
mfaSecret = "<your_2fa_secret>"  # only needed if 2FA is enabled

async def main():
    api = MyKurveApi()

    token = await api.get_token(userName, password, mfa_secret=mfaSecret)
    print(token)

    account = await api.get_accounts(token.access_token)
    print(account)

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

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

    dashboard = await api.get_consumption_graph(token.access_token, account.accounts[0].accountNumber, TimeRange.DAY, 0)
    print(dashboard)


if __name__ == "__main__":
    asyncio.run(main())
```

If you like what I'm doing please support me <br/>
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/ddb0515)
