Package gavo :: Package svcs :: Module streaming
[frames] | no frames]

Module streaming

source code

Streaming out large computed things using twisted and threads.

Classes
  StopWriting
clients can raise this when they want the stream to abort.
  DataStreamer
is a twisted-enabled Thread to stream out large files produced on the fly.
Functions
 
streamOut(writeStreamTo, request)
sets up the thread to have writeStreamTo write to request from a thread.
source code
 
streamVOTable(request, data, **contextOpts)
streams out the payload of an SvcResult as a VOTable.
source code
Variables
  __package__ = 'gavo.svcs'
Function Details

streamOut(writeStreamTo, request)

source code 

sets up the thread to have writeStreamTo write to request from a thread.

For convenience, this function returns request.deferred, you you can write things like return streamOut(foo, request) in your renderHTTP (or analoguous).