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.2.tar.gz (21.5 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.2-py2.py3-none-any.whl (27.4 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for syft_serve-0.2.2.tar.gz
Algorithm Hash digest
SHA256 82e1da7db618f6cd4bede37c379607ba640dbe0146e469ae62156ae8e44235a5
MD5 815443541da41d651d2dd7cb5b916f06
BLAKE2b-256 4fe10ce343bf5860fae2442aadc179d398ff06f3af6b6a0af5088cc04b9bbc7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for syft_serve-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c45aaf83a9e108585ad46982fb15bb52ef88db880fb124627a06e7b8a8bdfab8
MD5 40cc88062cd6648cb520f984238ed7e9
BLAKE2b-256 a50cebc0588eb9e888ea0fca8277db61a01c760604db546e96d95bb05c392b02

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