class_docstr: Available events for :class:`_pool.Pool`.
  
  The methods here define the name of an event as well
  as the names of members that are passed to listener
  functions.
  
  e.g.::
  
      from sqlalchemy import event
  
      def my_on_checkout(dbapi_conn, connection_rec, connection_proxy):
          "handle an on checkout event"
  
      event.listen(Pool, 'checkout', my_on_checkout)
  
  In addition to accepting the :class:`_pool.Pool` class and
  :class:`_pool.Pool` instances, :class:`_events.PoolEvents` also accepts
  :class:`_engine.Engine` objects and the :class:`_engine.Engine` class as
  targets, which will be resolved to the ``.pool`` attribute of the
  given engine or the :class:`_pool.Pool` class::
  
      engine = create_engine("postgresql+psycopg2://scott:tiger@localhost/test")
  
      # will associate with engine.pool
      event.listen(engine, 'checkout', my_on_checkout)
class_docstr_tok: ["Available","events","for",":","class",":","`","_pool.Pool","`",".","The","methods","here","define","the","name","of","an","event","as","well","as","the","names","of","members","that","are","passed","to","listener","functions",".","e.g",".",":",":","from","sqlalchemy","import","event","def","my_on_checkout","(","dbapi_conn",",","connection_rec",",","connection_proxy",")",":","``","handle","an","on","checkout","event","''","event.listen","(","Pool",",","'checkout","'",",","my_on_checkout",")","In","addition","to","accepting","the",":","class",":","`","_pool.Pool","`","class","and",":","class",":","`","_pool.Pool","`","instances",",",":","class",":","`","_events.PoolEvents","`","also","accepts",":","class",":","`","_engine.Engine","`","objects","and","the",":","class",":","`","_engine.Engine","`","class","as","targets",",","which","will","be","resolved","to","the","``",".pool","``","attribute","of","the","given","engine","or","the",":","class",":","`","_pool.Pool","`","class",":",":","engine","=","create_engine","(","``","postgresql+psycopg2",":","\/\/scott",":","tiger","@","localhost\/test","''",")","#","will","associate","with","engine.pool","event.listen","(","engine",",","'checkout","'",",","my_on_checkout",")"]
docstr: Called exactly once for the first time a DBAPI connection is
  checked out from a particular :class:`_pool.Pool`.
  
  The rationale for :meth:`_events.PoolEvents.first_connect`
  is to determine
  information about a particular series of database connections based
  on the settings used for all connections.  Since a particular
  :class:`_pool.Pool`
  refers to a single "creator" function (which in terms
  of a :class:`_engine.Engine`
  refers to the URL and connection options used),
  it is typically valid to make observations about a single connection
  that can be safely assumed to be valid about all subsequent
  connections, such as the database version, the server and client
  encoding settings, collation settings, and many others.
  
  :param dbapi_connection: a DBAPI connection.
   The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.
  
  :param connection_record: the :class:`.ConnectionPoolEntry` managing
   the DBAPI connection.
docstr_tok: ["Called","exactly","once","for","the","first","time","a","DBAPI","connection","is","checked","out","from","a","particular",":","class",":","`","_pool.Pool","`",".","The","rationale","for",":","meth",":","`","_events.PoolEvents.first_connect","`","is","to","determine","information","about","a","particular","series","of","database","connections","based","on","the","settings","used","for","all","connections",".","Since","a","particular",":","class",":","`","_pool.Pool","`","refers","to","a","single","``","creator","''","function","(","which","in","terms","of","a",":","class",":","`","_engine.Engine","`","refers","to","the","URL","and","connection","options","used",")",",","it","is","typically","valid","to","make","observations","about","a","single","connection","that","can","be","safely","assumed","to","be","valid","about","all","subsequent","connections",",","such","as","the","database","version",",","the","server","and","client","encoding","settings",",","collation","settings",",","and","many","others",".",":","param","dbapi_connection",":","a","DBAPI","connection",".","The",":","attr",":","`",".ConnectionPoolEntry.dbapi_connection","`","attribute",".",":","param","connection_record",":","the",":","class",":","`",".ConnectionPoolEntry","`","managing","the","DBAPI","connection","."]
code: def first_connect(
      self,
      dbapi_connection: DBAPIConnection,
      connection_record: ConnectionPoolEntry,
  ) -> None:
      """Called exactly once for the first time a DBAPI connection is
      checked out from a particular :class:`_pool.Pool`.
  
      The rationale for :meth:`_events.PoolEvents.first_connect`
      is to determine
      information about a particular series of database connections based
      on the settings used for all connections.  Since a particular
      :class:`_pool.Pool`
      refers to a single "creator" function (which in terms
      of a :class:`_engine.Engine`
      refers to the URL and connection options used),
      it is typically valid to make observations about a single connection
      that can be safely assumed to be valid about all subsequent
      connections, such as the database version, the server and client
      encoding settings, collation settings, and many others.
  
      :param dbapi_connection: a DBAPI connection.
       The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.
  
      :param connection_record: the :class:`.ConnectionPoolEntry` managing
       the DBAPI connection.
  
      """
  
imports: from __future__ import annotations
  import typing
  from typing import Any
  from typing import Optional
  from typing import Type
  from typing import Union
  from .base import ConnectionPoolEntry
  from .base import Pool
  from .base import PoolProxiedConnection
  from .base import PoolResetState
  from ..None import event
  from ..None import util
label_desc: Use image node_id 4 for calling the PoolEvents obj's underlying member method code with example usage: obj.first_connect(dbapi_connection, connection_record) without return types