Metadata-Version: 2.4
Name: syft-serve
Version: 0.2.3
Summary: Generic FastAPI server process management and deduplication
Project-URL: Homepage, https://github.com/OpenMined/syft-serve
Project-URL: Repository, https://github.com/OpenMined/syft-serve
Project-URL: Documentation, https://docs.syft-serve.org
Author-email: OpenMined <info@openmined.org>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: fastapi>=0.104.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: jupyter-dark-detect>=0.1.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: tabulate>=0.9.0
Requires-Dist: uvicorn[standard]>=0.24.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.10.0; extra == 'dev'
Requires-Dist: pytest-xdist>=3.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# SyftServe

**Generic FastAPI server process management and deduplication**

SyftServe provides a high-level API for creating, managing, and deduplicating FastAPI server processes. It's designed to solve the common problem of multiple applications accidentally starting duplicate servers on the same ports.

## Features

- 🚀 **Easy Server Creation** - Simple API for launching FastAPI servers
- 🔄 **Smart Deduplication** - Automatically reuse compatible servers 
- 📊 **Process Management** - Full lifecycle control (start/stop/restart/logs)
- 🔍 **Endpoint Compatibility** - Only connect to servers with required endpoints
- 💾 **Persistent Tracking** - Servers survive Python session restarts
- 🌐 **Cross-Platform** - Works on macOS, Linux, and Windows

## Quick Start

```python
from syft_serve import ServerManager
from fastapi import FastAPI

# Create a simple FastAPI app
app = FastAPI()

@app.get("/api/hello")
def hello():
    return {"message": "Hello, World!"}

# Start server with automatic deduplication
manager = ServerManager()
server = manager.create_server(
    app=app,
    endpoints=["/api/hello"],
    name="hello_server"
)

print(f"Server running on port {server.port}")
print(f"Health check: {server.health_check()}")
print(f"Logs: {server.get_logs()}")
```

## Architecture

SyftServe is designed as a foundation for other packages that need reliable FastAPI server management:

- **syft-widget**: Uses syft-serve for widget server deduplication
- **syft-apps**: Uses syft-serve for application server management
- **Your package**: Can use syft-serve for any FastAPI server needs

## Installation

```bash
pip install syft-serve
```

## Documentation

See the [full documentation](https://docs.syft-serve.org) for detailed usage examples and API reference.