Previous topic

Protocol Base Class

Next topic

Xml

This Page

Http

The spyne.protocol.http module contains the HttpRpc protocol implementation.

class spyne.protocol.http.HttpPattern(address=None, verb=None, host=None, endpoint=None)[source]

Bases: object

Experimental. Stay away.

Parameters:
  • address – Address pattern
  • verb – HTTP Verb pattern
  • host – HTTP “Host:” header pattern
address None[source]
as_werkzeug_rule()[source]
hello(descriptor)[source]
host None[source]
verb None[source]
class spyne.protocol.http.HttpRpc(app=None, validator=None, mime_type=None, tmp_dir=None, tmp_delete_on_close=True, ignore_uncap=False, parse_cookie=True, hier_delim='.', strict_arrays=False)[source]

Bases: spyne.protocol.dictdoc.SimpleDictDocument

The so-called HttpRpc protocol implementation. It only works with Http (wsgi and twisted) transports.

Parameters:
  • app – An :class:’spyne.application.Application` instance.
  • validator – Validation method to use. One of (None, ‘soft’)
  • mime_type – Default mime type to set. Default is ‘application/octet-stream’
  • tmp_dir – Temporary directory to store partial file uploads. Default is to use the OS default.
  • tmp_delete_on_close – The delete argument to the tempfile.NamedTemporaryFile. See: http://docs.python.org/2/library/tempfile.html#tempfile.NamedTemporaryFile.
  • ignore_uncap – As HttpRpc can’t serialize complex models, it throws a server exception when the return type of the user function is Complex. Passing True to this argument prevents that by ignoring the return value.
create_in_document(ctx, in_string_encoding=None)[source]
create_out_string(ctx, out_string_encoding='utf8')[source]
decompose_incoming_envelope(ctx, message)[source]
default_binary_encoding

alias of BINARY_ENCODING_URLSAFE_BASE64

deserialize(ctx, message)[source]
get_tmp_delete_on_close()[source]
mime_type = 'text/plain'
serialize(ctx, message)[source]
set_tmp_delete_on_close(val)[source]
set_validator(validator)[source]
tmp_delete_on_close None
type = set(['http'])
spyne.protocol.http.get_stream_factory(dir=None, delete=True)[source]