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

Implement dsn support for connect() method #170

Open
artembo opened this issue Aug 26, 2020 · 0 comments
Open

Implement dsn support for connect() method #170

artembo opened this issue Aug 26, 2020 · 0 comments
Labels
Database API feature A new functionality

Comments

@artembo
Copy link
Contributor

artembo commented Aug 26, 2020

Pep 249 suggests a constructor method of Connection objects .connect()

It takes the following parameters as arguments:

Parameter Meaning
dsn Data source name as string
user User name as string (optional)
password Password as string (optional)
host Hostname (optional)
database Database name (optional)
kwargs It is not from the standard but we use it for the method signature scalability.

Implement dsn parser utility to pass the settings to the Connection init by only one line.

The pattern can be used ([[[username[:password]@]host:]port)

@artembo artembo mentioned this issue Aug 26, 2020
@Totktonada Totktonada added Database API feature A new functionality labels Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Database API feature A new functionality
Projects
None yet
Development

No branches or pull requests

3 participants