Skip to content

Commit 54adc3c

Browse files
improvement: Expose public API in databind.json root module.
1 parent 5c9f08e commit 54adc3c

File tree

3 files changed

+42
-24
lines changed

3 files changed

+42
-24
lines changed

databind.core/src/databind/core/__init__.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,38 @@
2929
)
3030

3131
__all__ = [
32+
"Alias",
33+
"BooleanSetting",
34+
"ClassDecoratorSetting",
3235
"Context",
33-
"Direction",
34-
"Location",
35-
"Converter",
3636
"ConversionError",
37-
"NoMatchingConverter",
38-
"DelegateToClassmethodConverter",
39-
"Module",
40-
"ObjectMapper",
41-
"Schema",
4237
"convert_dataclass_to_schema",
4338
"convert_to_schema",
4439
"convert_typed_dict_to_schema",
45-
"Setting",
46-
"Settings",
47-
"SettingsProvider",
48-
"SerializeDefaults",
49-
"Alias",
50-
"BooleanSetting",
51-
"ClassDecoratorSetting",
40+
"Converter",
5241
"DateFormat",
53-
"Precision",
42+
"DelegateToClassmethodConverter",
5443
"DeserializeAs",
55-
"Union",
44+
"Direction",
5645
"ExtraKeys",
57-
"Remainder",
58-
"Strict",
5946
"Flattened",
60-
"Required",
61-
"Priority",
62-
"get_highest_setting",
63-
"get_class_setting",
6447
"get_annotation_setting",
48+
"get_class_setting",
6549
"get_class_settings",
50+
"get_highest_setting",
51+
"Location",
52+
"Module",
53+
"NoMatchingConverter",
54+
"ObjectMapper",
55+
"Precision",
56+
"Priority",
57+
"Remainder",
58+
"Required",
59+
"Schema",
60+
"SerializeDefaults",
61+
"Setting",
62+
"Settings",
63+
"SettingsProvider",
64+
"Strict",
65+
"Union",
6666
]

databind.json/.changelog/_unreleased.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@ id = "5d31c345-35ef-40f4-bf02-bfca907f0517"
33
type = "feature"
44
description = "Support new `DeserializeAs` setting"
55
author = "@NiklasRosenstein"
6+
7+
[[entries]]
8+
id = "e8a41ce4-27c1-4706-a154-fb2488c342dd"
9+
type = "improvement"
10+
description = "Expose public API in `databind.json` root module."
11+
author = "@NiklasRosenstein"

databind.json/src/databind/json/__init__.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,26 @@
33
import json
44
import typing as t
55

6-
from databind.core.utils import T
6+
from databind.json.module import JsonModule
7+
from databind.json.settings import JsonConverter
78

89
if t.TYPE_CHECKING:
910
from databind.core.mapper import ObjectMapper
1011
from databind.core.settings import Setting, Settings
1112

1213
__version__ = "4.2.8"
14+
__all__ = [
15+
"dump",
16+
"dumps",
17+
"get_object_mapper",
18+
"JsonConverter",
19+
"JsonModule",
20+
"JsonType",
21+
"load",
22+
"loads",
23+
]
1324

25+
T = t.TypeVar("T")
1426
JsonType = t.Union[
1527
None,
1628
bool,

0 commit comments

Comments
 (0)