semvec/pypi-packages huggingface dataset:
zapish-logger 1.1.3
A simple logger that logs in a JSON format inspired by go zap
Requires Python: >=3.9
Keywords: logger, structured, json

| BRANCH  | STATUS                                                                                                                                                                                                                                          |
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| main    | [![Unit-Testing, Coverage, Linting](https://github.com/btr1975/zapish-logger/actions/workflows/test-coverage-lint.yml/badge.svg?branch=main)](https://github.com/btr1975/zapish-logger/actions/workflows/test-coverage-lint.yml)    |
| develop | [![Unit-Testing, Coverage, Linting](https://github.com/btr1975/zapish-logger/actions/workflows/test-coverage-lint.yml/badge.svg?branch=develop)](https://github.com/btr1975/zapish-logger/actions/workflows/test-coverage-lint.yml) |

[![Downloads](https://pepy.tech/badge/zapish-logger)](https://pepy.tech/project/zapish-logger)
[![Supported Versions](https://img.shields.io/pypi/pyversions/zapish-logger.svg)](https://pypi.org/project/zapish-logger)
[![Documentation Status](https://readthedocs.org/projects/zapish-logger/badge/?version=latest)](https://zapish-logger.readthedocs.io/en/latest/?badge=latest)


# zapish-logger

## Description
* A simple logger that logs in a JSON format inspired by go zap

#### Generated by CookieCutter
* Repository: [GitHub](https://github.com/btr1975/cookiecutter-python-library)
* Version: 1.0.3
pfly 0.1.1
pfly - Python LOggling Linter
Requires Python: >=3.9

<div align="center">
  <img src="logo-horizontal.svg" alt="pfly - Python LOggling Linter" 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
- **Complementary**: Use with `structlog`, `loguru` — not instead of them

## Installation

```bash
uv pip install pfly
```

## Usage

```bash
pfly path/to/code

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

## Policies

| Code | Policy | Description |
|------|--------|-------------|
| **LY001** | `exception_exc_info` | Enforces `exc_info=True` for logs in exception handlers to capture stack traces in a consistent format |
| **LY002** | `log_loop` | Prevents unconditional logging in hot loops (allows conditional logging) |
| **LY003** | `consistent_kv` | Ensures log variables follow key-value format for consistent parsing |

## Configuration

Create a `pfly.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
```

**LY003**: Inconsistent key-value logging
```python
# Fail
logger.info(f"User {user}")  # Missing key
logger.info("User %s", user)  # Placeholder without key

# Pass
logger.info(f"User user={user}")  # Key-value pair
logger.info("User user=%s", user)  # Key=placeholder format
```

## License

Apache
apitelematel-client 0.1.6
Cliente ligero para consumir la API de apitelematel desde otras aplicaciones
Requires Python: >=3.10

# Cliente oficial de apitelematel

Paquete Python ligero para invocar los endpoints autorizados de `apitelematel` desde otras aplicaciones.

## Instalación

```sh
pip install apitelematel-client
```

Si lo usas desde el mismo repositorio (para pruebas), instala las dependencias con `pip install -e .` y asegúrate de que `apitelematel_client` esté en el `PYTHONPATH`.

## Configuración

Se pueden usar variables de entorno o pasar los valores manualmente:

```env
APITELEMATEL_BASE_URL=http://servidor:5000
APITELEMATEL_SECRET_KEY=clave-secreta
APITELEMATEL_TIMEOUT=15
```

En código:

```python
from apitelematel_client import ApiTelematelClient
from apitelematel_client.config import ClientSettings

settings = ClientSettings.from_env()
cliente = ApiTelematelClient(settings=settings)
resultado = cliente.query("SELECT * FROM PUB.gmclien", dsn="tlmplus", max_rows=20)
```

La llamada anterior limita la respuesta a 20 filas usando `max_rows`; si tu servidor lo soporta puedes enviar cualquier valor entero para controlar el tamaño del resultado.

También puedes instanciar `ApiTelematelClient` pasando directamente `base_url` y `secret_key`:

```python
cliente = ApiTelematelClient(base_url="http://servidor:5000", secret_key="clave")
```

> Nota: `ApiTelematelClient` ya añade internamente el prefijo `/api/v1.0`, así que solo necesitas pasar la parte de host/puerto en `base_url`.

## Funcionalidades principales

| Método | Endpoint | Parámetros relevantes |
| --- | --- | --- |
| `query(sql, connection_key=None, dsn=None, max_rows=None)` | `/query` | SQL completo, `connection_key`/`dsn` y `max_rows` opcional |
| `get_cliente(cod_cli, connection_key=None)` | `/clientes` | `cod_cli` y `connection_key` opcional |

Los métodos lanzan `ApiTelematelClientError` o `ApiTelematelServerError` cuando la llamada falla.

## Contribuir

1. Clona el repositorio y crea un entorno virtual.
2. Ejecuta `pip install -e .[dev]` para tener las dependencias de tests.
3. Corre `pytest tests_client` antes de enviar cambios.

## Licencia

Este paquete sigue la misma licencia que el proyecto principal (consulta `LICENSE`).