__init__.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # sqlalchemy/pool/__init__.py
  2. # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
  3. # <see AUTHORS file>
  4. #
  5. # This module is part of SQLAlchemy and is released under
  6. # the MIT License: https://www.opensource.org/licenses/mit-license.php
  7. """Connection pooling for DB-API connections.
  8. Provides a number of connection pool implementations for a variety of
  9. usage scenarios and thread behavior requirements imposed by the
  10. application, DB-API or database itself.
  11. Also provides a DB-API 2.0 connection proxying mechanism allowing
  12. regular DB-API connect() methods to be transparently managed by a
  13. SQLAlchemy connection pool.
  14. """
  15. from . import events
  16. from .base import _ConnectionFairy
  17. from .base import _ConnectionRecord
  18. from .base import _finalize_fairy
  19. from .base import Pool
  20. from .base import reset_commit
  21. from .base import reset_none
  22. from .base import reset_rollback
  23. from .dbapi_proxy import clear_managers
  24. from .dbapi_proxy import manage
  25. from .impl import AssertionPool
  26. from .impl import AsyncAdaptedQueuePool
  27. from .impl import FallbackAsyncAdaptedQueuePool
  28. from .impl import NullPool
  29. from .impl import QueuePool
  30. from .impl import SingletonThreadPool
  31. from .impl import StaticPool
  32. __all__ = [
  33. "Pool",
  34. "reset_commit",
  35. "reset_none",
  36. "reset_rollback",
  37. "clear_managers",
  38. "manage",
  39. "AssertionPool",
  40. "NullPool",
  41. "QueuePool",
  42. "AsyncAdaptedQueuePool",
  43. "FallbackAsyncAdaptedQueuePool",
  44. "SingletonThreadPool",
  45. "StaticPool",
  46. ]
  47. # as these are likely to be used in various test suites, debugging
  48. # setups, keep them in the sqlalchemy.pool namespace