Skip to main content

fustor-receiver-http

HTTP Receiver for Fustor Fusion - implements the transport layer for receiving events from Agents.

Overview

This package provides an HTTP-based implementation of the Receiver transport abstraction. It creates FastAPI routers that handle session management and event ingestion.

Installation

pip install fustor-receiver-http

Usage

from fustor_receiver_http import HTTPReceiver, SessionInfo

# Create receiver
receiver = HTTPReceiver(
    receiver_id="main-receiver",
    config={"session_timeout_seconds": 30}
)

# Register API keys for pipes
receiver.register_api_key("fk_abc123", "pipe-1")

# Register callbacks
async def on_session_created(session_id, task_id, pipe_id, client_info):
    # Handle session creation
    return SessionInfo(
        session_id=session_id,
        task_id=task_id,
        pipe_id=pipe_id,
        role="leader",
        created_at=time.time(),
        last_heartbeat=time.time()
    )

async def on_event_received(session_id, events, source_type, is_end):
    # Process events
    return True

receiver.register_callbacks(
    on_session_created=on_session_created,
    on_event_received=on_event_received,
)

# Mount routers in FastAPI app
app.include_router(receiver.get_session_router(), prefix="/api/v1/pipe/session")
app.include_router(receiver.get_ingestion_router(), prefix="/api/v1/pipe/ingest")

API Endpoints

Session Router

  • POST / - Create a new session
  • POST /{session_id}/heartbeat - Send heartbeat
  • DELETE /{session_id} - Terminate session

Ingestion Router

  • POST /{session_id}/events - Ingest event batch

Entry Points

This package registers itself as:

  • fustor.receivers:http - Receiver registry

Release files for fustor-receiver-http 0.8.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fustor-receiver-http 0.8.17
File Size Uploaded
fustor_receiver_http-0.8.17.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fustor-receiver-http 0.8.17
File Interpreter ABI Platform
fustor_receiver_http-0.8.17-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / fustor_receiver_http-0.8.17.tar.gz

Download URL fustor_receiver_http-0.8.17.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ab47ea1ca0a8d926beaf59c4a3cc882398d2ac84efbcfdfca5e322cca509b825
BLAKE2b-256 checksum
How to use checksums
18c72df20540c4029d7a205cd21c78046937a5f4505b9dbc9018bdddc891b35a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Release files / fustor_receiver_http-0.8.17-py3-none-any.whl

Download URL fustor_receiver_http-0.8.17-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bda02ca7d5c1db98fad496571d7bfc82eb1cf856dff5d551effbc546a8d54c05
BLAKE2b-256 checksum
How to use checksums
47b20aee38ce8075c34c038c284077f0afc915f7e2c829f923bd32c85cfbc313
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Release history Release notifications | RSS feed

This release

0.8.17 This release

2 release files

0.8.16

2 release files

0.8.15

2 release files

0.8.14

2 release files

0.8.13

2 release files

0.8.12

2 release files

0.8.11

2 release files

0.8.10

2 release files

0.8.9

2 release files

0.8.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page