Metadata-Version: 2.5
Name: rfx-protocols-system
Version: 0.2.0
Summary: A self-describing, pluggable service locator: decorator-based provider registration, singleton lifecycle management, and introspection-driven GUI discovery.
Project-URL: Homepage, https://github.com/rfloresx/ProtocolsSystem
Project-URL: Repository, https://github.com/rfloresx/ProtocolsSystem
Project-URL: Issues, https://github.com/rfloresx/ProtocolsSystem/issues
Author: Roberto Flores
License-Expression: MIT
License-File: LICENSE
Keywords: discovery,plugin,protocols,registry,service-locator
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Provides-Extra: heif
Requires-Dist: pillow-heif<1,>=0.16.0; extra == 'heif'
Provides-Extra: huggingface
Requires-Dist: torch>=2.0.0; extra == 'huggingface'
Requires-Dist: transformers<5,>=4.38.0; extra == 'huggingface'
Provides-Extra: openai
Requires-Dist: openai<3,>=1.0.0; extra == 'openai'
Provides-Extra: providers
Requires-Dist: googlemaps>=4.10; extra == 'providers'
Requires-Dist: httpx>=0.27; extra == 'providers'
Requires-Dist: immichpy<9,>=8.0; extra == 'providers'
Requires-Dist: ollama>=0.4; extra == 'providers'
Requires-Dist: pillow>=10.0; extra == 'providers'
Requires-Dist: tenacity<10,>=9.0; extra == 'providers'
Provides-Extra: webauth
Requires-Dist: bcrypt>=4.0; extra == 'webauth'
Description-Content-Type: text/markdown

# Protocols System

A self-describing, pluggable service locator for Python.

Protocols System provides decorator-based provider registration, singleton
lifecycle management, and introspection-driven GUI discovery. Protocol and
provider additions automatically surface in any UI that consumes the discovery
layer.

It is shared across projects (PhotoStudio, Smart-Albums) as a standalone
package so provider implementations and the registry live in one place.

## Install

```bash
# Core only (registry, discovery, protocols). The importable package is
# `protocols_system`; the distribution name is `rfx-protocols-system`.
pip install rfx-protocols-system

# With built-in provider implementations (Immich, Ollama, llama.cpp, Google Places, ...)
pip install "rfx-protocols-system[providers]"
```

For local development against a checkout:

```bash
pip install -e "../ProtocolsSystem[providers]"
```

## Layout

- `protocols_system.core` — registry, discovery, types, validation
- `protocols_system.protocols` — protocol (interface) definitions: cache,
  embedding, geo, health, image_library, llm, progress
- `protocols_system.providers` — concrete provider implementations that
  self-register via the `@ProtocolsRegistry.register` decorator

## Usage

```python
from protocols_system import ProtocolsRegistry, get_protocol_slots
from protocols_system.providers import register_builtin_providers

# Import provider modules so they register themselves. Providers whose
# optional dependencies are missing are skipped silently.
register_builtin_providers()

registry = ProtocolsRegistry()
```

## Development

```bash
pip install -e ".[dev,providers]"
pytest
mypy
ruff check
```
