If pybasex is using http,  the port is probably not 1984. It would be the port used by the web server that is serving basex rest services. 1984 would usually be the basex server port (not using http).

 

Kendall

 

From: <basex-talk-bounces@mailman.uni-konstanz.de> on behalf of Bridger Dyson-Smith <bdysonsmith@gmail.com>
Date: Tuesday, September 26, 2017 at 8:20 AM
To: Andreas Doering <ado@zurich.ibm.com>
Cc: BaseX <basex-talk@mailman.uni-konstanz.de>
Subject: Re: [basex-talk] pyBaseX url

 

Hi Andreas,

 

On Sep 26, 2017 10:48, "Andreas Doering" <ado@zurich.ibm.com> wrote:

Hello all,

I want to use BaseX in a python environment and
found PyBaseX by Luca Lilianas. Unfortunately, the email address associated with github does not seem to exist.

What is not clear to me how the url has to be formatted.
I tried
'http://localhost:1984:/rest/'
but got timeouts.

Have you tried 'http://localhost:1984/rest/'; e.g. removing the trailing ':'? 


I started a basexserver (with default port/user/password)
and I can create and work with my example database with the
the textual client from BaseX.
But I could not find out how I have to format the url parameter so that the python interface works.

I created a client by
c = BaseXClient('http://localhost:1984:/rest/',default_database=None,user='admin',password='admin')
c.connect
c.create_database('TestName')

The last line hangs in socket read.

The log file does not show anything of that.

Furthermore, it seems, that the current code in github is python2 specific,
or maybe some package it depends on.
I remember that during installation on python3 something broke, so I am using python2 in the moment.
Any plans to port to python3?

Regards,

Andreas

I can't speak to the python3 question, apologies.

 

Best,

Bridger