Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P1436
(An Untitled Masterwork)
Active
Public
Actions
Authored by
douardda
on Aug 29 2022, 6:06 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
import time
import grpc
from swh.graph.rpc import swhgraph_pb2, swhgraph_pb2_grpc
with grpc.insecure_channel("granet.internal.softwareheritage.org:50091") as c:
stub = swhgraph_pb2_grpc.TraversalServiceStub(c)
r = stub.Traverse(swhgraph_pb2.TraversalRequest(
src=("swh:1:rev:085ded6431384d07a8fa1fbaedcc74d8cd6676d5",),
edges="rev:rev",
max_edges=10,
max_depth=10,
))
while not r.done():
time.sleep(1)
print('.', sep='', end='', flush=True)
print()
print(r.result())
Event Timeline
douardda
created this paste.
Aug 29 2022, 6:06 PM
2022-08-29 18:06:36 (UTC+2)
Log In to Comment