1

I am trying to connect to rethink db(has a python driver) from my java app. RethinkDB python install section https://www.rethinkdb.com/docs/install-drivers/python/ does not have a place to explicitly download the python modules. Because for me, I am trying to use jython to connect and it fails with following

code:

 String s = "import rethinkdb as r\n" +
                "r.connect('localhost', 28015).repl()\n" +
                "r.table('tv_shows').insert({ 'name': 'Star Trek TNG' }).run()";

        PyCode code = python.compile(s);
        python.exec(code);
        System.out.println("Done..");

Error:

Exception in thread "main" Traceback (most recent call last): File "", line 1, in ImportError: No module named rethinkdb

Any idea on where can I get the rethinkdb module explicitly and how I can made it available to my Java app ? (assume to out that into class path)

Subash Chaturanga
  • 814
  • 2
  • 10
  • 20

1 Answers1

0

The currently released Python driver is always up on PyPi, and you can download it directly from: https://pypi.python.org/pypi/rethinkdb

I am not a Jython user, so I can best direct you to this question about modules: How can I install various Python libraries in Jython?

I should also note that an official Java driver was recently released: http://rethinkdb.com/blog/official-java-driver/

Community
  • 1
  • 1
larkost
  • 89
  • 3