pyBaseX url
Tuesday, 26 September 2017 · 1 message
KS
Kendall Shaw26 Sep 2017 18:16 #
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
Quoted text · 34 lines
From: <basex-talk-bounces at mailman.uni-konstanz.de> on behalf of Bridger Dyson-Smith <bdysonsmith at gmail.com> Date: Tuesday, September 26, 2017 at 8:20 AM To: Andreas Doering <ado at zurich.ibm.com> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] pyBaseX url Hi Andreas, On Sep 26, 2017 10:48, "Andreas Doering" <ado at zurich.ibm.com<mailto:ado at 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/<https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A1984_rest_&d=DwMFaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=JgwnBEpN1c-DDmq-Up2QMq9rrGyfWK0KtSpT7dxRglA&m=vkvRcYv4M28bGeYb9BDYMIruu8pY9f70v9oGsahgB0Y&s=n6cs1v2KvRW9TXoN6QKdCk66WP10lQ9o9hOZTi0LTMA&e=>'; 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/<https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A1984-3A_rest_&d=DwMFaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=JgwnBEpN1c-DDmq-Up2QMq9rrGyfWK0KtSpT7dxRglA&m=vkvRcYv4M28bGeYb9BDYMIruu8pY9f70v9oGsahgB0Y&s=pylIoP0UXvsemU8HK7Irdizv6s_-UPgiFfvSGb1NmGY&e=>',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
Written for BaseX 8.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery