remcall package

Submodules

remcall.error module

exception remcall.error.DuplicateMethodReturnValue(request_id)[source]

Bases: remcall.error.RemcallError

exception remcall.error.DuplicateRegistrationForMethodReturn(request_id)[source]

Bases: remcall.error.RemcallError

exception remcall.error.MethodNotAvailable(method, impl_method_name, this)[source]

Bases: remcall.error.RemcallError

exception remcall.error.MissingMethodReturnValueEvent(request_id)[source]

Bases: remcall.error.RemcallError

exception remcall.error.RemcallError[source]

Bases: Exception

exception remcall.error.UnknownCommand(command)[source]

Bases: remcall.error.RemcallError

exception remcall.error.UnknownImplementationObjectReference(key)[source]

Bases: remcall.error.RemcallError

exception remcall.error.UnknownProxyObject(obj)[source]

Bases: remcall.error.RemcallError

exception remcall.error.UnknownType(typ)[source]

Bases: remcall.error.RemcallError

exception remcall.error.WrongNumberOfBytesRead(bytes_requested, bytes_read, offset)[source]

Bases: remcall.error.RemcallError

remcall.generate module

class remcall.generate.CSharphCodeGenerator(schema, namespace='Remcall.Generated', name_converter=<remcall.naming.CSharpNameConverter object>)[source]

Bases: object

dedent()[source]
indent()[source]
indent_chars = '\t'
linebreak()[source]
scalartypename(typ)[source]
type_names = {Primitive("void"): 'void', Primitive("boolean"): 'bool', Primitive("int8"): 'SByte', Primitive("uint8"): 'byte', Primitive("int16"): 'Int16', Primitive("uint16"): 'UInt16', Primitive("int32"): 'Int32', Primitive("uint32"): 'UInt32', Primitive("int64"): 'Int64', Primitive("uint64"): 'UInt64', Primitive("float32"): 'float', Primitive("float64"): 'double', Primitive("string"): 'string', Primitive("date"): 'DateTime', Primitive("time"): 'Time', Primitive("datetime"): 'DateTime'}
typename(typ)[source]
write_enum(enum)[source]
write_interface(interface)[source]
write_method(method)[source]
write_record(record)[source]
write_schema(fp)[source]
writeline(s)[source]

remcall.implementation module

class remcall.implementation.EnumRecordImplementation(schema, name_converter)[source]

Bases: object

class remcall.implementation.RecordType[source]

Bases: object

remcall.implementation.create_enum_implementation(enum, name_converter)[source]
remcall.implementation.create_record_implementation(record, name_converter)[source]

remcall.naming module

class remcall.naming.CSharpNameConverter[source]

Bases: remcall.naming.IdentityNameConverter

interface_name(name)[source]
parameter_name(name)[source]
class remcall.naming.IdentityNameConverter[source]

Bases: object

enum_field_name(name)[source]
enum_name(name)[source]
interface_name(name)[source]
method_name(name)[source]
parameter_name(name)[source]
record_field_name(name)[source]
record_name(name)[source]
type_name(typ: remcall.schema.core.Type)[source]
class remcall.naming.PythonNameConverter[source]

Bases: remcall.naming.IdentityNameConverter

enum_field_name(name)[source]
method_name(name)[source]
parameter_name(name)[source]
record_field_name(name)[source]
type_name(typ: remcall.schema.core.Type)[source]

remcall.util module

class remcall.util.QueueStream(name=None)[source]

Bases: object

flush()[source]
read(size: int)[source]
stream_counter = 0
write(data: bytes)[source]
class remcall.util.TypeWrapper(typ, name_converter)[source]

Bases: object

Wraps a core.Type and provides a nice annotation for Signature instances

remcall.util.view_hex(b: bytes)[source]

Module contents

Remcall (short for remote method calls) is a protocol for inter process communication (IPC) between different programming languages using object proxying as its primary method for information exchange. Communication using remcall requires the upfront definition of a schema (comprised of record and enum types and more importantly interfaces with method signatures) which then depending on the programming language is compiled or interpreted. Both communication participants are then free to implement any or none of the interfaces and reference concrete objects to the other side which will be represented using proxy objects. There is a certain distinction between a server (waiting for connections, serving and entry point) and a client (initiating a connection, performing the first method call) in remcall, but the protocol allows for method calls and object proxying in both directions. Remcall employs a binary representation for both, its schema and its communication protocol. Communcation can be layered on top of any bidirectional streams supporting binary data such as TCP sockets, stdin/out, websockets.