Inspecting proposals

class pymavryk.protocol.protocol.Protocol(proto)[source]
diff = <function Protocol.diff> Calculates file diff between two protocol versions.  :param proto: an instance of Protocol :param context_size: number of context lines before and after the change :returns: patch in proto format [source]
export_html = <function Protocol.export_html> Generates github-like side-by-side diff viewe, powered by diff2html.js  :param output_path: will write to this file if specified :returns: html string if path is not specified [source]
export_tar = <function Protocol.export_tar> Creates a tarball and dumps to a file or returns bytes.  :param output_path: Path to the tarball [optional]. You can add .bz2 or .gz extension to make it compressed :returns: bytes if path is None or nothing [source]
classmethod from_uri(uri)[source]

Loads protocol implementation from various sources and converts it to the RPC-like format.

Parameters:

uri – link/path to a tar archive or path to a folder with extracted contents

Returns:

Protocol instance

hash()[source]
index = <function Protocol.index> Generates TEZOS_PROTOCOL file.  :returns: dict with protocol hash and modules [source]
patch = <function Protocol.patch> Applies unified diff and returns full-fledged protocol.  :param patch: an instance of Protocol containing diff of files :returns: Protocol instance [source]
pymavryk.protocol.protocol.dir_to_files(path) List[Tuple[str, str]][source]
pymavryk.protocol.protocol.files_to_proto(files: List[Tuple[str, str]]) dict[source]
pymavryk.protocol.protocol.files_to_tar(files: List[Tuple[str, str]], output_path=None)[source]
pymavryk.protocol.protocol.proto_to_bytes(proto: dict) bytes[source]
pymavryk.protocol.protocol.proto_to_files(proto: dict) List[Tuple[str, str]][source]
pymavryk.protocol.protocol.tar_to_files(path=None, raw=None) List[Tuple[str, str]][source]
pymavryk.protocol.protocol.url_to_files(url) List[Tuple[str, str]][source]