Skip to main content

Generic FastAPI server process management and deduplication

Project description

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

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

pip install syft-serve

Documentation

See the full documentation for detailed usage examples and API reference.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syft_serve-0.2.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syft_serve-0.2.0-py2.py3-none-any.whl (26.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file syft_serve-0.2.0.tar.gz.

File metadata

  • Download URL: syft_serve-0.2.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.17

File hashes

Hashes for syft_serve-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8d012dad4210907e433a5fe4055cb7c9de8827960541ea7117526df34569218a
MD5 ed57455a3b0ef0543fc2ad5a8695d75e
BLAKE2b-256 2649f8b02d31169d3d8f7514f1fccb11f38053bb633b5474647c4a38d3480080

See more details on using hashes here.

File details

Details for the file syft_serve-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for syft_serve-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7b6652f76f2bd6b0bf0a47d48c4063a8ca7f213fd59f55926b8c41d22c6c9e14
MD5 c969eba28579b4ca200ed3196f76dfb7
BLAKE2b-256 085fe48b430cbc06ca73092942c3722995fd730313624cd1361962b8a1bf7216

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page