tarantool-python icon indicating copy to clipboard operation
tarantool-python copied to clipboard

Implement dsn support for connect() method

Open artembo opened this issue 4 years ago • 0 comments

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 avatar Aug 26 '20 00:08 artembo