ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ 4]c@sdZddlmZddlmZddlmZdefdYZdefdYZd efd YZ d efd YZ d efdYZ dS(s1Define core interfaces used by the engine system.i(tutil(tCompiled(t TypeCompilertDialectcBseZdZeZdZedZdZdZ d1dZ e j ddd1dZd1d Zd1d Zd1d Zd1d Zd1d Zd1dZd1dZd1dZd1dZd1dZd1dZdZdZd1dZd1dZdZdZdZ dZ!dZ"dZ#dZ$dZ%d Z&d!Z'd"Z(d#Z)e*ed$Z+e*ed%Z,d&Z-d1d'Z.d1d(Z/d1d)Z0d*Z1d+Z2d,Z3d-Z4d.Z5ed/Z6ed0Z7RS(2sDefine the behavior of a specific database and DB-API combination. Any aspect of metadata definition, SQL query generation, execution, result-set handling, or anything else which varies between databases is defined under the general category of the Dialect. The Dialect acts as a factory for other database-specific object implementations including ExecutionContext, Compiled, DefaultGenerator, and TypeEngine. All Dialects implement the following attributes: name identifying name for the dialect from a DBAPI-neutral point of view (i.e. 'sqlite') driver identifying name for the dialect's DBAPI positional True if the paramstyle for this Dialect is positional. paramstyle the paramstyle to be used (some DB-APIs support multiple paramstyles). convert_unicode True if Unicode conversion should be applied to all ``str`` types. encoding type of encoding to use for unicode, usually defaults to 'utf-8'. statement_compiler a :class:`.Compiled` class used to compile SQL statements ddl_compiler a :class:`.Compiled` class used to compile DDL statements server_version_info a tuple containing a version number for the DB backend in use. This value is only available for supporting dialects, and is typically populated during the initial connection to the database. default_schema_name the name of the default schema. This value is only available for supporting dialects, and is typically populated during the initial connection to the database. execution_ctx_cls a :class:`.ExecutionContext` class used to handle statement execution execute_sequence_format either the 'tuple' or 'list' type, depending on what cursor.execute() accepts for the second argument (they vary). preparer a :class:`~sqlalchemy.sql.compiler.IdentifierPreparer` class used to quote identifiers. supports_alter ``True`` if the database supports ``ALTER TABLE``. max_identifier_length The maximum length of identifier names. supports_unicode_statements Indicate whether the DB-API can receive SQL statements as Python unicode strings supports_unicode_binds Indicate whether the DB-API can receive string bind parameters as Python unicode strings supports_sane_rowcount Indicate whether the dialect properly implements rowcount for ``UPDATE`` and ``DELETE`` statements. supports_sane_multi_rowcount Indicate whether the dialect properly implements rowcount for ``UPDATE`` and ``DELETE`` statements when executed via executemany. preexecute_autoincrement_sequences True if 'implicit' primary key functions must be executed separately in order to get their value. This is currently oriented towards PostgreSQL. implicit_returning use RETURNING or equivalent during INSERT execution in order to load newly generated primary keys and other column defaults in one execution, which are then available via inserted_primary_key. If an insert statement has returning() specified explicitly, the "implicit" functionality is not used and inserted_primary_key will not be available. colspecs A dictionary of TypeEngine classes from sqlalchemy.types mapped to subclasses that are specific to the dialect class. This dictionary is class-level only and is not accessed from the dialect instance itself. supports_default_values Indicates if the construct ``INSERT INTO tablename DEFAULT VALUES`` is supported supports_sequences Indicates if the dialect supports CREATE SEQUENCE or similar. sequences_optional If True, indicates if the "optional" flag on the Sequence() construct should signal to not generate a CREATE SEQUENCE. Applies only to dialects that support sequences. Currently used only to allow PostgreSQL SERIAL to be used on a column that specifies Sequence() for usage on other backends. supports_native_enum Indicates if the dialect supports a native ENUM construct. This will prevent types.Enum from generating a CHECK constraint when that type is used. supports_native_boolean Indicates if the dialect supports a native boolean construct. This will prevent types.Boolean from generating a CHECK constraint when that type is used. dbapi_exception_translation_map A dictionary of names that will contain as values the names of pep-249 exceptions ("IntegrityError", "OperationalError", etc) keyed to alternate class names, to support the case where a DBAPI has exception classes that aren't named as they are referred to (e.g. IntegrityError = MyException). In the vast majority of cases this dictionary is empty. .. versionadded:: 1.0.5 cCs tdS(sBuild DB-API compatible connection arguments. Given a :class:`~sqlalchemy.engine.url.URL` object, returns a tuple consisting of a `*args`/`**kwargs` suitable to send directly to the dbapi's connect function. N(tNotImplementedError(tselfturl((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytcreate_connect_argss cCs tdS(s4Transform a generic type to a dialect-specific type. Dialect classes will usually use the :func:`.types.adapt_type` function in the types module to accomplish this. The returned result is cached *per dialect class* so can contain no dialect-instance state. N(R(tclsttypeobj((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyttype_descriptors cCsdS(sCalled during strategized creation of the dialect with a connection. Allows dialects to configure options based on server version info or other properties. The connection passed here is a SQLAlchemy Connection object, with full capabilities. The initialize() method of the base dialect should be called via super(). N((Rt connection((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt initializescCs tdS(srLoad table description from the database. Given a :class:`.Connection` and a :class:`~sqlalchemy.schema.Table` object, reflect its columns and properties from the database. The implementation of this method is provided by :meth:`.DefaultDialect.reflecttable`, which makes use of :class:`.Inspector` to retrieve column information. Dialects should **not** seek to implement this method, and should instead implement individual schema inspection operations such as :meth:`.Dialect.get_columns`, :meth:`.Dialect.get_pk_constraint`, etc. N(R(RR ttabletinclude_columnstexclude_columnst resolve_fks((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt reflecttablescKs tdS(s Return information about columns in `table_name`. Given a :class:`.Connection`, a string `table_name`, and an optional string `schema`, return column information as a list of dictionaries with these keys: name the column's name type [sqlalchemy.types#TypeEngine] nullable boolean default the column's default value autoincrement boolean sequence a dictionary of the form {'name' : str, 'start' :int, 'increment': int, 'minvalue': int, 'maxvalue': int, 'nominvalue': bool, 'nomaxvalue': bool, 'cycle': bool, 'cache': int, 'order': bool} Additional column attributes may be present. N(R(RR t table_nametschematkw((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt get_columnsss0.8sThe :meth:`.Dialect.get_primary_keys` method is deprecated and will be removed in a future release. Please refer to the :meth:`.Dialect.get_pk_constraint` method. cKs tdS(s@Return information about primary keys in `table_name`. N(R(RR RRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_primary_keyss cKs tdS(sReturn information about the primary key constraint on table_name`. Given a :class:`.Connection`, a string `table_name`, and an optional string `schema`, return primary key information as a dictionary with these keys: constrained_columns a list of column names that make up the primary key name optional name of the primary key constraint. N(R(RR RRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_pk_constraint scKs tdS(sReturn information about foreign_keys in `table_name`. Given a :class:`.Connection`, a string `table_name`, and an optional string `schema`, return foreign key information as a list of dicts with these keys: name the constraint's name constrained_columns a list of column names that make up the foreign key referred_schema the name of the referred schema referred_table the name of the referred table referred_columns a list of column names in the referred table that correspond to constrained_columns N(R(RR RRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_foreign_keysscKs tdS(s*Return a list of table names for `schema`.N(R(RR RR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_table_names6scKs tdS(syReturn a list of temporary table names on the given connection, if supported by the underlying backend. N(R(RR RR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_temp_table_names;scKs tdS(sReturn a list of all view names available in the database. schema: Optional, retrieve names from a non-default schema. N(R(RR RR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_view_namesCscKs tdS(sxReturn a list of temporary view names on the given connection, if supported by the underlying backend. N(R(RR RR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_temp_view_namesLscKs tdS(sReturn view definition. Given a :class:`.Connection`, a string `view_name`, and an optional string `schema`, return the view definition. N(R(RR t view_nameRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_view_definitionTscKs tdS(suReturn information about indexes in `table_name`. Given a :class:`.Connection`, a string `table_name` and an optional string `schema`, return index information as a list of dictionaries with these keys: name the index's name column_names list of column names in order unique boolean N(R(RR RRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt get_indexes^scKs tdS(sReturn information about unique constraints in `table_name`. Given a string `table_name` and an optional string `schema`, return unique constraint information as a list of dicts with these keys: name the unique constraint's name column_names list of column names in order \**kw other options passed to the dialect's get_unique_constraints() method. .. versionadded:: 0.9.0 N(R(RR RRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_unique_constraintsqscKs tdS(sReturn information about check constraints in `table_name`. Given a string `table_name` and an optional string `schema`, return check constraint information as a list of dicts with these keys: name the check constraint's name sqltext the check constraint's SQL expression \**kw other options passed to the dialect's get_check_constraints() method. .. versionadded:: 1.1.0 N(R(RR RRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_check_constraintsscKs tdS(s|Return the "comment" for the table identified by `table_name`. Given a string `table_name` and an optional string `schema`, return table comment information as a dictionary with this key: text text of the comment Raises ``NotImplementedError`` for dialects that don't support comments. .. versionadded:: 1.2 N(R(RR RRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_table_commentscCs tdS(sconvert the given name to lowercase if it is detected as case insensitive. this method is only used if the dialect defines requires_name_normalize=True. N(R(Rtname((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytnormalize_namescCs tdS(sconvert the given name to a case insensitive identifier for the backend if it is an all-lowercase name. this method is only used if the dialect defines requires_name_normalize=True. N(R(RR#((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdenormalize_namescCs tdS(sCheck the existence of a particular table in the database. Given a :class:`.Connection` object and a string `table_name`, return True if the given table (possibly within the specified `schema`) exists in the database, False otherwise. N(R(RR RR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt has_tables cCs tdS(sCheck the existence of a particular sequence in the database. Given a :class:`.Connection` object and a string `sequence_name`, return True if the given sequence exists in the database, False otherwise. N(R(RR t sequence_nameR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt has_sequencescCs tdS(sRetrieve the server version info from the given connection. This is used by the default implementation to populate the "server_version_info" attribute and is called exactly once upon first connect. N(R(RR ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt_get_server_version_infos cCs tdS(sReturn the string name of the currently selected schema from the given connection. This is used by the default implementation to populate the "default_schema_name" attribute and is called exactly once upon first connect. N(R(RR ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt_get_default_schema_names cCs tdS(s/Provide an implementation of ``connection.begin()``, given a DB-API connection. The DBAPI has no dedicated "begin" method and it is expected that transactions are implicit. This hook is provided for those DBAPIs that might need additional help in this area. Note that :meth:`.Dialect.do_begin` is not called unless a :class:`.Transaction` object is in use. The :meth:`.Dialect.do_autocommit` hook is provided for DBAPIs that need some extra commands emitted after a commit in order to enter the next transaction, when the SQLAlchemy :class:`.Connection` is used in its default "autocommit" mode. :param dbapi_connection: a DBAPI connection, typically proxied within a :class:`.ConnectionFairy`. N(R(Rtdbapi_connection((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_beginscCs tdS(sProvide an implementation of ``connection.rollback()``, given a DB-API connection. :param dbapi_connection: a DBAPI connection, typically proxied within a :class:`.ConnectionFairy`. N(R(RR+((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt do_rollbacks cCs tdS(sProvide an implementation of ``connection.commit()``, given a DB-API connection. :param dbapi_connection: a DBAPI connection, typically proxied within a :class:`.ConnectionFairy`. N(R(RR+((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt do_commits cCs tdS(sProvide an implementation of ``connection.close()``, given a DBAPI connection. This hook is called by the :class:`.Pool` when a connection has been detached from the pool, or is being returned beyond the normal capacity of the pool. N(R(RR+((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_closes cCs tdS(sCreate a two-phase transaction ID. This id will be passed to do_begin_twophase(), do_rollback_twophase(), do_commit_twophase(). Its format is unspecified. N(R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt create_xid*scCs tdS(sCreate a savepoint with the given name. :param connection: a :class:`.Connection`. :param name: savepoint name. N(R(RR R#((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt do_savepoint4scCs tdS(sRollback a connection to the named savepoint. :param connection: a :class:`.Connection`. :param name: savepoint name. N(R(RR R#((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_rollback_to_savepoint>scCs tdS(sRelease the named savepoint on a connection. :param connection: a :class:`.Connection`. :param name: savepoint name. N(R(RR R#((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_release_savepointHscCs tdS(sBegin a two phase transaction on the given connection. :param connection: a :class:`.Connection`. :param xid: xid N(R(RR txid((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_begin_twophaseQscCs tdS(sPrepare a two phase transaction on the given connection. :param connection: a :class:`.Connection`. :param xid: xid N(R(RR R4((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_prepare_twophase[scCs tdS(s,Rollback a two phase transaction on the given connection. :param connection: a :class:`.Connection`. :param xid: xid :param is_prepared: whether or not :meth:`.TwoPhaseTransaction.prepare` was called. :param recover: if the recover flag was passed. N(R(RR R4t is_preparedtrecover((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_rollback_twophasees cCs tdS(s+Commit a two phase transaction on the given connection. :param connection: a :class:`.Connection`. :param xid: xid :param is_prepared: whether or not :meth:`.TwoPhaseTransaction.prepare` was called. :param recover: if the recover flag was passed. N(R(RR R4R7R8((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_commit_twophasetscCs tdS(sRecover list of uncommitted prepared two phase transaction identifiers on the given connection. :param connection: a :class:`.Connection`. N(R(RR ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_recover_twophasescCs tdS(sSProvide an implementation of ``cursor.executemany(statement, parameters)``.N(R(Rtcursort statementt parameterstcontext((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_executemanyscCs tdS(sOProvide an implementation of ``cursor.execute(statement, parameters)``.N(R(RR<R=R>R?((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt do_executescCs tdS(s{Provide an implementation of ``cursor.execute(statement)``. The parameter collection should not be sent. N(R(RR<R=R>R?((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdo_execute_no_paramss cCs tdS(sMReturn True if the given DB-API error indicates an invalid connectionN(R(RteR R<((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt is_disconnectscCsdS(sreturn a callable which sets up a newly created DBAPI connection. The callable accepts a single argument "conn" which is the DBAPI connection itself. It has no return value. This is used to set dialect-wide per-connection options such as isolation modes, unicode modes, etc. If a callable is returned, it will be assembled into a pool listener that receives the direct DBAPI connection, with all wrappers removed. If None is returned, no listener will be generated. N(tNone(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytconnectscCs tdS(sGiven a DBAPI connection, revert its isolation to the default. Note that this is a dialect-level method which is used as part of the implementation of the :class:`.Connection` and :class:`.Engine` isolation level facilities; these APIs should be preferred for most typical use cases. .. seealso:: :meth:`.Connection.get_isolation_level` - view current level :attr:`.Connection.default_isolation_level` - view default level :paramref:`.Connection.execution_options.isolation_level` - set per :class:`.Connection` isolation level :paramref:`.create_engine.isolation_level` - set per :class:`.Engine` isolation level N(R(Rt dbapi_conn((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytreset_isolation_levelscCs tdS(sGiven a DBAPI connection, set its isolation level. Note that this is a dialect-level method which is used as part of the implementation of the :class:`.Connection` and :class:`.Engine` isolation level facilities; these APIs should be preferred for most typical use cases. .. seealso:: :meth:`.Connection.get_isolation_level` - view current level :attr:`.Connection.default_isolation_level` - view default level :paramref:`.Connection.execution_options.isolation_level` - set per :class:`.Connection` isolation level :paramref:`.create_engine.isolation_level` - set per :class:`.Engine` isolation level N(R(RRGtlevel((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytset_isolation_levelscCs tdS(sGiven a DBAPI connection, return its isolation level. When working with a :class:`.Connection` object, the corresponding DBAPI connection may be procured using the :attr:`.Connection.connection` accessor. Note that this is a dialect-level method which is used as part of the implementation of the :class:`.Connection` and :class:`.Engine` isolation level facilities; these APIs should be preferred for most typical use cases. .. seealso:: :meth:`.Connection.get_isolation_level` - view current level :attr:`.Connection.default_isolation_level` - view default level :paramref:`.Connection.execution_options.isolation_level` - set per :class:`.Connection` isolation level :paramref:`.create_engine.isolation_level` - set per :class:`.Engine` isolation level N(R(RRG((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_isolation_levelscCs|S(sGiven a URL, return the :class:`.Dialect` that will be used. This is a hook that allows an external plugin to provide functionality around an existing dialect, by allowing the plugin to be loaded from the url based on an entrypoint, and then the plugin returns the actual dialect to be used. By default this just returns the cls. .. versionadded:: 1.0.3 ((RR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytget_dialect_cls scCsdS(sqA convenience hook called before returning the final :class:`.Engine`. If the dialect returned a different class from the :meth:`.get_dialect_cls` method, then the hook is called on both classes, first on the dialect class returned by the :meth:`.get_dialect_cls` method and then on the class on which the method was called. The hook should be used by dialects and/or wrappers to apply special events to the engine or its components. In particular, it allows a dialect-wrapping class to apply dialect-level events. .. versionadded:: 1.0.3 N((Rtengine((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytengine_createdsN(8t__name__t __module__t__doc__tFalset _has_eventsRt classmethodR R RRERRt deprecatedRRRRRRRRRR R!R"R$R%R&R(R)R*R,R-R.R/R0R1R2R3R5R6tTrueR9R:R;R@RARBRDRFRHRJRKRLRN(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyRsf    !                  tCreateEnginePlugincBs2eZdZdZdZdZdZRS(sw A set of hooks intended to augment the construction of an :class:`.Engine` object based on entrypoint names in a URL. The purpose of :class:`.CreateEnginePlugin` is to allow third-party systems to apply engine, pool and dialect level event listeners without the need for the target application to be modified; instead, the plugin names can be added to the database URL. Target applications for :class:`.CreateEnginePlugin` include: * connection and SQL performance tools, e.g. which use events to track number of checkouts and/or time spent with statements * connectivity plugins such as proxies Plugins are registered using entry points in a similar way as that of dialects:: entry_points={ 'sqlalchemy.plugins': [ 'myplugin = myapp.plugins:MyPlugin' ] A plugin that uses the above names would be invoked from a database URL as in:: from sqlalchemy import create_engine engine = create_engine( "mysql+pymysql://scott:tiger@localhost/test?plugin=myplugin") Alternatively, the :paramref:`.create_engine.plugins" argument may be passed as a list to :func:`.create_engine`:: engine = create_engine( "mysql+pymysql://scott:tiger@localhost/test", plugins=["myplugin"]) .. versionadded:: 1.2.3 plugin names can also be specified to :func:`.create_engine` as a list The ``plugin`` argument supports multiple instances, so that a URL may specify multiple plugins; they are loaded in the order stated in the URL:: engine = create_engine( "mysql+pymysql://scott:tiger@localhost/" "test?plugin=plugin_one&plugin=plugin_twp&plugin=plugin_three") A plugin can receive additional arguments from the URL string as well as from the keyword arguments passed to :func:`.create_engine`. The :class:`.URL` object and the keyword dictionary are passed to the constructor so that these arguments can be extracted from the url's :attr:`.URL.query` collection as well as from the dictionary:: class MyPlugin(CreateEnginePlugin): def __init__(self, url, kwargs): self.my_argument_one = url.query.pop('my_argument_one') self.my_argument_two = url.query.pop('my_argument_two') self.my_argument_three = kwargs.pop('my_argument_three', None) Arguments like those illustrated above would be consumed from the following:: from sqlalchemy import create_engine engine = create_engine( "mysql+pymysql://scott:tiger@localhost/" "test?plugin=myplugin&my_argument_one=foo&my_argument_two=bar", my_argument_three='bat') The URL and dictionary are used for subsequent setup of the engine as they are, so the plugin can modify their arguments in-place. Arguments that are only understood by the plugin should be popped or otherwise removed so that they aren't interpreted as erroneous arguments afterwards. When the engine creation process completes and produces the :class:`.Engine` object, it is again passed to the plugin via the :meth:`.CreateEnginePlugin.engine_created` hook. In this hook, additional changes can be made to the engine, most typically involving setup of events (e.g. those defined in :ref:`core_event_toplevel`). .. versionadded:: 1.1 cCs ||_dS(sSConstruct a new :class:`.CreateEnginePlugin`. The plugin object is instantiated individually for each call to :func:`.create_engine`. A single :class:`.Engine` will be passed to the :meth:`.CreateEnginePlugin.engine_created` method corresponding to this URL. :param url: the :class:`.URL` object. The plugin should inspect what it needs here as well as remove its custom arguments from the :attr:`.URL.query` collection. The URL can be modified in-place in any other way as well. :param kwargs: The keyword arguments passed to :func`.create_engine`. The plugin can read and modify this dictionary in-place, to affect the ultimate arguments used to create the engine. It should remove its custom arguments from the dictionary as well. N(R(RRtkwargs((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt__init__scCsdS(sparse and modify dialect kwargsN((Rt dialect_clst dialect_args((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pythandle_dialect_kwargstcCsdS(sparse and modify pool kwargsN((Rtpool_clst pool_args((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pythandle_pool_kwargsR]cCsdS(sReceive the :class:`.Engine` object when it is fully constructed. The plugin may make additional changes to the engine, such as registering engine or connection pool events. N((RRM((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyRNR](RORPRQRYR\R`RN(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyRW0s U   tExecutionContextcBsbeZdZd Zd ZdZdZdZdZ dZ dZ dZ dZ RS( sAA messenger object for a Dialect that corresponds to a single execution. ExecutionContext should have these data members: connection Connection object which can be freely used by default value generators to execute SQL. This Connection should reference the same underlying connection/transactional resources of root_connection. root_connection Connection object which is the source of this ExecutionContext. This Connection may have close_with_result=True set, in which case it can only be used once. dialect dialect which created this ExecutionContext. cursor DB-API cursor procured from the connection, compiled if passed to constructor, sqlalchemy.engine.base.Compiled object being executed, statement string version of the statement to be executed. Is either passed to the constructor, or must be created from the sql.Compiled object by the time pre_exec() has completed. parameters bind parameters passed to the execute() method. For compiled statements, this is a dictionary or list of dictionaries. For textual statements, it should be in a format suitable for the dialect's paramstyle (i.e. dict or list of dicts for non positional, list or list of lists/tuples for positional). isinsert True if the statement is an INSERT. isupdate True if the statement is an UPDATE. should_autocommit True if the statement is a "committable" statement. prefetch_cols a list of Column objects for which a client-side default was fired off. Applies to inserts and updates. postfetch_cols a list of Column objects for which a server-side default or inline SQL expression value was fired off. Applies to inserts and updates. cCs tdS(sReturn a new cursor generated from this ExecutionContext's connection. Some dialects may wish to change the behavior of connection.cursor(), such as postgresql which may return a PG "server side" cursor. N(R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt create_cursors cCs tdS(sCalled before an execution of a compiled statement. If a compiled statement was passed to this ExecutionContext, the `statement` and `parameters` datamembers must be initialized after this statement is complete. N(R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytpre_execscCs tdS(sCalled after the execution of a compiled statement. If a compiled statement was passed to this ExecutionContext, the `last_insert_ids`, `last_inserted_params`, etc. datamembers should be available after this method completes. N(R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt post_execscCs tdS(sgReturn a result object corresponding to this ExecutionContext. Returns a ResultProxy. N(R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytresult%scCs tdS(sQReceive a DBAPI exception which occurred upon execute, result fetch, etc.N(R(RRC((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pythandle_dbapi_exception-scCs tdS(scParse the given textual statement and return True if it refers to a "committable" statementN(R(RR=((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytshould_autocommit_text3scCs tdS(sjReturn True if the last INSERT or UPDATE row contained inlined or database-side defaults. N(R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytlastrow_has_defaults9scCs tdS(sReturn the DBAPI ``cursor.rowcount`` value, or in some cases an interpreted value. See :attr:`.ResultProxy.rowcount` for details on this. N(R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt get_rowcount@sN(RORPRQREt exceptionRDRbRcRdReRfRgRhRi(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyRas8    t ConnectablecBseZdZdZdZejdddZdZ ejdddZ ejdd d Z d Z d Z d ZdddZRS(sInterface for an object which supports execution of SQL constructs. The two implementations of :class:`.Connectable` are :class:`.Connection` and :class:`.Engine`. Connectable must also implement the 'dialect' member which references a :class:`.Dialect` instance. cKsdS(sReturn a :class:`.Connection` object. Depending on context, this may be ``self`` if this object is already an instance of :class:`.Connection`, or a newly procured :class:`.Connection` if this object is an instance of :class:`.Engine`. N((RRX((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyRFVR]s1.3s%The :meth:`.Engine.contextual_connect` and :meth:`.Connection.contextual_connect` methods are deprecated. This method is an artifact of the threadlocal engine strategy which is also to be deprecated. For explicit connections from an :class:`.Engine`, use the :meth:`.Engine.connect` method.cOs|j||S(sFReturn a :class:`.Connection` object which may be part of an ongoing context. Depending on context, this may be ``self`` if this object is already an instance of :class:`.Connection`, or a newly procured :class:`.Connection` if this object is an instance of :class:`.Engine`. (t_contextual_connect(RtargR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytcontextual_connectgscCs tdS(N(R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyRl|ss0.7sThe :meth:`.Connectable.create` method is deprecated and will be removed in a future release. Please use the ``.create()`` method on specific schema objects to emit DDL sequences, including :meth:`.Table.create`, :meth:`.Index.create`, and :meth:`.MetaData.create_all`.cKs tdS(s<Emit CREATE statements for the given schema entity. N(R(RtentityRX((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytcreates sThe :meth:`.Connectable.drop` method is deprecated and will be removed in a future release. Please use the ``.drop()`` method on specific schema objects to emit DDL sequences, including :meth:`.Table.drop`, :meth:`.Index.drop`, and :meth:`.MetaData.drop_all`.cKs tdS(s:Emit DROP statements for the given schema entity. N(R(RRoRX((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytdrops cOs tdS(sAExecutes the given construct and returns a :class:`.ResultProxy`.N(R(Rtobject_t multiparamstparams((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytexecutescOs tdS(szExecutes and returns the first column of the first row. The underlying cursor is closed after execution. N(R(RRrRsRt((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pytscalarscKs tdS(N(R(RtvisitorcallabletelementRX((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt _run_visitorscCs tdS(N(R(RtelemRsRt((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyt_execute_clauseelementsN(RORPRQRFRERMRRURnRlRpRqRuRvRyR{(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyRkKs"       tExceptionContextcBsPeZdZdZdZdZdZdZdZ dZ dZ dZ dZ eZRS(sEncapsulate information about an error condition in progress. This object exists solely to be passed to the :meth:`.ConnectionEvents.handle_error` event, supporting an interface that can be extended without backwards-incompatibility. .. versionadded:: 0.9.7 N(RORPRQRER RMR<R=R>toriginal_exceptiontsqlalchemy_exceptiontchained_exceptiontexecution_contextRDRVtinvalidate_pool_on_disconnect(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyR|s     N( RQR]Rt sql.compilerRRtobjectRRWRaRkR|(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/interfaces.pyts$zb