semvec/pypi-packages huggingface dataset:
aiogram-loguru 0.1.3
A small library that ships some boilerplate code needed for integrating aiogram with loguru.
Requires Python: >=3.9
Keywords: aiogram, loguru

# aiogram-loguru

[![PyPI - License](https://img.shields.io/pypi/l/aiogram-loguru)](https://opensource.org/licenses/MIT)
[![PyPI - Status](https://img.shields.io/pypi/status/aiogram-loguru)](https://pypi.org/project/aiogram-loguru/)
[![PyPI - Version](https://img.shields.io/pypi/v/aiogram-loguru)](https://pypi.org/project/aiogram-loguru/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/aiogram-loguru)](https://pypi.org/project/aiogram-loguru/)

**aiogram-loguru** is a small library that ships some boilerplate code needed for integrating
[aiogram](https://pypi.org/project/aiogram/) with [loguru](https://pypi.org/project/loguru/).

## Features

- A [sink](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.add)
  for loguru that sends logs to a Telegram chat via a bot.
- *and more features soon...*

## Requirements

**Python 3.9+** is supported.
It also requires **aiogram** (v3.18 or later) and **loguru** (v0.7.0 or later) to be installed.

## Installation

    pip install aiogram-loguru

## Usage

You can use the sink like this:

```python
from aiogram import Bot
from aiogram_loguru import AiogramSink
from loguru import logger

CHAT_ID = 12345  # the ID of a chat, where the logs will be sent to

bot = Bot("YOUR BOT TOKEN")
sink = AiogramSink(bot, CHAT_ID)
logger.add(sink)
```

Now all the logs will be sent to the selected Telegram chat.
However, Telegram Bot API has rather painful [limits](https://limits.tginfo.me/en),
so you would probably want to limit the number of sent logs to the most important ones like this:

```python
logger.add(sink, level='ERROR')
```

Lastly, for the sink to work, you should actually have an event loop running.
You should also await `logger.complete()` when your program is exiting to ensure that all logs
have been actually sent.
See the [docs](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.complete) for details.

## License

This project is licensed under the terms of
the [MIT license](https://github.com/antos07/aiogram-loguru/blob/master/LICENSE).
eitaa-bot-amir 1.0.0
A Python package for interacting with Eitaa Bot API

A Python package that provides a convenient way to interact with Eitaa Bot API.

## Features
- Send messages
- Send photos
- Send files and documents
...

## Install
```bash
pip install eitaa_bot
```

## Usage
```python
from eitaa_bot import EitaaBot
...
```
hrm-recorder 1.0.0
A Python-based BLE heart rate monitor recorder using Bleak
Requires Python: >=3.9

# hrm-recorder
**hrm-recorder** is a Python library for interacting with Bluetooth LE heart rate monitors. It lets you scan for devices, save configuration, connect to a chosen device, and record real-time heart rate data (and basic HRV-like data) in CSV files.

## Features
- **One-Time Config** – A quick CLI command `hrm-recorder config` to discover BLE heart rate devices and store their addresses locally.  
- **Recorder Class** – A Python class (`recorder`) for starting a BLE connection in the background, retrieving data, and optionally logging to CSV.  
- **Pause/Resume** – Pause the data logging without disconnecting.  
- **Simple API** – Use it in IPython, a standard Python script, or any environment that keeps the session alive.

## Installation
Install from PyPI with:
```bash
pip install hrm-recorder
```

Or install from source:
```bash
git clone https://github.com/Cortexan/hrm_recorder.git
cd hrm-recorder
pip install .
```

> **Note**: `hrm-recorder` requires Python 3.9+ and the [bleak](https://github.com/hbldh/bleak) library for BLE functionality on Windows, macOS, and Linux.

## Basic Usage

### 1) Run Config from the CLI

```bash
hrm-recorder config
```
1. Scans for nearby BLE devices (10s each scan).  
2. Lets you pick the device to save in \`.hrm_config.json\`.  
3. If a config file already exists, it’ll ask if you want to keep or replace it.  


### 2) Usage in a Python Script or REPL

Create and use a `recorder` instance:

```python
from hrm_recorder import recorder

# Create a new recorder instance
hrm = recorder()

# Optionally re-run config if you want to change the saved device
hrm.config()

# Start the background BLE thread
hrm.start()

# Get a quick HR reading
print(hrm.get())  # e.g. "HR: 72, HRV: 32.00"

# Start recording data to a CSV file
hrm.record()
# ... some time later ...
hrm.stop()

# Eventually exit (stop the background thread)
hrm.exit()
```
## Contributing
1. **Fork** the repo
2. **Create** a feature branch
3. **Commit** your changes
4. **Open** a Pull Request

We’re happy to see improvements for advanced HRV, multi-device support, etc.

## License
This project is licensed under the MIT License. See [LICENSE](LICENSE.txt) for details.
llm-input-sanitizer 0.2.1
A package for sanitizing and securing user inputs to LLMs
Requires Python: >=3.7

# LLM Input Sanitizer

A Python package for sanitizing and securing user inputs before sending them to large language models (LLMs).

## Features

- **PII Detection & Masking**: Automatically detects and masks emails, phone numbers, SSNs, and credit card numbers
- **Profanity Filtering**: Removes or masks profanity and inappropriate language
- **Input Truncation**: Prevents excessively long inputs
- **Unicode Normalization**: Handles special characters and ensures consistent text encoding
- **Prompt Injection Defense**: Detects and blocks common LLM prompt injection attacks
- **Jailbreak Prevention**: Identifies attempts to bypass LLM safety measures

## Installation

```bash
pip install llm-input-sanitizer
```

## Quick Start

```python
from llm_input_sanitizer import InputSanitizer, prepare_llm_messages, is_input_appropriate

# Initialize the sanitizer
sanitizer = InputSanitizer(max_length=1000)

# Sanitize user input
user_input = "My email is john@example.com and my phone is 555-123-4567"
sanitized_input = sanitizer.sanitize_input(user_input)
# Result: "My email is [EMAIL] and my phone is [PHONE]"

# Check if input is appropriate (no injection attempts)
if is_input_appropriate(sanitized_input):
    # Prepare messages for the LLM
    messages = prepare_llm_messages(
        sanitized_input, 
        system_message="You are a helpful assistant."
    )
    # Send messages to your LLM
else:
    print("Potentially harmful input detected")
```

## Custom Profanity list

```python
sanitizer = InputSanitizer(profanity_file="path/to/profanity_words.txt")
```

## Custom forbidden paths

```python
from llm_input_sanitizer import is_input_appropriate

my_patterns = [
    r'custom_pattern_1',
    r'custom_pattern_2',
]

is_safe = is_input_appropriate(text, forbidden_patterns=my_patterns)
```

## Integration with OpenAI

```python
import openai
from llm_input_sanitizer import InputSanitizer, prepare_llm_messages, is_input_appropriate

sanitizer = InputSanitizer()

def safe_llm_call(user_input):
    # Sanitize the input
    clean_input = sanitizer.sanitize_input(user_input)
    
    # Check if appropriate
    if not is_input_appropriate(clean_input):
        return "I'm sorry, I can't process that request."
    
    # Prepare messages
    messages = prepare_llm_messages(clean_input)
    
    # Call the LLM API
    response = openai.ChatCompletion.create(
        model="gpt-4",
        messages=messages
    )
    
    return response.choices[0].message.content
```

This package provides a baseline of protection against common attacks but is not a complete security solution. Always implement defense in depth for production systems:

- Server-side validation
- Rate limiting
- Monitoring for unusual patterns
- Regular updates to security patterns