Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
create.cpython-313.pyc547 linesDownload Raw Back to __pycache__
1�

2��j��!��SSKJr SSKrSSKrSSKJr SSKJr SSKJr SSKJr SSKJr SSKJ	r	 SS	KJ3r4 SS5KJr SSKJr SS
K
Jr SSK
Jr SSKJr SSKJr SSK
Jr SSK
Jr SSK
Jr SSKJr SSKJr SSKJr SSKJr \R<(aBSSKJr SSKJ r  SSKJ!r! SSKJ"r" SSKJ#r# SSK$J%r% SSKJ&r& SS KJ'r' SS!KJ(r( SS"KJ)r) SS#K*J+r+ \6S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S$S%.S;S-jj5r,\7S<S.j5r,\RZ"S/S0S1S29S=S3j5r,S>S?S4jjr.\8S$S$S$S$S$S$S$S$S5.S@S6jj5r/\9SAS7j5r/SAS8jr/\"S'S&S+S)S9S*S(S,S:.5r0g)B�)�annotationsN)�Any)�Callable)�cast)�Dict)�List)�Optional)�overload)�Type)�Union�)�base)�url)�DBAPIConnection)�create_mock_engine�)�event)�exc)�util)�_AdhocProxiedConnection)�ConnectionPoolEntry)�compiler)�
immutabledict)�Engine)�_ExecuteOptions)�_ParamStyle)�IsolationLevel)�URL)�
_EchoFlagType)�_CreatorFnType)�_CreatorWRecFnType)�_ResetStyleArgType)�Pool)�Literal.)�connect_args�convert_unicode�creator�echo�	echo_pool�enable_from_linting�execution_options�hide_parameters�implicit_returning�insertmanyvalues_page_size�isolation_level�json_deserializer�json_serializer�label_length�logging_name�max_identifier_length�max_overflow�module�10paramstyle�pool�	poolclass�pool_logging_name�
pool_pre_ping�	pool_size�pool_recycle�pool_reset_on_return�pool_timeout�
pool_use_lifo�plugins�query_cache_size�use_insertmanyvaluesr)r:r;r=r>r?r@c ��g�N�)"rr%r&r'r(r)r*r+�futurer,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrC�kwargss"                                  �^D:\code\apps\devtools\python\user_packages\Python313\site-packages\sqlalchemy/engine/create.py�
create_enginerJ0s��J�c��grErF�rrHs  rIrJrJXs��BErK)�1.4a"The :paramref:`_sa.create_engine.strategy` keyword is deprecated, and the only argument accepted is 'mock'; please use :func:`.create_mock_engine` going forward.  For general customization of create_engine which may have been accomplished using strategies, see :class:`.CreateEnginePlugin`.)rNaThe :paramref:`_sa.create_engine.empty_in_strategy` keyword is deprecated, and no longer has any effect.  All IN expressions are now rendered using the "expanding parameter" strategy which renders a set of boundexpressions, or an "empty set" SELECT, at statement executiontime.)�2.0zvThe :paramref:`_sa.create_engine.implicit_returning` parameter is deprecated and will be removed in a future release. )�strategy�empty_in_strategyr-c��^^^^^^ ^!�ST;a<TRS5nUS:Xa[U40TD6$[R"SU-5eTRSS5 [R11"U5nUR
T5up4mUR5nTRSS5nU(aURU5mOURU5mTRSS5(aS0S1UU4S	jjjnOTRn0n[R"T5Hn	U	T;dMU"U	5X�'M TRS12S5n13U14c�0nSTR;a
TRnOj[TS5(aM[R "TR"5(a([R$"S
TS3S5 TR"nOTRn[R&"U5Hn	U	T;dMU"U	5X�'M U"S20UD6n15X�S'UR)S[*R,5 TRSS5n
U
(aUS==[*R.-ss'UHnUR1TU5 M T"S20UD6mTR3U5umn[R4"U5R7U"S055mST;a5[R8"TS5(a[R$"SS5 U"SS5nUc�S0S3UUU4SjjjnU"SU5nU"SS5nUcTR;U5nST0n[R"U5H+n	[<R?X�5nUT;dM U"U5UU	'M- UHnURAUU5 M U"U40UD6nOTUl![US5(a\URDTRFLaC[R"SURHRJSTRF(dSOSS 3S!S"9eU"S#S5(d[R"S$5e[LRNn0n[R"U5Hn	U	T;dMU"U	5UU	'M TRS%S5nT(ad[QS&S'RSS(T55<S)TRHRJ<S*URHRJ<S*URJ<S+3	5eU"UTU40UD6m!U(a�TRUU5m T (a&S4U 4S,jjn[VRX"US-U5 TR[5nU(a[VRX"US-U5 S4UU!4S.jjnRX"US-USS/9 TR]T!5 UTLaUR]T!5 UHnUR]T!5 M T!$)5aUCCreate a new :class:`_engine.Engine` instance.16 17The standard calling form is to send the :ref:`URL <database_urls>` as the18first positional argument, usually a string19that indicates database dialect and connection arguments::20 21    engine = create_engine("postgresql+psycopg2://scott:tiger@localhost/test")22 23.. note::24 25    Please review :ref:`database_urls` for general guidelines in composing26    URL strings.  In particular, special characters, such as those often27    part of passwords, must be URL encoded to be properly parsed.28 29Additional keyword arguments may then follow it which30establish various options on the resulting :class:`_engine.Engine`31and its underlying :class:`.Dialect` and :class:`_pool.Pool`32constructs::33 34    engine = create_engine(35        "mysql+mysqldb://scott:tiger@hostname/dbname",36        pool_recycle=3600,37        echo=True,38    )39 40The string form of the URL is41``dialect[+driver]://user:password@host/dbname[?key=value..]``, where42``dialect`` is a database name such as ``mysql``, ``oracle``,43``postgresql``, etc., and ``driver`` the name of a DBAPI, such as44``psycopg2``, ``pyodbc``, ``cx_oracle``, etc.  Alternatively,45the URL can be an instance of :class:`~sqlalchemy.engine.url.URL`.46 47``**kwargs`` takes a wide variety of options which are routed48towards their appropriate components.  Arguments may be specific to49the :class:`_engine.Engine`, the underlying :class:`.Dialect`,50as well as the51:class:`_pool.Pool`.  Specific dialects also accept keyword arguments that52are unique to that dialect.   Here, we describe the parameters53that are common to most :func:`_sa.create_engine()` usage.54 55Once established, the newly resulting :class:`_engine.Engine` will56request a connection from the underlying :class:`_pool.Pool` once57:meth:`_engine.Engine.connect` is called, or a method which depends on it58such as :meth:`_engine.Engine.execute` is invoked.   The59:class:`_pool.Pool` in turn60will establish the first actual DBAPI connection when this request61is received.   The :func:`_sa.create_engine` call itself does **not**62establish any actual DBAPI connections directly.63 64.. seealso::65 66    :doc:`/core/engines`67 68    :doc:`/dialects/index`69 70    :ref:`connections_toplevel`71 72:param connect_args: a dictionary of options which will be73    passed directly to the DBAPI's ``connect()`` method as74    additional keyword arguments.  See the example75    at :ref:`custom_dbapi_args`.76 77:param creator: a callable which returns a DBAPI connection.78    This creation function will be passed to the underlying79    connection pool and will be used to create all new database80    connections. Usage of this function causes connection81    parameters specified in the URL argument to be bypassed.82 83    This hook is not as flexible as the newer84    :meth:`_events.DialectEvents.do_connect` hook which allows complete85    control over how a connection is made to the database, given the full86    set of URL arguments and state beforehand.87 88    .. seealso::89 90        :meth:`_events.DialectEvents.do_connect` - event hook that allows91        full control over DBAPI connection mechanics.92 93        :ref:`custom_dbapi_args`94 95:param echo=False: if True, the Engine will log all statements96    as well as a ``repr()`` of their parameter lists to the default log97    handler, which defaults to ``sys.stdout`` for output.   If set to the98    string ``"debug"``, result rows will be printed to the standard output99    as well. The ``echo`` attribute of ``Engine`` can be modified at any100    time to turn logging on and off; direct control of logging is also101    available using the standard Python ``logging`` module.102 103    .. seealso::104 105        :ref:`dbengine_logging` - further detail on how to configure106        logging.107 108 109:param echo_pool=False: if True, the connection pool will log110    informational output such as when connections are invalidated111    as well as when connections are recycled to the default log handler,112    which defaults to ``sys.stdout`` for output.   If set to the string113    ``"debug"``, the logging will include pool checkouts and checkins.114    Direct control of logging is also available using the standard Python115    ``logging`` module.116 117    .. seealso::118 119        :ref:`dbengine_logging` - further detail on how to configure120        logging.121 122 123:param empty_in_strategy:   No longer used; SQLAlchemy now uses124    "empty set" behavior for IN in all cases.125 126:param enable_from_linting: defaults to True.  Will emit a warning127    if a given SELECT statement is found to have un-linked FROM elements128    which would cause a cartesian product.129 130    .. versionadded:: 1.4131 132    .. seealso::133 134        :ref:`change_4737`135 136:param execution_options: Dictionary execution options which will137    be applied to all connections.  See138    :meth:`~sqlalchemy.engine.Connection.execution_options`139 140:param future: Use the 2.0 style :class:`_engine.Engine` and141    :class:`_engine.Connection` API.142 143    As of SQLAlchemy 2.0, this parameter is present for backwards144    compatibility only and must remain at its default value of ``True``.145 146    The :paramref:`_sa.create_engine.future` parameter will be147    deprecated in a subsequent 2.x release and eventually removed.148 149    .. versionadded:: 1.4150 151    .. versionchanged:: 2.0 All :class:`_engine.Engine` objects are152       "future" style engines and there is no longer a ``future=False``153       mode of operation.154 155    .. seealso::156 157        :ref:`migration_20_toplevel`158 159:param hide_parameters: Boolean, when set to True, SQL statement parameters160    will not be displayed in INFO logging nor will they be formatted into161    the string representation of :class:`.StatementError` objects.162 163    .. versionadded:: 1.3.8164 165    .. seealso::166 167        :ref:`dbengine_logging` - further detail on how to configure168        logging.169 170:param implicit_returning=True:  Legacy parameter that may only be set171    to True. In SQLAlchemy 2.0, this parameter does nothing. In order to172    disable "implicit returning" for statements invoked by the ORM,173    configure this on a per-table basis using the174    :paramref:`.Table.implicit_returning` parameter.175 176 177:param insertmanyvalues_page_size: number of rows to format into an178 INSERT statement when the statement uses "insertmanyvalues" mode, which is179 a paged form of bulk insert that is used for many backends when using180 :term:`executemany` execution typically in conjunction with RETURNING.181 Defaults to 1000, but may also be subject to dialect-specific limiting182 factors which may override this value on a per-statement basis.183 184 .. versionadded:: 2.0185 186 .. seealso::187 188    :ref:`engine_insertmanyvalues`189 190    :ref:`engine_insertmanyvalues_page_size`191 192    :paramref:`_engine.Connection.execution_options.insertmanyvalues_page_size`193 194:param isolation_level: optional string name of an isolation level195    which will be set on all new connections unconditionally.196    Isolation levels are typically some subset of the string names197    ``"SERIALIZABLE"``, ``"REPEATABLE READ"``,198    ``"READ COMMITTED"``, ``"READ UNCOMMITTED"`` and ``"AUTOCOMMIT"``199    based on backend.200 201    The :paramref:`_sa.create_engine.isolation_level` parameter is202    in contrast to the203    :paramref:`.Connection.execution_options.isolation_level`204    execution option, which may be set on an individual205    :class:`.Connection`, as well as the same parameter passed to206    :meth:`.Engine.execution_options`, where it may be used to create207    multiple engines with different isolation levels that share a common208    connection pool and dialect.209 210    .. versionchanged:: 2.0 The211       :paramref:`_sa.create_engine.isolation_level`212       parameter has been generalized to work on all dialects which support213       the concept of isolation level, and is provided as a more succinct,214       up front configuration switch in contrast to the execution option215       which is more of an ad-hoc programmatic option.216 217    .. seealso::218 219        :ref:`dbapi_autocommit`220 221:param json_deserializer: for dialects that support the222    :class:`_types.JSON`223    datatype, this is a Python callable that will convert a JSON string224    to a Python object.  By default, the Python ``json.loads`` function is225    used.226 227    .. versionchanged:: 1.3.7  The SQLite dialect renamed this from228       ``_json_deserializer``.229 230:param json_serializer: for dialects that support the :class:`_types.JSON`231    datatype, this is a Python callable that will render a given object232    as JSON.   By default, the Python ``json.dumps`` function is used.233 234    .. versionchanged:: 1.3.7  The SQLite dialect renamed this from235       ``_json_serializer``.236 237 238:param label_length=None: optional integer value which limits239    the size of dynamically generated column labels to that many240    characters. If less than 6, labels are generated as241    "_(counter)". If ``None``, the value of242    ``dialect.max_identifier_length``, which may be affected via the243    :paramref:`_sa.create_engine.max_identifier_length` parameter,244    is used instead.   The value of245    :paramref:`_sa.create_engine.label_length`246    may not be larger than that of247    :paramref:`_sa.create_engine.max_identfier_length`.248 249    .. seealso::250 251        :paramref:`_sa.create_engine.max_identifier_length`252 253:param logging_name:  String identifier which will be used within254    the "name" field of logging records generated within the255    "sqlalchemy.engine" logger. Defaults to a hexstring of the256    object's id.257 258    .. seealso::259 260        :ref:`dbengine_logging` - further detail on how to configure261        logging.262 263        :paramref:`_engine.Connection.execution_options.logging_token`264 265:param max_identifier_length: integer; override the max_identifier_length266    determined by the dialect.  if ``None`` or zero, has no effect.  This267    is the database's configured maximum number of characters that may be268    used in a SQL identifier such as a table name, column name, or label269    name. All dialects determine this value automatically, however in the270    case of a new database version for which this value has changed but271    SQLAlchemy's dialect has not been adjusted, the value may be passed272    here.273 274    .. versionadded:: 1.3.9275 276    .. seealso::277 278        :paramref:`_sa.create_engine.label_length`279 280:param max_overflow=10: the number of connections to allow in281    connection pool "overflow", that is connections that can be282    opened above and beyond the pool_size setting, which defaults283    to five. this is only used with :class:`~sqlalchemy.pool.QueuePool`.284 285:param module=None: reference to a Python module object (the module286    itself, not its string name).  Specifies an alternate DBAPI module to287    be used by the engine's dialect.  Each sub-dialect references a288    specific DBAPI which will be imported before first connect.  This289    parameter causes the import to be bypassed, and the given module to290    be used instead. Can be used for testing of DBAPIs as well as to291    inject "mock" DBAPI implementations into the :class:`_engine.Engine`.292 293:param paramstyle=None: The `paramstyle <https://legacy.python.org/dev/peps/pep-0249/#paramstyle>`_294    to use when rendering bound parameters.  This style defaults to the295    one recommended by the DBAPI itself, which is retrieved from the296    ``.paramstyle`` attribute of the DBAPI.  However, most DBAPIs accept297    more than one paramstyle, and in particular it may be desirable298    to change a "named" paramstyle into a "positional" one, or vice versa.299    When this attribute is passed, it should be one of the values300    ``"qmark"``, ``"numeric"``, ``"named"``, ``"format"`` or301    ``"pyformat"``, and should correspond to a parameter style known302    to be supported by the DBAPI in use.303 304:param pool=None: an already-constructed instance of305    :class:`~sqlalchemy.pool.Pool`, such as a306    :class:`~sqlalchemy.pool.QueuePool` instance. If non-None, this307    pool will be used directly as the underlying connection pool308    for the engine, bypassing whatever connection parameters are309    present in the URL argument. For information on constructing310    connection pools manually, see :ref:`pooling_toplevel`.311 312:param poolclass=None: a :class:`~sqlalchemy.pool.Pool`313    subclass, which will be used to create a connection pool314    instance using the connection parameters given in the URL. Note315    this differs from ``pool`` in that you don't actually316    instantiate the pool in this case, you just indicate what type317    of pool to be used.318 319:param pool_logging_name:  String identifier which will be used within320   the "name" field of logging records generated within the321   "sqlalchemy.pool" logger. Defaults to a hexstring of the object's322   id.323 324   .. seealso::325 326        :ref:`dbengine_logging` - further detail on how to configure327        logging.328 329:param pool_pre_ping: boolean, if True will enable the connection pool330    "pre-ping" feature that tests connections for liveness upon331    each checkout.332 333    .. versionadded:: 1.2334 335    .. seealso::336 337        :ref:`pool_disconnects_pessimistic`338 339:param pool_size=5: the number of connections to keep open340    inside the connection pool. This used with341    :class:`~sqlalchemy.pool.QueuePool` as342    well as :class:`~sqlalchemy.pool.SingletonThreadPool`.  With343    :class:`~sqlalchemy.pool.QueuePool`, a ``pool_size`` setting344    of 0 indicates no limit; to disable pooling, set ``poolclass`` to345    :class:`~sqlalchemy.pool.NullPool` instead.346 347:param pool_recycle=-1: this setting causes the pool to recycle348    connections after the given number of seconds has passed. It349    defaults to -1, or no timeout. For example, setting to 3600350    means connections will be recycled after one hour. Note that351    MySQL in particular will disconnect automatically if no352    activity is detected on a connection for eight hours (although353    this is configurable with the MySQLDB connection itself and the354    server configuration as well).355 356    .. seealso::357 358        :ref:`pool_setting_recycle`359 360:param pool_reset_on_return='rollback': set the361    :paramref:`_pool.Pool.reset_on_return` parameter of the underlying362    :class:`_pool.Pool` object, which can be set to the values363    ``"rollback"``, ``"commit"``, or ``None``.364 365    .. seealso::366 367        :ref:`pool_reset_on_return`368 369        :ref:`dbapi_autocommit_skip_rollback` - a more modern approach370        to using connections with no transactional instructions371 372:param pool_timeout=30: number of seconds to wait before giving373    up on getting a connection from the pool. This is only used374    with :class:`~sqlalchemy.pool.QueuePool`. This can be a float but is375    subject to the limitations of Python time functions which may not be376    reliable in the tens of milliseconds.377 378    .. note: don't use 30.0 above, it seems to break with the :param tag379 380:param pool_use_lifo=False: use LIFO (last-in-first-out) when retrieving381    connections from :class:`.QueuePool` instead of FIFO382    (first-in-first-out). Using LIFO, a server-side timeout scheme can383    reduce the number of connections used during non- peak   periods of384    use.   When planning for server-side timeouts, ensure that a recycle or385    pre-ping strategy is in use to gracefully   handle stale connections.386 387      .. versionadded:: 1.3388 389      .. seealso::390 391        :ref:`pool_use_lifo`392 393        :ref:`pool_disconnects`394 395:param plugins: string list of plugin names to load.  See396    :class:`.CreateEnginePlugin` for background.397 398    .. versionadded:: 1.2.3399 400:param query_cache_size: size of the cache used to cache the SQL string401 form of queries.  Set to zero to disable caching.402 403 The cache is pruned of its least recently used items when its size reaches404 N * 1.5.  Defaults to 500, meaning the cache will always store at least405 500 SQL statements when filled, and will grow up to 750 items at which406 point it is pruned back down to 500 by removing the 250 least recently407 used items.408 409 Caching is accomplished on a per-statement basis by generating a410 cache key that represents the statement's structure, then generating411 string SQL for the current dialect only if that key is not present412 in the cache.   All statements support caching, however some features413 such as an INSERT with a large set of parameters will intentionally414 bypass the cache.   SQL logging will indicate statistics for each415 statement whether or not it were pull from the cache.416 417 .. note:: some ORM functions related to unit-of-work persistence as well418    as some attribute loading strategies will make use of individual419    per-mapper caches outside of the main cache.420 421 422 .. seealso::423 424    :ref:`sql_caching`425 426 .. versionadded:: 1.4427 428:param skip_autocommit_rollback: When True, the dialect will429   unconditionally skip all calls to the DBAPI ``connection.rollback()``430   method if the DBAPI connection is confirmed to be in "autocommit" mode.431   The availability of this feature is dialect specific; if not available,432   a ``NotImplementedError`` is raised by the dialect when rollback occurs.433 434   .. seealso::435 436        :ref:`dbapi_autocommit_skip_rollback`437 438   .. versionadded:: 2.0.43439 440:param use_insertmanyvalues: True by default, use the "insertmanyvalues"441 execution style for INSERT..RETURNING statements by default.442 443 .. versionadded:: 2.0444 445 .. seealso::446 447    :ref:`engine_insertmanyvalues`448 449rP�mockzunknown strategy: %rrQN�	_is_asyncF�_coerce_configc�t>�TRX5nUTR;aTRU"U5nU$rE)�pop�engine_config_types)�key�default�value�dialect_clsrHs   ��rI�	pop_kwarg� create_engine.<locals>.pop_kwargAs9����J�J�s�,�E��k�5�5�5�#�7�7��<�U�C���LrKr6�import_dbapi�dbapiz�The dbapi() classmethod on dialect classes has been renamed to import_dbapi().  Implement an import_dbapi() classmethod directly on class zd to remove this warning; the old .dbapi() classmethod may be maintained for backwards compatibility.rO�compiler_lintingr*Tr%�async_fallbackzXThe async_fallback dialect argument is deprecated and will be removed in SQLAlchemy 2.1.r8c450�>�TR(ae[T5n[T5nTRRH#n[[U"TUUU55nUcM!Us $ TR"U0UD6$TR"T0TD6$rE)�_has_events�list�dict�dispatch�451do_connectrr�connect)�connection_record�
mutable_cargs�mutable_cparams�fn�452connection�	cargs_tup�cparams�dialects     ���rIri�create_engine.<locals>.connect�s�����"�"� $�Y��
�"&�w�-��!�*�*�5�5�B�!%�'��#�-�)�+�	�"�J�"�-�)�)�6����
�I��I�I����	�=�W�=�=rKr'r9rq�_is_asynciozPool class z cannot be used with znon-�zasyncio engine�pcls)�coderGzIThe 'future' parameter passed to create_engine() may only be set to True.�_initializezInvalid argument(s) �,c3�,# �UH453nSU-v� M g7f)z'%s'NrF)�.0�ks  rI�	<genexpr>� create_engine.<locals>.<genexpr>�s���4�V���!��V�s�z. sent to create_engine(), using configuration �/z^.  Please check that the keyword arguments are appropriate for this combination of components.c� >�TceT"U5 grErF)�dbapi_connectionrj�
do_on_connects  �rI�454on_connect�!create_engine.<locals>.on_connect�s���%�0�0�0��.�/rKric�>�[R"T[X5SSSS9n[RUlTR
U5 UR(d.UR(dTRUR5 ggg!UR(d.UR(dTRUR5 fff=f)NF)rnrd�_allow_revalidate�_allow_autobegin)r�455Connectionrr�456EMPTY_DICT�_execution_options�457initialize�invalidated�closed�do_rollbackrn)r�rj�crq�engines   ��rI�
first_connect�$create_engine.<locals>.first_connect�s��������2�$��"�#(�"'��A�$(�?�?�A� �	
6��"�"�1�%��}�}�Q�X�X��'�'����5�	.6�}��q�}�}�Q�X�X��'�'����5�	.6�}�s�B458�459AC)�_once_unless_exceptionrE)rY�strrZ�
Optional[Any]�returnrrF)rjzOptional[ConnectionPoolEntry]r�r)r�rrjrr��None)/rWrr�
ArgumentError�_url�make_url�_instantiate_plugins�_get_entrypoint�get_async_dialect_cls�get_dialect_clsr�get_cls_kwargs�__dict__r_�hasattr�inspect�ismethodr`�warn_deprecated�get_func_kwargs�460setdefaultr�461NO_LINTING�COLLECT_CARTESIAN_PRODUCTS�handle_dialect_kwargs�create_connect_argsr�union�asbool�get_dialect_pool_class�_pool_translate_kwargs�get�handle_pool_kwargs�_dialectrs�is_async�	__class__�__name__rr�	TypeError�join�on_connect_urlr�listen�_builtin_onconnect�engine_created)"rrH�strat�urA�462entrypointrTr]�dialect_argsr{r`�463dbapi_args�464dbapi_methr*�plugin�_cparamsr8rir'r9�	pool_args�tk�engineclass�engine_argsrwr��builtin_on_connectr�rorprqr\r�r�s" `                          @@@@@@rIrJrJ\s����Z�V���465�466�:�&���F�?�%�c�4�V�4�4��#�#�$:�U�$B�C�C�467�J�J�"�D�)�	
�
�
�c��A��/�/��7��A���"�"�$�J��468�469�;��.�I�� �6�6�q�9�� �0�0��3��
�z�z�"�E�*�*�	�	��J�J�	��L�
�
 �
 ��
-����;�'��l�L�O�.�
�J�J�x��&�E��}��470��[�1�1�1�$�1�1�J�
�[�'�
*�
*�w�/?�/?����0471�0472�
� � �1�1<�
�>+�+�473�

�%�*�*�J�$�1�1�J��%�%�j�1�A��F�{� )�!��474�
�2��(�Z�(��!������.��0C�0C�D� �*�*�%:�D�A����'�(�H�,O�,O�O�(����$�$�[�,�?���)�L�)�G�$�7�7��:��Y��� � ��*�0�0��>�2�1N�O�G��7�"�t�{�{�7�;K�3L�'M�'M����
)��	475��V�T�"�D��|�@D�	>�<�	>�
�	>�	>�,�I�w�/���k�4�0�	����6�6�q�9�I���(�	��$�$�Y�/�A�'�+�+�A�1�B��V�|�(��}�	�!��0�476�F��%�%�i��;����.�I�.����
�	��m�$�$����G�$4�$4�4�����$�.�.�1�1�2�3�'.�'7�'7��R�@��
��	477�	478��X�t�$�$����
7�479�	480�481�+�+�K��K�
�
 �
 ��
-����;�&�q�\�K��N�.��*�*�]�D�1�K������4�V�4�4��!�!�*�*����'�'��$�$�	
�482�	483���w��
9�[�
9�F���.�.�q�1�
��
0�"1�
0�#6�
0��
0�
�L�L��y�*�5�$�7�7�9����L�L��y�*<�=�	6�-�	6�2�	6��	6�	6�F	����)�]�4�	484����v�&���$��!�!�&�)������f�%���MrKc���UVs0sH,nURU5(dMU[U5SX_M. nnSUS'URU5 URS5n[	U40UD6$s snf)a,Create a new Engine instance using a configuration dictionary.485 486The dictionary is typically produced from a config file.487 488The keys of interest to ``engine_from_config()`` should be prefixed, e.g.489``sqlalchemy.url``, ``sqlalchemy.echo``, etc.  The 'prefix' argument490indicates the prefix to be searched for.  Each matching key (after the491prefix is stripped) is treated as though it were the corresponding keyword492argument to a :func:`_sa.create_engine` call.493 494The only required key is (assuming the default prefix) ``sqlalchemy.url``,495which provides the :ref:`database URL <database_urls>`.496 497A select set of keyword arguments will be "coerced" to their498expected type based on string values.    The set of arguments499is extensible per-dialect using the ``engine_config_types`` accessor.500 501:param configuration: A dictionary (typically produced from a config file,502    but this is not a requirement).  Items whose keys start with the value503    of 'prefix' will have that prefix stripped, and will then be passed to504    :func:`_sa.create_engine`.505 506:param prefix: Prefix to match and then strip from keys507    in 'configuration'.508 509:param kwargs: Each keyword argument to ``engine_from_config()`` itself510    overrides the corresponding item taken from the 'configuration'511    dictionary.  Keyword arguments should *not* be prefixed.512 513NTrUr)�514startswith�len�updaterWrJ)�
configuration�prefixrHrY�optionsrs      rI�engine_from_configr�"s���H!�� �C��>�>�&�!�	/��C��K�M��M�.�.� ���515!%�G����N�N�6��516�+�+�e�517�C���(��(�(��s518�A-�A-)r9r3�pre_ping�size�recycle�reset_on_return�timeout�use_lifoc��grErF)519rr9r3r�r�r�r�r�r�rHs520          rI�create_pool_from_urlr�Os��rKc��grErFrMs  rIr�r�_s��GJrKc��[H%nX!;dM521URU5U[U'M' [U40UDSS0D6nUR$)a>Create a pool instance from the given url.522 523If ``poolclass`` is not provided the pool class used524is selected using the dialect specified in the URL.525 526The arguments passed to :func:`_sa.create_pool_from_url` are527identical to the pool argument passed to the :func:`_sa.create_engine`528function.529 530.. versionadded:: 2.0.10531rwF)r�rWrJr8)rrHrYr�s    rIr�r�csK��&���=�28�*�*�S�/�F�)�#�.�/�&��3�
<�&�
<�e�
<�F��;�;�rK�pool_events)r3r(r�r��eventsr�r�r�)Fr�Union[str, URL]r%zDict[Any, Any]r&�boolr'z)Union[_CreatorFnType, _CreatorWRecFnType]r(rr)rr*r�r+rrG�
Literal[True]r,r�r-r�r.�intr/rr0�Callable[..., Any]r1r�r2�
Optional[int]r3r�r4r�r5r�r6r�r7zOptional[_ParamStyle]r8zOptional[Pool]r9�Optional[Type[Pool]]r:r�r;r�r<r�r=r�r>�Optional[_ResetStyleArgType]r?�floatr@r�rAz	List[str]rBr�rCr�rHrr�r)rr�rHrr�r)rzUnion[str, _url.URL]rHrr�r)zsqlalchemy.)r�zDict[str, Any]r�r�rHrr�r)rr�r9r�r3r�r�r�r�r�r�r�r�r�r�r�r�r�rHrr�r#)rr�rHrr�r#)1�532__future__rr��typingrrrrrr	r533rrrtrrr��534interfacesrrSrrrrr8rr�sqlrr�
TYPE_CHECKINGrrrrr�logrr r!r"r#�util.typingr$rJ�deprecated_paramsr�r�r�rFrKrI�<module>r�s���#��
������������'�$����*�&�� �	����+�'�*��#�%�)�)��%�535�$'��9<��"� #�),��(+�&)�&)�,/�*-�"%��+.���(+��&)� ����9<�����!$�E$�	�$�!�$��	$�5367�$��
$��$��$�'�$�
�$��$�&�$�!$�$�$�$�*�$� (�!$�" �#$�$�%$�&)�'$�(�)$�*
�+$�,&�-$�.�/$�0$�1$�2�3$�4�5$�6�7$�8�9$�:7�;$�<�=$�>�?$�@�A$�B�C$�D�E$�F�G$�H�I$�537�$�N538�E�539�E�������%�0k540�1�0k541�^2?�*)�!�*)�+.�*)�JM�*)��*)�Z542�'*�����47����	��$���	�543���
���2��������544��545��546�J�547�J��*'�+��!�!��1�#�#�	��rK
codekingpro/portable-devtools · Team Ai