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