PySerials 0.0.0.dev66__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/PKG-INFO +5 -5
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/pyproject.toml +4 -4
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/PySerials.egg-info/PKG-INFO +5 -5
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/PySerials.egg-info/requires.txt +3 -3
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/write.py +24 -1
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/setup.cfg +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/PySerials.egg-info/SOURCES.txt +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/PySerials.egg-info/dependency_links.txt +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/PySerials.egg-info/not-zip-safe +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/PySerials.egg-info/top_level.txt +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/__init__.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/compare.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/exception/__init__.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/exception/_base.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/exception/read.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/exception/update.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/exception/validate.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/format.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/nested_dict.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/property_dict.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/read.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/update.py +0 -0
- {pyserials-0.0.0.dev66 → pyserials-0.1.1}/src/pyserials/validate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PySerials
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Requires-Python: >=3.10
|
|
5
5
|
Requires-Dist: jsonschema<5,>=4.21.0
|
|
6
6
|
Requires-Dist: referencing>=0.35.1
|
|
@@ -8,6 +8,6 @@ Requires-Dist: jsonpath-ng<2,>=1.6.1
|
|
|
8
8
|
Requires-Dist: ruamel.yaml>=0.18
|
|
9
9
|
Requires-Dist: ruamel.yaml.string<1,>=0.1.1
|
|
10
10
|
Requires-Dist: tomlkit<0.14,>=0.11.8
|
|
11
|
-
Requires-Dist: MDit
|
|
12
|
-
Requires-Dist: ExceptionMan
|
|
13
|
-
Requires-Dist: ProtocolMan
|
|
11
|
+
Requires-Dist: MDit<0.2,>=0.1
|
|
12
|
+
Requires-Dist: ExceptionMan<0.2,>=0.1
|
|
13
|
+
Requires-Dist: ProtocolMan<0.2,>=0.1
|
|
@@ -17,7 +17,7 @@ namespaces = true
|
|
|
17
17
|
# ----------------------------------------- Project Metadata -------------------------------------
|
|
18
18
|
#
|
|
19
19
|
[project]
|
|
20
|
-
version = "0.
|
|
20
|
+
version = "0.1.1"
|
|
21
21
|
name = "PySerials"
|
|
22
22
|
dependencies = [
|
|
23
23
|
"jsonschema >= 4.21.0, < 5",
|
|
@@ -26,8 +26,8 @@ dependencies = [
|
|
|
26
26
|
"ruamel.yaml >= 0.18", # https://yaml.readthedocs.io/en/stable/
|
|
27
27
|
"ruamel.yaml.string >= 0.1.1, < 1",
|
|
28
28
|
"tomlkit >= 0.11.8, < 0.14", # https://tomlkit.readthedocs.io/en/stable/,
|
|
29
|
-
"MDit
|
|
30
|
-
"ExceptionMan
|
|
31
|
-
"ProtocolMan
|
|
29
|
+
"MDit >=0.1,<0.2",
|
|
30
|
+
"ExceptionMan >=0.1,<0.2",
|
|
31
|
+
"ProtocolMan >=0.1,<0.2",
|
|
32
32
|
]
|
|
33
33
|
requires-python = ">=3.10"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PySerials
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Requires-Python: >=3.10
|
|
5
5
|
Requires-Dist: jsonschema<5,>=4.21.0
|
|
6
6
|
Requires-Dist: referencing>=0.35.1
|
|
@@ -8,6 +8,6 @@ Requires-Dist: jsonpath-ng<2,>=1.6.1
|
|
|
8
8
|
Requires-Dist: ruamel.yaml>=0.18
|
|
9
9
|
Requires-Dist: ruamel.yaml.string<1,>=0.1.1
|
|
10
10
|
Requires-Dist: tomlkit<0.14,>=0.11.8
|
|
11
|
-
Requires-Dist: MDit
|
|
12
|
-
Requires-Dist: ExceptionMan
|
|
13
|
-
Requires-Dist: ProtocolMan
|
|
11
|
+
Requires-Dist: MDit<0.2,>=0.1
|
|
12
|
+
Requires-Dist: ExceptionMan<0.2,>=0.1
|
|
13
|
+
Requires-Dist: ProtocolMan<0.2,>=0.1
|
|
@@ -27,7 +27,7 @@ def to_string(
|
|
|
27
27
|
return to_json_string(data, sort_keys=sort_keys, indent=indent, default=default, end_of_file_newline=end_of_file_newline)
|
|
28
28
|
if data_type == "yaml":
|
|
29
29
|
return to_yaml_string(
|
|
30
|
-
data,
|
|
30
|
+
data,
|
|
31
31
|
end_of_file_newline=end_of_file_newline,
|
|
32
32
|
indent_mapping=indent_mapping,
|
|
33
33
|
indent_sequence=indent_sequence,
|
|
@@ -80,6 +80,29 @@ def to_json_string(
|
|
|
80
80
|
return f"{string.rstrip("\n")}\n" if end_of_file_newline else string
|
|
81
81
|
|
|
82
82
|
|
|
83
|
+
def to_json_file(
|
|
84
|
+
data: dict | list | str | int | float | bool | _yaml.CommentedMap | _yaml.CommentedSeq,
|
|
85
|
+
path: str | _Path,
|
|
86
|
+
sort_keys: bool = False,
|
|
87
|
+
indent: int | None = None,
|
|
88
|
+
default: Callable[[Any], Any] | None = None,
|
|
89
|
+
end_of_file_newline: bool = True,
|
|
90
|
+
make_dirs: bool = True,
|
|
91
|
+
) -> None:
|
|
92
|
+
json_string = to_json_string(
|
|
93
|
+
data,
|
|
94
|
+
sort_keys=sort_keys,
|
|
95
|
+
indent=indent,
|
|
96
|
+
default=default,
|
|
97
|
+
end_of_file_newline=end_of_file_newline,
|
|
98
|
+
)
|
|
99
|
+
path = _Path(path).resolve()
|
|
100
|
+
if make_dirs:
|
|
101
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
102
|
+
path.write_text(json_string)
|
|
103
|
+
return
|
|
104
|
+
|
|
105
|
+
|
|
83
106
|
def to_yaml_file(
|
|
84
107
|
data: dict | list | str | int | float | bool | _yaml.CommentedMap | _yaml.CommentedSeq,
|
|
85
108
|
path: str | _Path,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|