=q ~= d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ dd lm Z G d
de
Zd Zd
Z
d Zd Zd ZdS )a Provides the :class:`~sqlalchemy.engine.url.URL` class which encapsulates
information about a database connection specification.
The URL object is created automatically when
:func:`~sqlalchemy.engine.create_engine` is called with a string
argument; alternatively, the URL is a public-facing construct which can
be used directly and is also accepted directly by ``create_engine()``.
N )Dialect )exc)util)plugins)registryc e Zd ZdZ ddZddZd Zd Zd Zd Z d
Z
ed Zej
d Zd
Zd Zd Zd Zd Zg fdZdS )URLaX
Represent the components of a URL used to connect to a database.
This object is suitable to be passed directly to a
:func:`~sqlalchemy.create_engine` call. The fields of the URL are parsed
from a string by the :func:`.make_url` function. The string
format of the URL is an RFC-1738-style string.
All initialization parameters are available as public attributes.
:param drivername: the name of the database backend.
This name will correspond to a module in sqlalchemy/databases
or a third party plug-in.
:param username: The user name.
:param password: database password.
:param host: The name of the host.
:param port: The port number.
:param database: The database name.
:param query: A dictionary of options to be passed to the
dialect and/or the DBAPI upon connect.
Nc || _ || _ || _ || _ |t | | _ nd | _ || _ |pi | _ d S N)
drivernameusernamepassword_originalhostintportdatabasequery)selfr r passwordr r r r s i/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/sqlalchemy/engine/url.py__init__zURL.__init__8 sS %
!) D DIIDI
[b
Tc j dz } j A|t j z
} j |d|rdnt j z z
}|dz
} j !d j v r|d j z z
}n
| j z
} j |dt
j z z
} j
|d j z z
} j rOt j }|
|dd fd |D z z
}|S )
Nz://:z***@z[%s]/?&c 3 K | ]Q}t j j | D ]/}t j | d t j | V 0RdS )=N)r to_listr
quote_plus).0kelementr s r