pydgraph/simple.py at master · dgraph-io/pydgraph · GitHub IMHO has a very poor programming style. See GitHub - WolfgangFahl/DgraphAndWeaviateTest: Test GraphQL based Dgraph and Weaviate systems for a proposed improvement with unit tests. I could not post the deep links since i am considered a newbie here.
Thanks for sharing this. The code you shared seems like a refactor of pydgraph simple.py example as a python class. It may be better in terms of programming style but the pydgraph example is not meant to be a production quality code. It’s a minimal example that someone can look at to see how to use the client. So, it avoids the boiler plate for creating a class and then creating a class object etc.
Please feel free to raise PR if you still want your suggested improvements. We are open to contributions from the community.