semvec/pypi-packages huggingface dataset:
cortif 0.1.1
Cortif Local Runner CLI
Requires Python: >=3.9

# Cortif

Cortif Local Runner CLI - A command-line tool for running and monitoring machine learning models locally.

## Installation

```bash
pip install cortif
```

## Features

- Local model execution and monitoring
- Synthetic data generation for testing
- Metrics calculation and monitoring
- Interactive CLI interface
- Beautiful terminal output with Rich

## Configuration

The package supports flexible OpenAI API configuration through environment variables:

### Standard OpenAI API

```bash
export OPENAI_API_KEY="your-api-key"
export OPENAI_MODEL="gpt-4"  # Optional, defaults to gpt-4.1-nano
export OPENAI_BASE_URL="https://api.openai.com/v1"  # Optional, for custom endpoints
```

### Azure OpenAI

```bash
export OPENAI_API_KEY="your-azure-api-key"
export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"
export AZURE_OPENAI_API_VERSION="2025-01-01-preview"  # Optional, defaults to 2025-01-01-preview
export OPENAI_MODEL="gpt-4"  # Optional, defaults to gpt-4.1-nano
```

## Usage

Run the Cortif CLI:

```bash
cortif
```

## Requirements

- Python >= 3.9
- Dependencies listed in pyproject.toml

## Documentation

For more information, visit [https://docs.cortif.ai](https://docs.cortif.ai)

## License

MIT License - See LICENSE file for details

## Contact

- Homepage: [https://cortif.ai](https://cortif.ai)
- Email: team@cortif.ai
adrian-utils 0.1.2
Generic Python utilities (DX-first terminal logger, XDG directories, number/percentage/currency formatting). Python 3.12+.
Requires Python: >=3.12

# adrian-utils

Generic Python utilities — DX-first terminal logger, XDG directories, number/percentage/currency formatting. Python 3.12+.

## Install

```bash
pip install adrian-utils
# or with uv
uv add adrian-utils
```

## Install (local dev)

```bash
uv add -e .
```

## Usage

```python
from py_utils import log, xdg, usd, percentage

# XDG directories
config_file = xdg.config / "myapp" / "config.toml"
data_file = xdg.data / "myapp" / "database.db"
cache_dir = xdg.cache / "myapp"

# Narration
log.info("Connected to postgres:5432")

# Task with steps
with log.task("Build assets"):
    log.step("Transpiling")
    log.step("Bundling")

# Status
log.success("Deployed")
log.warn_once("Flag --fast is deprecated")

# Progress
with log.task("Sync"):
    p = log.progress(total=3, title="Uploading")
    p.tick(); p.tick(); p.tick(); p.done(success=True)

# Formatting
usd(1234.56)                  # "+$1,234.56" (color and + by default)
usd(1234.56, signed=False)    # "$1,234.56" (no leading +)
percentage(15.234)            # "+15.2%"
percentage(15.234, signed=False)  # "15.2%"
```

Colors automatically disable when stdout is not a TTY. To override:

```python
from py_utils import set_color_enabled

set_color_enabled(True)   # force color on
set_color_enabled(False)  # force color off
set_color_enabled(None)   # return to auto detection
```

Run the bundled demo:

```bash
# After `uv add -e .`
uv run python example_usage.py
```

## Linting / Formatting

```bash
uv run ruff check src
uv run ruff format src
```

## TODO

- Port the KEV environment manager (see `ts-utils/src/platform/kev.ts` and `go-utils/kev.go`).

Part of the utils suite by Adrian Galilea.
pykasacloud 2025.10.1
Wrapper for python-kasa to connect with cloud devices.
Requires Python: >=3.12

# PyKasaCloud

![PyPI - Version](https://img.shields.io/pypi/v/pykasacloud)

This is a library wrapper that allows you to connect to *some* TPLink/Kasa/Tapo devices via the cloud utilizing the excellent [python-kasa](https://pypi.org/project/python-kasa/) library.  Essentially this adds a transport and protocol class to facilitate this.  This appears to only work on "iot" protocol (legacy) devices rather than "smart" protocol devices (tapo and some newer kasa devices).

This library was written to support the [TPLink Cloud Integration](https://github.com/iluvdata/tplink_cloud).

## Usage

Rather than use discovery like `python-kasa` you must get connect to the cloud (providing credentials) to obtain a token.
```python
cloud: KasaCloud = await KasaCloud.kasacloud(username="username", password="password")
```
You can then get a list of device dictionaries which you can then use to get a `kasa.Device`:
```python
devices: list[DeviceDict] = cloud.get_device_list()
device: Device = cloud.get_device(devices[0])
```
You can then interact with these devices like python-kasa devices.

### Caching tokens

To cache tokens to a json file, provide a path.
```python
cloud: KasaCloud = await KasaCloud.kasacloud(username="username", password="password", token_storage_file=".kasacloud.json")
```
Subsequent authenication can be accomplished just using the `token_storage_file` parameter.
```python
cloud: KasaCloud = await KasaCloud.kasacloud( token_storage_file=".kasacloud.json")
```
### Refesh Token and Callbacks
If you are storing the token externally, say in a HomeAssistant Config Entry simply pass a `Token` object (inside `async_setup_entry` in `__init__.py` of a given integration)
```python

async def update_token(token: Token) -> None:
    data = entry.data | {TOKEN: token}
    result = hass.config_entries.async_update_entry(
        entry=entry, data=data, unique_id=entry.unique_id
    )
    if not result:
        raise TokenUpdateError("Unable to update token in config entry")

    try:
        cloud: KasaCloud = await KasaCloud.kasacloud(
            token=entry.data.get(TOKEN), token_update_callback=update_token
        )
    except AuthenticationError as err:
        raise ConfigEntryAuthFailed(err) from err
```