HI day 1 newbie - I'm trying to work out how to re...
# spicedb
m
HI day 1 newbie - I'm trying to work out how to read relationships written in the example here https://github.com/authzed/authzed-py/tree/main/examples/v1 - I am able to write, but can't wok out how to read - any pointers? I'm not sure how to access the relationships in the response.....
Copy code
python
resp = client.WriteRelationships(
    WriteRelationshipsRequest(updates=[RelationshipUpdate(operation=RelationshipUpdate.Operation.OPERATION_CREATE,
                                                          relationship=Relationship(
                                                              resource=ObjectReference(object_type="play2/post",
                                                                                       object_id="3"),
                                                              relation="writer",
                                                              subject=SubjectReference(
                                                                  object=ObjectReference(object_type="play2/user",
                                                                                         object_id="emilia"))))])
)

# do I need to specify object types, I guess not
resp = client.ReadRelationships(ReadRelationshipsRequest())

# hmm nothing here
print(resp.details())