3 class LocalClasses(dict):
5 self[cls.__name__] = cls
9 This is pretty much used exclusively for the 'jsonclass'
10 functionality... set use_jsonclass to False to turn it off.
11 You can change serialize_method and ignore_attribute, or use
12 the local_classes.add(class) to include "local" classes.
15 # Change to False to keep __jsonclass__ entries raw.
16 serialize_method = '_serialize'
17 # The serialize_method should be a string that references the
18 # method on a custom class object which is responsible for
19 # returning a tuple of the constructor arguments and a dict of
21 ignore_attribute = '_ignore'
22 # The ignore attribute should be a string that references the
23 # attribute on a custom class object which holds strings and / or
24 # references of the attributes the class translator should ignore.
25 classes = LocalClasses()
26 # The list of classes to use for jsonclass translation.
28 # Version of the JSON-RPC spec to support
29 user_agent = 'jsonrpclib/0.1 (Python %s)' % \
30 '.'.join([str(ver) for ver in sys.version_info[0:3]])
31 # User agent to use for calls.