Module Contents¶
Classes¶
Flatbuffers type. |
|
FlatBuffers enum type. |
|
crossbar.interfaces.IInventory |
Functions¶
|
|
|
|
|
|
|
|
|
- class autobahn.xbr._schema.FbsType(repository: FbsRepository, schema: FbsSchema, basetype: int, element: int, index: int, objtype: Optional[str] = None, elementtype: Optional[str] = None)[source]¶
Bases:
object
Flatbuffers type.
- property repository: FbsRepository¶
- property index: int¶
If basetype == Object, index into “objects”. If base_type == Union, UnionType, or integral derived from an enum, index into “enums”. If base_type == Vector && element == Union or UnionType.
- Returns
- property elementtype: Optional[str]¶
If basetype == Vector, fully qualified element type name.
- Returns
- __slots__ = ['_repository', '_schema', '_basetype', '_element', '_index', '_objtype', '_elementtype']¶
- UType¶
- Bool¶
- Byte¶
- UByte¶
- Short¶
- UShort¶
- Int¶
- UInt¶
- Long¶
- ULong¶
- Float¶
- Double¶
- String¶
- SCALAR_TYPES¶
- Vector¶
- Obj¶
- Union¶
- STRUCTURED_TYPES¶
- FBS2PY¶
- FBS2PY_TYPE¶
- FBS2FLAGS¶
- FBS2PREPEND¶
- FBS2STR¶
- STR2FBS¶
- class autobahn.xbr._schema.FbsField(repository: FbsRepository, schema: FbsSchema, name: str, type: FbsType, id: int, offset: int, default_int: int, default_real: float, deprecated: bool, required: bool, attrs: Dict[str, FbsAttribute], docs: str)[source]¶
Bases:
object
- property repository: FbsRepository¶
- property attrs: Dict[str, FbsAttribute]¶
- __slots__ = ['_repository', '_schema', '_name', '_type', '_id', '_offset', '_default_int', '_default_real',...¶
- class autobahn.xbr._schema.FbsObject(repository: FbsRepository, schema: FbsSchema, declaration_file: str, name: str, fields: Dict[str, FbsField], fields_by_id: List[FbsField], is_struct: bool, min_align: int, bytesize: int, attrs: Dict[str, FbsAttribute], docs: str)[source]¶
Bases:
object
- property repository: FbsRepository¶
- property attrs: Dict[str, FbsAttribute]¶
- __slots__ = ['_repository', '_schema', '_declaration_file', '_name', '_fields', '_fields_by_id',...¶
- class autobahn.xbr._schema.FbsRPCCall(repository: FbsRepository, schema: FbsSchema, name: str, id: int, request: FbsObject, response: FbsObject, docs: str, attrs: Dict[str, FbsAttribute])[source]¶
Bases:
object
- property repository¶
- property schema¶
- property name¶
- property id¶
- property request¶
- property response¶
- property docs¶
- property attrs¶
- class autobahn.xbr._schema.FbsService(repository: FbsRepository, schema: FbsSchema, declaration_file: str, name: str, calls: Dict[str, FbsRPCCall], calls_by_id: List[FbsRPCCall], attrs: Dict[str, FbsAttribute], docs: str)[source]¶
Bases:
object
- property repository¶
- property schema¶
- property declaration_file¶
- property name¶
- property calls¶
- property calls_by_id¶
- property attrs¶
- property docs¶
- class autobahn.xbr._schema.FbsEnumValue(repository: FbsRepository, schema: FbsSchema, name: str, id: int, value, docs)[source]¶
Bases:
object
- property repository¶
- property schema¶
- property name¶
- property id¶
- property value¶
- property attrs¶
- property docs¶
- class autobahn.xbr._schema.FbsEnum(repository: FbsRepository, schema: FbsSchema, declaration_file: str, name: str, id: int, values: Dict[str, FbsEnumValue], values_by_id: List[FbsEnumValue], is_union: bool, underlying_type: int, attrs: Dict[str, FbsAttribute], docs: str)[source]¶
Bases:
object
FlatBuffers enum type.
- property repository¶
- property schema¶
- property declaration_file¶
- property name¶
- property id¶
- property values¶
- property values_by_id¶
- property is_union¶
- property underlying_type¶
- property attrs¶
- property docs¶
- class autobahn.xbr._schema.FbsSchema(repository: FbsRepository, file_name: str, file_sha256: str, file_size: int, file_ident: str, file_ext: str, fbs_files: List[Dict[str, str]], root_table: FbsObject, root: zlmdb.flatbuffers.reflection.Schema.Schema, objs: Optional[Dict[str, FbsObject]] = None, objs_by_id: Optional[List[FbsObject]] = None, enums: Optional[Dict[str, FbsEnum]] = None, enums_by_id: Optional[List[FbsEnum]] = None, services: Optional[Dict[str, FbsService]] = None, services_by_id: Optional[List[FbsService]] = None)[source]¶
Bases:
object
- property repository¶
- property file_name¶
- property file_sha256¶
- property file_size¶
- property file_ident¶
- property file_ext¶
- property fbs_files¶
- property root_table¶
- property root¶
- property objs¶
- property objs_by_id¶
- property enums¶
- property enums_by_id¶
- property services¶
- property services_by_id¶
- static load(repository: FbsRepository, sfile: Union[str, io.RawIOBase, IO[bytes]], filename: Optional[str] = None) FbsSchema [source]¶
- Parameters
repository –
sfile –
filename –
- Returns
- class autobahn.xbr._schema.FbsRepository(basemodule: str)[source]¶
Bases:
object
- crossbar.interfaces.IInventory
add: FbsRepository[] - load: FbsSchema[]
https://github.com/google/flatbuffers/blob/master/reflection/reflection.fbs
- property services: Dict[str, FbsService]¶
- property total_count¶
- static from_archive(filename: str) FbsRepository [source]¶
- static from_address(address: str) FbsRepository [source]¶
- load(filename: str) Tuple[int, int] [source]¶
Load and add all schemata from Flatbuffers binary schema files (*.bfbs) found in the given directory. Alternatively, a path to a single schema file can be provided.
- Parameters
filename – Filesystem path of a directory or single file from which to load and add Flatbuffers schemata.
- render(jinja2_env, output_dir, output_lang)[source]¶
- Parameters
jinja2_env –
output_dir –
output_lang –
- Returns
- validate_obj(validation_type: Optional[str], value: Optional[Any])[source]¶
Validate value against the validation type given.
If the application payload does not validate against the provided type, an
autobahn.wamp.exception.InvalidPayload
is raised.- Parameters
validation_type – Flatbuffers type (fully qualified) against to validate application payload.
value – Value to validate.
- Returns
- validate(validation_type: str, args: List[Any], kwargs: Dict[str, Any]) Optional[FbsObject] [source]¶
Validate the WAMP application payload provided in positional argument in
args
and in keyword-based arguments inkwargs
against the FlatBuffers table typevalidation_type
from this repository.If the application payload does not validate against the provided type, an
autobahn.wamp.exception.InvalidPayload
is raised.- Parameters
validation_type – Flatbuffers type (fully qualified) against to validate application payload.
args – The application payload WAMP positional arguments.
kwargs – The application payload WAMP keyword-based arguments.
- Returns
The validation type object from this repository (reference in
validation_type
) which has been used for validation.