File tree Expand file tree Collapse file tree 2 files changed +118
-0
lines changed Expand file tree Collapse file tree 2 files changed +118
-0
lines changed Original file line number Diff line number Diff line change
1
+ # NOTE This file aliases the pydantic namespace as pydantic.v1 for smoother v1 -> v2 transition
2
+ # flake8: noqa
3
+ from pydantic import *
4
+
5
+ # WARNING __all__ from .errors is not included here, it will be removed as an export here in v2
6
+ # please use "from pydantic.errors import ..." instead
7
+ __all__ = [
8
+ # annotated types utils
9
+ "create_model_from_namedtuple" ,
10
+ "create_model_from_typeddict" ,
11
+ # dataclasses
12
+ "dataclasses" ,
13
+ # class_validators
14
+ "root_validator" ,
15
+ "validator" ,
16
+ # config
17
+ "BaseConfig" ,
18
+ "ConfigDict" ,
19
+ "Extra" ,
20
+ # decorator
21
+ "validate_arguments" ,
22
+ # env_settings
23
+ "BaseSettings" ,
24
+ # error_wrappers
25
+ "ValidationError" ,
26
+ # fields
27
+ "Field" ,
28
+ "Required" ,
29
+ # main
30
+ "BaseModel" ,
31
+ "create_model" ,
32
+ "validate_model" ,
33
+ # network
34
+ "AnyUrl" ,
35
+ "AnyHttpUrl" ,
36
+ "FileUrl" ,
37
+ "HttpUrl" ,
38
+ "stricturl" ,
39
+ "EmailStr" ,
40
+ "NameEmail" ,
41
+ "IPvAnyAddress" ,
42
+ "IPvAnyInterface" ,
43
+ "IPvAnyNetwork" ,
44
+ "PostgresDsn" ,
45
+ "CockroachDsn" ,
46
+ "AmqpDsn" ,
47
+ "RedisDsn" ,
48
+ "MongoDsn" ,
49
+ "KafkaDsn" ,
50
+ "validate_email" ,
51
+ # parse
52
+ "Protocol" ,
53
+ # tools
54
+ "parse_file_as" ,
55
+ "parse_obj_as" ,
56
+ "parse_raw_as" ,
57
+ "schema_of" ,
58
+ "schema_json_of" ,
59
+ # types
60
+ "NoneStr" ,
61
+ "NoneBytes" ,
62
+ "StrBytes" ,
63
+ "NoneStrBytes" ,
64
+ "StrictStr" ,
65
+ "ConstrainedBytes" ,
66
+ "conbytes" ,
67
+ "ConstrainedList" ,
68
+ "conlist" ,
69
+ "ConstrainedSet" ,
70
+ "conset" ,
71
+ "ConstrainedFrozenSet" ,
72
+ "confrozenset" ,
73
+ "ConstrainedStr" ,
74
+ "constr" ,
75
+ "PyObject" ,
76
+ "ConstrainedInt" ,
77
+ "conint" ,
78
+ "PositiveInt" ,
79
+ "NegativeInt" ,
80
+ "NonNegativeInt" ,
81
+ "NonPositiveInt" ,
82
+ "ConstrainedFloat" ,
83
+ "confloat" ,
84
+ "PositiveFloat" ,
85
+ "NegativeFloat" ,
86
+ "NonNegativeFloat" ,
87
+ "NonPositiveFloat" ,
88
+ "FiniteFloat" ,
89
+ "ConstrainedDecimal" ,
90
+ "condecimal" ,
91
+ "ConstrainedDate" ,
92
+ "condate" ,
93
+ "UUID1" ,
94
+ "UUID3" ,
95
+ "UUID4" ,
96
+ "UUID5" ,
97
+ "FilePath" ,
98
+ "DirectoryPath" ,
99
+ "Json" ,
100
+ "JsonWrapper" ,
101
+ "SecretField" ,
102
+ "SecretStr" ,
103
+ "SecretBytes" ,
104
+ "StrictBool" ,
105
+ "StrictBytes" ,
106
+ "StrictInt" ,
107
+ "StrictFloat" ,
108
+ "PaymentCardNumber" ,
109
+ "PrivateAttr" ,
110
+ "ByteSize" ,
111
+ "PastDate" ,
112
+ "FutureDate" ,
113
+ # version
114
+ "compiled" ,
115
+ "VERSION" ,
116
+ ]
Original file line number Diff line number Diff line change
1
+ def test_imports () -> None :
2
+ from pydantic .v1 import BaseModel , dataclasses # noqa: F401
You can’t perform that action at this time.
0 commit comments