swh.graph.server.app module

A proxy HTTP server for swh-graph, talking to the Java code via py4j, and using FIFO as a transport to stream integers between the two languages.

swh.graph.server.app.stream_response(request, content_type='text/plain', *args, **kwargs)[source]
async swh.graph.server.app.index(request)[source]
async swh.graph.server.app.stats(request)[source]
swh.graph.server.app.get_direction(request)[source]

validate HTTP query parameter direction

swh.graph.server.app.get_edges(request)[source]

validate HTTP query parameter edges, i.e., edge restrictions

swh.graph.server.app.get_traversal(request)[source]

validate HTTP query parameter traversal, i.e., visit order

swh.graph.server.app.get_limit(request)[source]

validate HTTP query parameter limit, i.e., number of results

swh.graph.server.app.node_of_pid(pid, backend)[source]

lookup a PID in a pid2node map, failing in an HTTP-nice way if needed

swh.graph.server.app.pid_of_node(node, backend)[source]

lookup a node in a node2pid map, failing in an HTTP-nice way if needed

swh.graph.server.app.get_simple_traversal_handler(ttype)[source]
swh.graph.server.app.get_walk_handler(random=False)[source]
async swh.graph.server.app.visit_paths(request)[source]
swh.graph.server.app.get_count_handler(ttype)[source]
swh.graph.server.app.make_app(backend, **kwargs)[source]