semvec/pypi-packages huggingface dataset:
pycliprog-rj 1.0.0
Lightweight CLI progress bars
Requires Python: >=3.8
Keywords: cli, progress, progressbar, spinner, terminal

# cliprog 📊

Lightweight CLI progress bars for Python.

## Installation

```bash
pip install cliprog
```

## Usage

### Simple Iterator Wrapper

```python
from cliprog import progress

for item in progress(items, desc="Processing"):
    process(item)

# Works with range
for i in progress(range(100)):
    do_work(i)
```

### Manual Progress Bar

```python
from cliprog import ProgressBar

bar = ProgressBar(total=100, desc="Downloading")
for chunk in download():
    save(chunk)
    bar.update(1)
bar.close()
```

### Spinner

```python
from cliprog import spinner

spin = spinner("Loading data")
for _ in range(10):
    spin.update()
    time.sleep(0.1)
spin.done("Data loaded!")
```

## Output Examples

```
Processing [████████████████░░░░░░░░░░░░░░░░░░░░░░░░]  42.0% 42/100 ETA: 12s
```

## Customization

```python
bar = ProgressBar(
    total=100,
    desc="Custom",
    width=30,          # Bar width
    fill="▓",          # Filled character
    empty="░",         # Empty character
    show_percent=True, # Show percentage
    show_count=True,   # Show current/total
    show_eta=True,     # Show time remaining
)
```

## License

MIT
pyprojectcheck-rj 1.0.0
Validate pyproject.toml files
Requires Python: >=3.8
Keywords: linter, packaging, pyproject, toml, validation

# pyprojectcheck ✅

Validate pyproject.toml files for correctness and best practices.

## Installation

```bash
pip install pyprojectcheck
```

## Usage

### CLI

```bash
# Check current directory
pyprojectcheck

# Check specific file
pyprojectcheck path/to/pyproject.toml
```

### Python API

```python
from pyprojectcheck import check_file, check

# Check a file
result = check_file("pyproject.toml")
print(result)

# Check content directly
content = """
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "mypackage"
version = "1.0.0"
"""

result = check(content)
if result.valid:
    print("✅ Valid!")
else:
    for error in result.errors:
        print(error)
```

## What It Checks

### Errors
- Missing `[build-system]` section
- Missing `requires` or `build-backend`
- Missing `[project]` section
- Missing `name` or `version`
- Invalid field types

### Warnings
- Missing recommended fields (description, readme, license)
- Missing `requires-python`
- Missing `authors`
- Missing `urls`

## Output Example

```
⚠️ [project] Missing 'description' field (recommended)
⚠️ [project] Missing 'readme' field (recommended)
❌ [project.authors[0]] Author must have 'name' or 'email'

❌ Invalid: 1 error(s), 2 warning(s)
```

## License

MIT
pytimefunc-rj 1.0.0
Function execution timing utilities
Requires Python: >=3.8
Keywords: benchmark, performance, profiling, timer, timing

# timefunc ⏱️

Function execution timing utilities for Python.

## Installation

```bash
pip install timefunc
```

## Usage

### Decorator

```python
from timefunc import timeit

@timeit
def slow_function():
    time.sleep(1)

slow_function()
# Output: slow_function: 1.0012s
```

### Context Manager

```python
from timefunc import Timer

with Timer("database query") as t:
    results = db.query()

print(f"Query took {t.elapsed:.2f}s")
```

### Benchmark

```python
from timefunc import benchmark

@benchmark(runs=100, warmup=5)
def function_to_test():
    # code to benchmark
    pass

function_to_test()
# Output:
# function_to_test:
#   Runs: 100
#   Mean: 1.23ms
#   Median: 1.20ms
#   Min: 1.01ms
#   Max: 2.45ms
#   Std Dev: 0.15ms
```

## Features

- ⏱️ Function timing decorator
- 📊 Benchmarking with statistics
- 🔄 Context manager support
- 📈 Warmup runs for accurate benchmarks
- 📝 Human-readable output

## API

### `@timeit`
```python
@timeit(name="custom", print_result=True)
def func(): pass
```

### `@benchmark`
```python
@benchmark(runs=10, warmup=1, name="custom")
def func(): pass
```

### `Timer`
```python
with Timer("name", print_result=False) as t:
    pass
print(t.elapsed)  # seconds as float
print(t.result)   # TimingResult object
```

## License

MIT
pyvaliddict-rj 1.0.0
Dictionary schema validation
Requires Python: >=3.8
Keywords: dict, dictionary, schema, validation, validator

# validdict ✅

Dictionary schema validation for Python.

## Installation

```bash
pip install validdict
```

## Usage

```python
from validdict import validate, String, Integer, Email, Boolean

data = {
    "name": "John Doe",
    "age": 30,
    "email": "john@example.com",
    "active": True
}

schema = {
    "name": String(min_length=1, max_length=100),
    "age": Integer(min_value=0, max_value=150),
    "email": Email(required=False),
    "active": Boolean(default=True),
}

result = validate(data, schema)
```

## Field Types

| Field | Description |
|-------|-------------|
| `String` | String with length/pattern validation |
| `Integer` | Integer with min/max validation |
| `Float` | Float with min/max validation |
| `Boolean` | Boolean value |
| `List_` | List with item type validation |
| `Dict_` | Nested dictionary |
| `Email` | Email format validation |
| `Enum_` | Value from allowed list |

## Field Options

```python
# Required (default)
String()

# Optional with default
String(required=False, default="unknown")

# String constraints
String(min_length=1, max_length=100, pattern=r"^[a-z]+$")

# Number constraints
Integer(min_value=0, max_value=100)

# List with item validation
List_(item_type=String(), min_length=1)

# Nested schema
Dict_({
    "street": String(),
    "city": String(),
})
```

## Error Handling

```python
from validdict import validate, ValidationError

try:
    result = validate(data, schema)
except ValidationError as e:
    print(f"Validation failed: {e.message}")
    print(f"At path: {e.path}")
```

## License

MIT
pyretryit-rj 1.0.0
Smart retry decorator with exponential backoff
Requires Python: >=3.8
Keywords: backoff, decorator, fault-tolerance, resilience, retry

# retryit 🔄

Smart retry decorator with exponential backoff for Python.

## Installation

```bash
pip install retryit
```

## Usage

```python
from retryit import retry

@retry(max_attempts=3, delay=1, backoff=2)
def fetch_data():
    return requests.get("https://api.example.com/data")

# With specific exceptions
@retry(max_attempts=5, exceptions=(ConnectionError, TimeoutError))
def connect_to_db():
    return database.connect()

# With callback on retry
def log_retry(exception, attempt):
    print(f"Attempt {attempt} failed: {exception}")

@retry(max_attempts=3, on_retry=log_retry)
def unreliable_function():
    # ...
```

### Async Support

```python
from retryit import retry_async

@retry_async(max_attempts=3, delay=1)
async def fetch_data():
    async with aiohttp.ClientSession() as session:
        return await session.get("https://api.example.com/data")
```

## Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `max_attempts` | int | 3 | Maximum retry attempts |
| `delay` | float | 1.0 | Initial delay (seconds) |
| `backoff` | float | 2.0 | Delay multiplier |
| `exceptions` | tuple | (Exception,) | Exceptions to catch |
| `on_retry` | callable | None | Callback on each retry |

## License

MIT
pycachely-rj 1.0.0
Simple in-memory caching with TTL support
Requires Python: >=3.8
Keywords: cache, caching, decorator, memoize, ttl

# cachely ⚡

Simple in-memory caching with TTL support for Python.

## Installation

```bash
pip install cachely
```

## Usage

### Decorator

```python
from cachely import cache

@cache(ttl=300)  # Cache for 5 minutes
def expensive_computation(x):
    return x ** 100

@cache(ttl=60, key_prefix="user")
def get_user(user_id):
    return database.fetch_user(user_id)
```

### Manual Cache

```python
from cachely import Cache

cache = Cache()

# Set with TTL
cache.set("key", "value", ttl=300)

# Get value
value = cache.get("key", default=None)

# Delete
cache.delete("key")

# Clear all
cache.clear()
```

## Features

- 🕐 TTL (time-to-live) support
- 🔒 Thread-safe operations
- 🎯 Function decorator
- 🧹 Automatic cleanup of expired entries
- 📊 Cache info and stats

## API

### Decorator Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `ttl` | int | None | Seconds until expiration |
| `key_prefix` | str | None | Prefix for cache keys |

### Cache Methods

| Method | Description |
|--------|-------------|
| `get(key, default)` | Get cached value |
| `set(key, value, ttl)` | Set cached value |
| `delete(key)` | Delete cached value |
| `clear()` | Clear all cache |
| `cleanup()` | Remove expired entries |
| `size()` | Number of cached items |

## License

MIT
pylogfmt-rj 1.0.0
Beautiful, structured console logging
Requires Python: >=3.8
Keywords: colored, console, logger, logging, structured

# logfmt 📝

Beautiful, structured console logging for Python.

## Installation

```bash
pip install logfmt
```

## Usage

```python
from logfmt import Logger

log = Logger("myapp")

log.debug("Debugging info", variable=42)
log.info("Server started", port=8080, host="0.0.0.0")
log.warning("High memory usage", percent=85)
log.error("Connection failed", host="db.example.com", retry=3)
log.critical("System shutdown imminent")
```

### Output

```
2025-12-18 10:30:45 INFO  [myapp] Server started port=8080 host=0.0.0.0
2025-12-18 10:30:46 WARN  [myapp] High memory usage percent=85
2025-12-18 10:30:47 ERROR [myapp] Connection failed host=db.example.com retry=3
```

## Features

- 🎨 Colored output (auto-detected)
- 📊 Structured key-value logging
- ⏰ Timestamps
- 🎚️ Log levels
- 📤 Configurable output stream

## Configuration

```python
from logfmt import Logger, LogLevel

log = Logger(
    name="myapp",
    level=LogLevel.DEBUG,  # Minimum log level
    colorize=True,         # Enable colors
    timestamp=True,        # Show timestamps
)
```

## Log Levels

| Level | Value | Use Case |
|-------|-------|----------|
| DEBUG | 10 | Detailed debugging |
| INFO | 20 | General information |
| WARNING | 30 | Warning messages |
| ERROR | 40 | Error conditions |
| CRITICAL | 50 | Critical failures |

## License

MIT
stapi-fastapi 0.8.0
Sensor Tasking API (STAPI) with FastAPI
Requires Python: >=3.11

# STAPI FastAPI - Sensor Tasking API with FastAPI

> [!WARNING]
> The whole [STAPI spec] is very much a work in progress, so things are guaranteed to be not correct.

## Usage

STAPI FastAPI provides an `fastapi.APIRouter` which must be included in
`fastapi.FastAPI` instance.

### Pagination

4 endpoints currently offer pagination:

- `GET`: `'/orders`, `/products`, `/orders/{order_id}/statuses`
- `POST`: `/opportunities`.

Pagination is token based and follows recommendations in the [STAC API pagination].
Limit and token are passed in as query params for `GET` endpoints, and via the body as
separate key/value pairs for `POST` requests.

If pagination is available and more records remain the response object will contain a
`next` link object that can be used to get the next page of results. No `next` `Link`
returned indicates there are no further records available.

`limit` defaults to 10 and maxes at 100.

## ADRs

ADRs can be found in in the [adrs](./adrs/README.md) directory.

### Implementing a backend

- The test suite assumes the backend can be instantiated without any parameters
  required by the constructor.

[STAPI spec]: https://github.com/stapi-spec/stapi-spec
[STAC API pagination]: https://github.com/radiantearth/stac-api-spec/blob/release/v1.0.0/item-search/examples.md#paging-examples
stapi-pydantic 0.1.0
Pydantic models for Satellite Tasking API (STAPI) Specification
Requires Python: >=3.11

# stapi-pydantic

[Pydantic](https://docs.pydantic.dev) models for the [Satellite Tasking API (STAPI)](https://github.com/stapi-spec/) specification.

> [!NOTE]
> This repository intentionally has no input/output (IO) functionality.
> For making requests to a STAPI API, use **pystapi-client**.