semvec/pypi-packages huggingface dataset:
pyolia 0.4.0
Async Python wrapper to interact with internal Veolia API
License: MIT
Requires Python: >=3.8.1,<4.0

<p align=center>
    <img src="https://upload.wikimedia.org/wikipedia/fi/thumb/2/2a/Veolia-logo.svg/250px-Veolia-logo.svg.png"/>
</p>

<p align=center>
    <a href="https://pypi.org/project/pyolia/"><img src="https://img.shields.io/pypi/v/pyolia.svg"/></a>
    <a href="https://github.com/tetienne/python-veolia-api/actions"><img src="https://github.com/tetienne/python-veolia-api/workflows/CI/badge.svg"/></a>
    <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" /></a>
</p>

Small client to retrieve the water consumption from Veolia website: https://www.eau-services.com

## Remarks
Veolia publishes water consumption with a delay of 3 days. It  means if we are the 14, you will be only able to retrieve your data from the 11.
To retrieve the hourly water consumption, you have to update your preferences on this [page](https://www.eau-services.com/mon-espace-suivi-personnalise.aspx).

## Installation

```bash
pip install pyolia
```

## Getting started

```python
import asyncio
from datetime import datetime, timedelta

from pyolia.client import VeoliaClient


USERNAME = "your username"
PASSWORD = "your password"

async def main() -> None:
    async with VeoliaClient(USERNAME, PASSWORD) as client:
        now = datetime.now()
        if now.day < 4:
            now = now - timedelta(days=3)
        consumption = await client.get_consumption(now.month, now.year)
        print(consumption)
        now = now - timedelta(days=3)
        consumption = await client.get_consumption(now.month, now.year, now.day)
        print(consumption)


asyncio.run(main())
```

## Development

### Installation

- For Linux, install [pyenv](https://github.com/pyenv/pyenv) using [pyenv-installer](https://github.com/pyenv/pyenv-installer)
- For MacOS, run `brew install pyenv`
- Don't forget to update your `.bashrc` file (or similar):
  ```
  export PATH="~/.pyenv/bin:$PATH"
  eval "$(pyenv init -)"
  ```
- Install the required [dependencies](https://github.com/pyenv/pyenv/wiki#suggested-build-environment)
- Install [poetry](https://python-poetry.org): `curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python`

- Clone this repository
- `cd python-veolia-api`
- Install the required Python version: `pyenv install`
- Init the project: `poetry install`
- Run `poetry run pre-commit install`

## PyCharm

As IDE you can use [PyCharm](https://www.jetbrains.com/pycharm/).

Using snap, run `snap install pycharm --classic` to install it.

For MacOS, run `brew cask install pycharm-ce`

Once launched, don't create a new project, but open an existing one and select the **python-veolia-api** folder.

Go to _File | Settings | Project: nre-tag | Project Interpreter_. Your interpreter must look like `<whatever>/python-veolia-api/.venv/bin/python`
scythe-cli 1.4.2
A Harvest is always better with a good tool
License: MIT
Requires Python: >=3.10,<4.0

# Scythe

![Scythe TUI](./images/cover.svg)

Scythe is a TUI and set of CLI utilties for interacting with the Harvest Time tracking Application

## Installation

Installable via pip/pipx (pipx is recommended)

```
pipx install scythe-cli
```

## Setup

First, you need to authenticate Scythe to your harvest account.

To do this, run the following command:

```
scythe init
```

This will open a new browser tab to perform an OAuth flow with Harvest. Once you have authenticated, you will be redirected to a page with a code. Copy this code and paste it into the terminal.

## Usage

### TUI
Start the TUI with

```
scythe
```

The interface has the following features:

- View all timers for a given day
- Start a new timer
- Stop a running timer
- Edit a Timer
- Delete a Timer


### CLI
The CLI also has a few other utilties:

`scythe timer` - The Scythe Timer namespace has some utilties for interacting with timers. `scythe timer --help` for more info

`scythe projects` - List all the projects and tasks that you have access to


#### Quickstarting
Quickstarting is a feature of Scythe that allows you to start a timer with a single command. This is useful for setting up a timer for a task that you do frequently.

To create a new quickstart entry run:

```
scythe quickstart add <name>
```

This will create a new quickstart entry with the name `<name>`. It will prompt you with a list of projects and tasks to choose from (And optionally, a note & a command to execute after the timer start). Once you have completed the prompt, you can start the timer with:

```
scythe quickstart <name>
```

This will start a timer with the details you entered when creating the quickstart entry and will execute the command you entered (if any).

`