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.1.0.tar.gz (15.7 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.1.0-py2.py3-none-any.whl (20.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for syft_serve-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0afd804c363f05e334b9d0ad03e7cb1a1c9b5f6965b039aee96c2c54eba895a
MD5 67249c3e5e720b9fd098b04f4fb69e26
BLAKE2b-256 60f933730aea3121f9c8e503789f6945dc941a2241d06f99b192df8ac5a633a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for syft_serve-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a789fd04e265974b0cd5eef6f8b42e542e53554745edb3acaec3e8a09c263ec0
MD5 bf965377694741515453b52ed99457c3
BLAKE2b-256 af3e41768a7cae2c418d6032d1b50a0226c46ea4c67bd838a0c2b691fa81d3ae

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