Metadata-Version: 2.1
Name: caruna-plus-cli
Version: 0.0.4a0
Summary: Caruna Plus API library and CLI
Home-page: https://github.com/TimotheosOfLifeHill/Caruna-Plus-Client
Author: TimotheosOfLifeHill
Author-email: timo.elovaara@gmail.com
License: MIT license
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4==4.12.3
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: requests>=2.28.1
Requires-Dist: soupsieve==2.5
Requires-Dist: urllib3==1.26.5
Requires-Dist: cachetools>=5.3.3
Requires-Dist: groupby>=0.1.0
Requires-Dist: keyring>=23.0.1

# Caruna Plus Client

## Overview

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate/?hosted_button_id=92TWRV5CY5NG6)
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/TimotheosOfLifeHill)

Caruna Plus is a service provided by Caruna, a Finnish electricity distribution company. The service offers customers access to detailed information about their electricity consumption, contracts, and other related data through an online portal and API. The Caruna Plus Client project in your workspace is designed to interact with the Caruna Plus API, allowing users to retrieve and manage their electricity data programmatically.

## How to install and use

Install from [pypi](https://pypi.org/project/caruna-plus-cli/) and run: 
```sh
pip install caruna-plus-cli
caruna-plus-cli
```

Then just enter you Caruna Plus credentials and start entering commands.

Tip: in order to list all the commands within the CLI, enter `?`

### Available functions

| Function name                 | What it does |
|-------------------------------|--------------|
| get_api_access_token          | Get the access token to the Oma Helen API. With the token, you can make manual curl requests to the API |

### Installing from sources and running the project for local development

First clone this repo.

Use virtual env to keep the project isolated. Developed using Python 3.9.9

1. In the project root folder run `python -m venv .venv`
2. Activate the venv with `source .venv/bin/activate`
3. Install requirements `pip install -r requirements.txt`
4. Launch the CLI as a python module `python -m carunaservice.cli`
5. Enter your username and password as they are prompted
6. Type `?` into the CLI prompt to see all available functions

Deactivate venv when not needed: `deactivate`

## Thanks and relatad

This project, **Caruna Plus Client**, is built upon work from the following repositories and projects:

- **[oma-helen-cli](https://github.com/carohauta/oma-helen-cli)**: An interactive CLI that logs into Oma Helen and offers functions to get contract data or electricity measurement data in JSON format.
- **[pycaruna](https://github.com/kimmolinna/pycaruna)**: Caruna API for Python.
- **[Caruna API client in Go](https://github.com/braincow/gocaruna)**: Go library for interfacing with Caruna API

I appreciate the work of the contributors and maintainers of these projects, as their efforts provided the foundation for my work.

## Attribution

This project uses code, ideas, or assets from the aforementioned repositories under the terms of their respective licenses:

1. **[oma-helen-cli](https://github.com/carohauta/oma-helen-cli)**
   - License: [MIT] ([View License](https://github.com/carohauta/oma-helen-cli?tab=MIT-1-ov-file))

2. **[pycaruna](https://github.com/kimmolinna/pycaruna)**
   - License: [MIT] ([View License](https://github.com/kimmolinna/pycaruna?tab=MIT-1-ov-file))

3. **[gocaruna](https://github.com/braincow/gocaruna)**
   - License: [MIT] ([View License](https://github.com/braincow/gocaruna?tab=MIT-1-ov-file))
  
## License

This project is licensed under the [MIT](./LICENSE) license. See the LICENSE file for details.

When using this project, you are also bound by the terms of the licenses of the referenced repositories and projects. Please ensure compliance with their requirements.

## Acknowledgments

 If you have questions or concerns regarding the usage of code from other repositories, please [contact us](mailto:your-email@example.com).
