swh.graph.client module

exception swh.graph.client.GraphAPIError[source]

Bases: Exception

Graph API Error

exception swh.graph.client.GraphArgumentException(*args, response=None)[source]

Bases: Exception

class swh.graph.client.RemoteGraphClient(url, timeout=None)[source]

Bases: swh.core.api.RPCClient

Client to the Software Heritage Graph.

raw_verb_lines(verb, endpoint, **kwargs)[source]
get_lines(endpoint, **kwargs)[source]
raise_for_status(response) None[source]

check response HTTP status code and raise an exception if it denotes an error; do nothing otherwise

stats()[source]
leaves(src, edges='*', direction='forward', max_edges=0, return_types='*')[source]
neighbors(src, edges='*', direction='forward', max_edges=0, return_types='*')[source]
visit_nodes(src, edges='*', direction='forward', max_edges=0, return_types='*')[source]
visit_edges(src, edges='*', direction='forward', max_edges=0)[source]
visit_paths(src, edges='*', direction='forward', max_edges=0)[source]
walk(src, dst, edges='*', traversal='dfs', direction='forward', limit=None)[source]
random_walk(src, dst, edges='*', direction='forward', limit=None, return_types='*')[source]
count_leaves(src, edges='*', direction='forward')[source]
count_neighbors(src, edges='*', direction='forward')[source]
count_visit_nodes(src, edges='*', direction='forward')[source]