pipecat.http module

Functions for working with HTTP requests.

pipecat.http.get(*args, **kwargs)

Retrieve data using HTTP requests.

Accepts the same parameters as requests.get(), plus the following:

Parameters:poll (time quantity, optional.) – Time to wait between requests.
Yields:record (dict) – Records will contain status, (header, key), encoding, and body keys containing the results returned from each request.
pipecat.http.receive(address, include_body=True, include_client=False, include_method=False, include_path=False, include_version=False)

Receives data sent using HTTP requests.

Provides a simple HTTP server that receives client requests, converting each request into Pipecat records.

Parameters:address ((host, port) tuple, required) – TCP address and IP port to be bound for listening to requests.
Yields:record (dict) – Records will contain client, version, method, path, and body keys containing the content of each request.