List pydgraph incompatabilities with v0.9

Moved from GitHub pydgraph/18

Posted by kochhar:

The dgraph website says:

Incomplete

A lot of development has gone into the Go client and the Python client is not up to date with it. The Python client is not compatible with dgraph v0.9.0 and onwards. We are looking for help from contributors to bring it up to date.

Is there a list of incompatibilities available? I’d be willing to contribute some patches to pydgraph.

Levatius commented :

I would also be interested in finding out what needs to be updated.

jimanvlad commented :

Linking to: python Driver · Issue #1847 · dgraph-io/dgraph · GitHub
@pawanrawal Any ideas?

pawanrawal commented :

The client needs to be refactored from scratch because the API has changed significantly. It should be very easy to do so though if one follows the Go client. All the code is less than 300 lines of code (txn.go and client.go).

We also have clients in JS and Java which you could follow. Happy to accept contributions!

kochhar commented :

Seems like the API protobuf is defined here: https://github.com/dgraph-io/dgraph/blob/master/protos/api.proto

Thanks, this is very helpful.

jimanvlad commented :

@kochhar: @Levatius and I are planning to allocate some resource to this next week. Would be great to see where you got so far and see if we can collab.

kochhar commented :

I have a rough working client with new protobufs in a branch. It needs a proper set of tests. I will update the present tests with the new interface.
https://github.com/kochhar/pydgraph/tree/kochhar/v0.9.4+

I still need to add async support but I’m not sure where to find the grpc docs for async interfaces. This is a good point to extend.

jimanvlad commented :

Hi, we have our first working version here: GitHub - jimanvlad/pydgraph: Python client for Dgraph
Will document and extend with async.

pawanrawal commented :

Great work guys! If we can also add some integration tests that would be awesome.

We have a bunch of them for the Go client at dgraph/contrib/integration at master · dgraph-io/dgraph · GitHub though not all are important. acctupsert, bank and testtxn should be good.

jimanvlad commented :

@pawanrawal Is there any document that explains transactions via grpc technically? We’re trying to get our head around them and how to add them to the python module in an intuitive way.

kochhar commented :

Hi Vlad, would you like to collaborate on this? I have implemented txns in
my fork, we could merge these together to save on duplication.

On 09-Jan-2018 3:43 pm, “Vlad Jiman” notifications@github.com wrote:

@pawanrawal https://github.com/pawanrawal Is there any document that
explains transactions via grpc technically? We’re trying to get our head
around them and how to add them to the python module in an intuitive way.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dgraph-io/pydgraph/issues/18#issuecomment-356240286,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGVqmEaSLmcypeOsuj-MEClZPKVY6dBks5tIzvLgaJpZM4RLkya
.

jimanvlad commented :

@kochhar Sure, are you on Slack / any other way of collaborating?

kochhar commented :

@jimanvlad sure, I’ve joined the pydgraph slack, will ping you there.

kochhar commented :

I’ve opened a PR here: Bringing dgraph client up to speed with API version 0.9.4+ by kochhar · Pull Request #19 · dgraph-io/pydgraph · GitHub

  • acct upsert integration test is passing

To run, pip install pydgraph then:
python tests/test_integration.py

gpahal commented :

I have created a pull request for a revamped pydgraph with support for Dgraph v1
See: Add Dgraph v1 support and make the interface compatible with other clients by gpahal · Pull Request #21 · dgraph-io/pydgraph · GitHub

It would really help if someone could give it a try and report problems and bugs.

gpahal commented :

Pushed to master.