semvec/pypi-packages huggingface dataset:
llyx 0.1.0
llyx - Log Linter for pYthon
Requires Python: >=3.9

<div align="center">
  <img src="logo-horizontal.svg" alt="loly - Log Linter for Python" width="400">
  <br>
  <br>
  <p><strong>A Python logging linter that enforces best practices</strong></p>
</div>

## Why?

Production incidents are harder to debug when:
- Exception logs lack stack traces (`exc_info=True`)
- Hot loops spam logs, degrading performance
- Inconsistent logging causes time delay in parsing logs

## Installation

```bash
uv install loly
```

## Usage

```bash
loly path/to/code

loly path/to/code --config=loly.yml
```

## Policies

| Code | Policy | Description |
|------|--------|-------------|
| **LY001** | `exception_exc_info` | Enforces `exc_info=True` in exception handlers to capture stack traces |
| **LY002** | `log_loop` | Prevents unconditional logging in hot loops (allows conditional logging) |

## Configuration

Create a `loly.yml`:

```yaml
logger_names: [logger, logging, log]

exception_exc_info:
  levels: [error]
  severity: fail

log_loop:
  levels: [info, debug]
  severity: fail
```

## Examples

**LY001**: Missing `exc_info=True`
```python
# Fail
try:
    connect_db()
except Exception:
    logger.error("Connection failed")  # No stack trace!

# Pass
try:
    connect_db()
except Exception:
    logger.error("Connection failed", exc_info=True)
```

**LY002**: Logging in hot loops
```python
# Fail
for user in users:
    logger.info(f"Processing {user}")  # Logs every iteration

# Pass
for i, user in enumerate(users):
    if i % 100 == 0:
        logger.info(f"Progress: {i}/{len(users)}")  # Conditional logging
```

## Philosophy

- **Zero config**: Works out of the box with sensible defaults
- **Extensible**: Plan to add more policies
- **Complementary**: Use with `structlog`, `loguru` — not instead of them

## License

MIT
hmoviessdk 0.0.2
Python SDK for accessing the MovieLens API (Data Analysts/Data Scientists friendly)
Requires Python: >=3.12

# MovieLens SDK - `hmoviessdk`

A simple Python SDK to interact with the MovieLens REST API.It is designed for **Data Analysts** and **Data Scientists**, with native support for **Pydantic**, **dictionnary** and **Pandas DataFrames**.

[![PyPI version](https://badge.fury.io/py/moviesdk.svg)](https://badge.fury.io/py/hmoviessdk)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

---

## Installation

```bash
pip install hmoviessdk
```

---

## Configuration

```python
from hmoviessdk import MovieClient, MovieConfig

# Configuration with your API URL (Render or local)
config = MovieConfig(movie_base_url="https://api-architecture.onrender.com")
client = MovieClient(config=config)
```

---

## Test the SDK

### 1. Health check

```python
client.health_check()
# Return: {"status": "ok"}
```

### 2. Retrieve a movie
```python
movie = client.get_movie(1)
print(movie.title)
```

### 3. List of movies in DataFrame format 

```python
df = client.list_movies(limit=5, output_format="pandas")
print(df.head())
```

---

## Output mode available

All list methods (`list_movies`, `list_ratings`, etc.) can return :

- **Pydantic** object (défaut)
- **dictionnary**
- **Pandas DataFrames**

Example :

```python
client.list_movies(limit=10, output_format="dict")
client.list_ratings(limit=10, output_format="pandas")
```

---

## Local test

You can also use local API :

```python
config = MovieConfig(movie_base_url="http://localhost:8000")
client = MovieClient(config=config)
```

---

## Target audience

- Data Analysts
- Data Scientists
- Students in Data
- Python Developers

---

## Licence

MIT License

---

## Useful Links

- API Render : [https://api-architecture.onrender.com](https://api-architecture.onrender.com)
- PyPI : [https://pypi.org/project/hmoviessdk/](https://pypi.org/project/hmoviessdk/)