1# ext/declarative/__init__.py
2# Copyright (C) 2005-2025 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# mypy: ignore-errors
8
9
10from .extensions import AbstractConcreteBase
11from .extensions import ConcreteBase
12from .extensions import DeferredReflection
13from ... import util
14from ...orm.decl_api import as_declarative as _as_declarative
15from ...orm.decl_api import declarative_base as _declarative_base
16from ...orm.decl_api import DeclarativeMeta
17from ...orm.decl_api import declared_attr
18from ...orm.decl_api import has_inherited_table as _has_inherited_table
19from ...orm.decl_api import synonym_for as _synonym_for
20
21
22@util.moved_20(
23 "The ``declarative_base()`` function is now available as "
24 ":func:`sqlalchemy.orm.declarative_base`."
25)
26def declarative_base(*arg, **kw):
27 return _declarative_base(*arg, **kw)
28
29
30@util.moved_20(
31 "The ``as_declarative()`` function is now available as "
32 ":func:`sqlalchemy.orm.as_declarative`"
33)
34def as_declarative(*arg, **kw):
35 return _as_declarative(*arg, **kw)
36
37
38@util.moved_20(
39 "The ``has_inherited_table()`` function is now available as "
40 ":func:`sqlalchemy.orm.has_inherited_table`."
41)
42def has_inherited_table(*arg, **kw):
43 return _has_inherited_table(*arg, **kw)
44
45
46@util.moved_20(
47 "The ``synonym_for()`` function is now available as "
48 ":func:`sqlalchemy.orm.synonym_for`"
49)
50def synonym_for(*arg, **kw):
51 return _synonym_for(*arg, **kw)
52
53
54__all__ = [
55 "declarative_base",
56 "synonym_for",
57 "has_inherited_table",
58 "instrument_declarative",
59 "declared_attr",
60 "as_declarative",
61 "ConcreteBase",
62 "AbstractConcreteBase",
63 "DeclarativeMeta",
64 "DeferredReflection",
65]