vtjson 2.1.2__tar.gz → 2.1.3__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.
- {vtjson-2.1.2/src/vtjson.egg-info → vtjson-2.1.3}/PKG-INFO +2 -2
- {vtjson-2.1.2 → vtjson-2.1.3}/README.md +1 -1
- {vtjson-2.1.2 → vtjson-2.1.3}/src/vtjson/vtjson.py +1 -1
- {vtjson-2.1.2 → vtjson-2.1.3/src/vtjson.egg-info}/PKG-INFO +2 -2
- {vtjson-2.1.2 → vtjson-2.1.3}/AUTHORS +0 -0
- {vtjson-2.1.2 → vtjson-2.1.3}/LICENSE +0 -0
- {vtjson-2.1.2 → vtjson-2.1.3}/pyproject.toml +0 -0
- {vtjson-2.1.2 → vtjson-2.1.3}/setup.cfg +0 -0
- {vtjson-2.1.2 → vtjson-2.1.3}/src/vtjson/__init__.py +0 -0
- {vtjson-2.1.2 → vtjson-2.1.3}/src/vtjson.egg-info/SOURCES.txt +0 -0
- {vtjson-2.1.2 → vtjson-2.1.3}/src/vtjson.egg-info/dependency_links.txt +0 -0
- {vtjson-2.1.2 → vtjson-2.1.3}/src/vtjson.egg-info/requires.txt +0 -0
- {vtjson-2.1.2 → vtjson-2.1.3}/src/vtjson.egg-info/top_level.txt +0 -0
- {vtjson-2.1.2 → vtjson-2.1.3}/tests/test_vtjson.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vtjson
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
4
4
|
Summary: A lightweight package for validating JSON like Python objects
|
|
5
5
|
Author-email: Michel Van den Bergh <michel.vandenbergh@uhasselt.be>
|
|
6
6
|
Project-URL: Homepage, https://github.com/vdbergh/vtjson
|
|
@@ -31,7 +31,7 @@ The following conventions are used:
|
|
|
31
31
|
- As in typescript, a (string) key ending in `?` represents an optional key. The corresponding schema (the item the key points to) will only be used for validation when the key is present in the object that should be validated. A key can also be made optional by wrapping it as `optional_key(key)`.
|
|
32
32
|
- If in a list/tuple the last entry is `...` (ellipsis) it means that the next to last entry will be repeated zero or more times. In this way generic types can be created. For example the schema `[str, ...]` represents a list of strings.
|
|
33
33
|
|
|
34
|
-
As of version 2.1, a suitable adapted `vtjson` schema can be used as a Python type hint. Here is the above [example](https://
|
|
34
|
+
As of version 2.1, a suitable adapted `vtjson` schema can be used as a Python type hint. Here is the above [example](https://raw.githubusercontent.com/vdbergh/vtjson/refs/heads/main/docs/example2.md) rewritten in a way that is compatible with type hints. E.g. if one wants to ensure that a run object obtained via an api has the correct type one can do
|
|
35
35
|
|
|
36
36
|
```python
|
|
37
37
|
from typing import assert_type
|
|
@@ -11,7 +11,7 @@ The following conventions are used:
|
|
|
11
11
|
- As in typescript, a (string) key ending in `?` represents an optional key. The corresponding schema (the item the key points to) will only be used for validation when the key is present in the object that should be validated. A key can also be made optional by wrapping it as `optional_key(key)`.
|
|
12
12
|
- If in a list/tuple the last entry is `...` (ellipsis) it means that the next to last entry will be repeated zero or more times. In this way generic types can be created. For example the schema `[str, ...]` represents a list of strings.
|
|
13
13
|
|
|
14
|
-
As of version 2.1, a suitable adapted `vtjson` schema can be used as a Python type hint. Here is the above [example](https://
|
|
14
|
+
As of version 2.1, a suitable adapted `vtjson` schema can be used as a Python type hint. Here is the above [example](https://raw.githubusercontent.com/vdbergh/vtjson/refs/heads/main/docs/example2.md) rewritten in a way that is compatible with type hints. E.g. if one wants to ensure that a run object obtained via an api has the correct type one can do
|
|
15
15
|
|
|
16
16
|
```python
|
|
17
17
|
from typing import assert_type
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vtjson
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
4
4
|
Summary: A lightweight package for validating JSON like Python objects
|
|
5
5
|
Author-email: Michel Van den Bergh <michel.vandenbergh@uhasselt.be>
|
|
6
6
|
Project-URL: Homepage, https://github.com/vdbergh/vtjson
|
|
@@ -31,7 +31,7 @@ The following conventions are used:
|
|
|
31
31
|
- As in typescript, a (string) key ending in `?` represents an optional key. The corresponding schema (the item the key points to) will only be used for validation when the key is present in the object that should be validated. A key can also be made optional by wrapping it as `optional_key(key)`.
|
|
32
32
|
- If in a list/tuple the last entry is `...` (ellipsis) it means that the next to last entry will be repeated zero or more times. In this way generic types can be created. For example the schema `[str, ...]` represents a list of strings.
|
|
33
33
|
|
|
34
|
-
As of version 2.1, a suitable adapted `vtjson` schema can be used as a Python type hint. Here is the above [example](https://
|
|
34
|
+
As of version 2.1, a suitable adapted `vtjson` schema can be used as a Python type hint. Here is the above [example](https://raw.githubusercontent.com/vdbergh/vtjson/refs/heads/main/docs/example2.md) rewritten in a way that is compatible with type hints. E.g. if one wants to ensure that a run object obtained via an api has the correct type one can do
|
|
35
35
|
|
|
36
36
|
```python
|
|
37
37
|
from typing import assert_type
|
|
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
|