__init__.py 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. # sqlalchemy/__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. from . import util as _util
  8. from .engine import create_engine
  9. from .engine import create_mock_engine
  10. from .engine import engine_from_config
  11. from .inspection import inspect
  12. from .schema import BLANK_SCHEMA
  13. from .schema import CheckConstraint
  14. from .schema import Column
  15. from .schema import ColumnDefault
  16. from .schema import Computed
  17. from .schema import Constraint
  18. from .schema import DDL
  19. from .schema import DefaultClause
  20. from .schema import FetchedValue
  21. from .schema import ForeignKey
  22. from .schema import ForeignKeyConstraint
  23. from .schema import Identity
  24. from .schema import Index
  25. from .schema import MetaData
  26. from .schema import PrimaryKeyConstraint
  27. from .schema import Sequence
  28. from .schema import Table
  29. from .schema import ThreadLocalMetaData
  30. from .schema import UniqueConstraint
  31. from .sql import alias
  32. from .sql import all_
  33. from .sql import and_
  34. from .sql import any_
  35. from .sql import asc
  36. from .sql import between
  37. from .sql import bindparam
  38. from .sql import case
  39. from .sql import cast
  40. from .sql import collate
  41. from .sql import column
  42. from .sql import delete
  43. from .sql import desc
  44. from .sql import distinct
  45. from .sql import except_
  46. from .sql import except_all
  47. from .sql import exists
  48. from .sql import extract
  49. from .sql import false
  50. from .sql import func
  51. from .sql import funcfilter
  52. from .sql import insert
  53. from .sql import intersect
  54. from .sql import intersect_all
  55. from .sql import join
  56. from .sql import LABEL_STYLE_DEFAULT
  57. from .sql import LABEL_STYLE_DISAMBIGUATE_ONLY
  58. from .sql import LABEL_STYLE_NONE
  59. from .sql import LABEL_STYLE_TABLENAME_PLUS_COL
  60. from .sql import lambda_stmt
  61. from .sql import lateral
  62. from .sql import literal
  63. from .sql import literal_column
  64. from .sql import modifier
  65. from .sql import not_
  66. from .sql import null
  67. from .sql import nulls_first
  68. from .sql import nulls_last
  69. from .sql import nullsfirst
  70. from .sql import nullslast
  71. from .sql import or_
  72. from .sql import outerjoin
  73. from .sql import outparam
  74. from .sql import over
  75. from .sql import select
  76. from .sql import subquery
  77. from .sql import table
  78. from .sql import tablesample
  79. from .sql import text
  80. from .sql import true
  81. from .sql import tuple_
  82. from .sql import type_coerce
  83. from .sql import union
  84. from .sql import union_all
  85. from .sql import update
  86. from .sql import values
  87. from .sql import within_group
  88. from .types import ARRAY
  89. from .types import BIGINT
  90. from .types import BigInteger
  91. from .types import BINARY
  92. from .types import BLOB
  93. from .types import BOOLEAN
  94. from .types import Boolean
  95. from .types import CHAR
  96. from .types import CLOB
  97. from .types import DATE
  98. from .types import Date
  99. from .types import DATETIME
  100. from .types import DateTime
  101. from .types import DECIMAL
  102. from .types import Enum
  103. from .types import FLOAT
  104. from .types import Float
  105. from .types import INT
  106. from .types import INTEGER
  107. from .types import Integer
  108. from .types import Interval
  109. from .types import JSON
  110. from .types import LargeBinary
  111. from .types import NCHAR
  112. from .types import NUMERIC
  113. from .types import Numeric
  114. from .types import NVARCHAR
  115. from .types import PickleType
  116. from .types import REAL
  117. from .types import SMALLINT
  118. from .types import SmallInteger
  119. from .types import String
  120. from .types import TEXT
  121. from .types import Text
  122. from .types import TIME
  123. from .types import Time
  124. from .types import TIMESTAMP
  125. from .types import TupleType
  126. from .types import TypeDecorator
  127. from .types import Unicode
  128. from .types import UnicodeText
  129. from .types import VARBINARY
  130. from .types import VARCHAR
  131. __version__ = "1.4.31"
  132. def __go(lcls):
  133. global __all__
  134. from . import events
  135. from . import util as _sa_util
  136. import inspect as _inspect
  137. __all__ = sorted(
  138. name
  139. for name, obj in lcls.items()
  140. if not (name.startswith("_") or _inspect.ismodule(obj))
  141. )
  142. _sa_util.preloaded.import_prefix("sqlalchemy")
  143. from . import exc
  144. exc._version_token = "".join(__version__.split(".")[0:2])
  145. __go(locals())