Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python drivers support db-url schemas #4101

Open
digi604 opened this issue Apr 23, 2015 · 8 comments
Open

python drivers support db-url schemas #4101

digi604 opened this issue Apr 23, 2015 · 8 comments

Comments

@digi604
Copy link

digi604 commented Apr 23, 2015

Please support dburl schemas for connections.

[protocol]://[node]/[database]?[options]

this would be something like:

rethinkdb://myhost:1234/myDB

@danielmewes
Copy link
Member

Since this is pretty common in other DBs, I think it would be useful (it could be a separate connect optarg url: ...).

I cannot promise how quickly we'll get to this, but we'll keep it on our list.

Also marking as good_for_contributors.

@sidthekidder
Copy link

Hey, I'd like to start contributing to RethinkDB and this seems a good first issue. I would basically have to modify the init function of CommonOptionsParser in utils_common.py right, to check for a url opt?

@annathelibri
Copy link
Member

Implemented it on the Java driver, on the develop/experimental branch.

@gabor-boros
Copy link
Member

gabor-boros commented Feb 16, 2020

Also, we should support all the connection options through the URL except SSL, so:
host, port, db, auth_key, user, password, timeout

In this case a connection string would look like rethinkdb://user:password@myhost:1234/myDB?auth_key=mykey&timeout=20 where user, password, auth_key and timeout are optional but the other is required (the connection string posted is an example and not working because both auth_key and password are set).

Example

>>> from rethinkdb import r
>>> url = "rethinkdb://admin@127.0.0.1:28015/test?timeout=30"
>>> conn = r.connect(url=url)

@annathelibri
Copy link
Member

Also, I'd suggest adding the db-url syntax to docs, so the driver's documentation can just point to the page on the docs.

@gabor-boros
Copy link
Member

@adriantodt I agree to add the syntax to the docs. The only question is when do we want to release that "feature"/syntax change to the users. I mean ship it with the 2.5.0 release or before? Also, if we extend the docs and add the syntax change to the drivers' API documentation, what do you mean by "driver's documentation can just point to the page on the docs"?

@annathelibri
Copy link
Member

The only question is when do we want to release that "feature"/syntax change to the users. I mean ship it with the 2.5.0 release or before?

There's just so much stuff going on that there's already enough to do a 2.4.1 release for Java and Python drivers, and maybe minor server stuff as well?

what do you mean by "driver's documentation can just point to the page on the docs"?

Java documentation is just sugared HTML, I can point the users that use db-url with a http link into the site documentation.

@gabor-boros
Copy link
Member

As a side note, the python driver is at 2.4.4, because the idea there was to keep 2.4 but the patch version. So 2.4.5 for python, and 2.4.1 for ruby, JavaScript and Java could work I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants