Simple Python client
-
Discussion
-
Dear all,
We talked about clients accessing the collection API – I wrote a short
Python script which uses only the two functions “Give me all
collections” and “Give me all members of a collection” to create a
(recursive) graph out of the content of a collectors API instance in Dot
language.
Visualized with GraphViz, the graph looks like this:
https://github.com/TomZastrow/collection-api/blob/master/graph.png
Here is the Python script:
https://github.com/TomZastrow/collection-api/blob/master/recursion.py
In general, this works only with collections on a local instance because
we can’t detect if a member of collection is a collection somewhere
else. Would need to integrate PIT API functionality for that.
Best,
Tom
Log in to reply.