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.3.tar.gz (22.4 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.3-py2.py3-none-any.whl (28.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for syft_serve-0.2.3.tar.gz
Algorithm Hash digest
SHA256 7b8d24a6b84b325e65e5409f7e4d1e59249a6b4ee9e1050eba36f970e9129e13
MD5 7fb97686255d96edef6ec3df58899fa5
BLAKE2b-256 2cc8e3a1a8171b80c0010d8a389bb162d4fd6dfa21cceaa1bb0486d6df20aa12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for syft_serve-0.2.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 852b0c7d70aae870df8cbf7c3e5da1c6385e7a73081654327da5d28f720cafda
MD5 f223ca4e1e98be0f402f8eb229404bf8
BLAKE2b-256 997d78f1ad569cf05edfb6d126fdea754a1508a47ec7dfa956a072c09494bdc1

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