semvec/pypi-packages huggingface dataset:
good-clickhouse 0.2.24
Clickhouse client for Good Kiwi
Requires Python: >=3.12

# good-clickhouse

A Clickhouse client with fast_depends based dependency injection.

Sync:
```python
from fast_depends import inject
from good_clickhouse import Clickhouse, ClickhouseProvider


@inject
def some_task(
    clickhouse: Clickhouse = ClickhouseProvider(),
):
    with clickhouse.cursor() as cursor:
        cursor.execute('SELECT 1')
        return cursor.fetchall()


```

Async:
```python
from fast_depends import inject
from good_clickhouse import ClickhouseAsync, ClickhouseAsyncProvider


@inject
async def some_task(
    clickhouse: ClickhouseAsync = ClickhouseAsyncProvider(),
):
    async with clickhouse as client:
        results = await client.execute('SELECT 1')
        return results

```


@query decorator utility for composing queries.
```python
from good_clickhouse import query

@query
def complex_query(table_name: str, columns: list[str], filters: dict[str, str]):
    """
    select {{ columns | join(', ') }}
    from {{ table_name }}
    where {% for key, value in filters.items() -%}
            {{ key }} {{ value }}{% if not loop.last %} and {% endif %}
          {%- endfor %};
    """


columns = ["id", "name", "age"]
filters = {"age": "> 20", "name": "like 'John%'"}
rendered_query = complex_query("users", columns, filters)
print(rendered_query)
"""
> select id, name, age
> from users
> where age > 20 and name like 'John%'
"""

```
monacoreport 0.0.6
Race report package
Requires Python: >=3.10

# monacoreport

Package for displaying the rating of racers.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install countonlyonechar.

```bash
pip install monacoreport
```

## Usage

```python
from monacoreport import build_report, print_report

valid_result, invalid_result = build_report('folder_path')
print_report(valid_result, invalid_result)
```
* Read data from start.log, end.log and abbreviations.txt inside the <folder_path>

* Build a lap time report

* Print the top 15 racers and the rest after a separator

start.log or end.log
```python
DRR2018-05-24_12:04:04.396
SVF2018-05-24_12:16:05.164
LHM2018-05-24_12:19:50.198
```

abbreviations.txt

```python
DRR_Daniel Ricciardo_RED BULL RACING TAG HEUER
SVF_Sebastian Vettel_FERRARI
LHM_Lewis Hamilton_MERCEDES
```
---

```commandline
# CLI
monacoreport --files <folder_path>
```
--files: path to the folder containing:

* start.log
* end.log
* abbreviations.txt

Optional flags:

--asc: sort from fastest to slowest (default)

--desc: sort from slowest to fastest
```commandline
# CLI
monacoreport --files <folder_path> --driver 'name'
```
* Shows statistic about driver
## License

[MIT](https://choosealicense.com/licenses/mit/)