swh.graph.http_client module#

exception swh.graph.http_client.GraphAPIError[source]#

Bases: Exception

Graph API Error

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

Bases: Exception

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

Bases: 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='*', max_matching_nodes=0)[source]#
neighbors(src, edges='*', direction='forward', max_edges=0, return_types='*', max_matching_nodes=0)[source]#
visit_nodes(src, edges='*', direction='forward', max_edges=0, return_types='*', max_matching_nodes=0)[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', max_matching_nodes=0)[source]#
count_neighbors(src, edges='*', direction='forward')[source]#
count_visit_nodes(src, edges='*', direction='forward', max_matching_nodes=0)[source]#