Metadata-Version: 2.4
Name: socratic-core
Version: 0.1.2
Summary: Core services for Socratic system: event bus, orchestrator, base services, and shared models
Author: Socratic Contributors
License: MIT
Project-URL: Homepage, https://github.com/Nireus79/socratic-core
Project-URL: Documentation, https://github.com/Nireus79/socratic-core#readme
Project-URL: Repository, https://github.com/Nireus79/socratic-core
Project-URL: Issues, https://github.com/Nireus79/socratic-core/issues
Keywords: socratic,core,event-bus,orchestration,services
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.0.0
Requires-Dist: loguru>=0.7.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: ruff>=0.1; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Dynamic: license-file

# Socratic Core

Core services for the Socratic system: event bus, orchestrator, base services, and shared models.

## Features

- **EventBus**: Event-driven architecture for system-wide communication
- **BaseService**: Foundation class for all services
- **Orchestrator**: Core orchestration logic
- **SharedModels**: Common data structures used across the system

## Installation

```bash
pip install socratic-core
```

## Quick Start

### Event Bus

```python
import asyncio
from socratic_core import EventBus

async def main():
    # Create event bus
    bus = EventBus()

    # Subscribe to events
    async def on_event(event):
        print(f"Event: {event.event_type}, Data: {event.data}")

    bus.subscribe("my_event", on_event)

    # Publish event
    await bus.publish("my_event", "my_service", {"key": "value"})

asyncio.run(main())
```

### Base Service

```python
from socratic_core import BaseService

class MyService(BaseService):
    """Custom service implementation."""

    async def initialize(self):
        """Initialize service."""
        print(f"Initializing {self.service_name}")

    async def shutdown(self):
        """Shutdown service."""
        print(f"Shutting down {self.service_name}")

    async def health_check(self):
        """Check service health."""
        return {"status": "healthy", "service": self.service_name}

# Create and use service
service = MyService("my_service", {"key": "value"})
```

## Dependencies

- **socratic-maturity**: Foundation maturity tracking
- **socratic-agents**: Multi-agent orchestration
- **pydantic**: Data validation
- **loguru**: Structured logging

## License

MIT
