serializable 0.3.0__tar.gz → 0.4.0__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.
- {serializable-0.3.0 → serializable-0.4.0}/PKG-INFO +12 -8
- {serializable-0.3.0 → serializable-0.4.0}/README.md +11 -7
- {serializable-0.3.0 → serializable-0.4.0}/serializable/__init__.py +1 -1
- {serializable-0.3.0 → serializable-0.4.0}/serializable.egg-info/PKG-INFO +12 -8
- {serializable-0.3.0 → serializable-0.4.0}/LICENSE +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/serializable/helpers.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/serializable/primitive_types.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/serializable/serializable.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/serializable.egg-info/SOURCES.txt +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/serializable.egg-info/dependency_links.txt +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/serializable.egg-info/requires.txt +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/serializable.egg-info/top_level.txt +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/setup.cfg +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/setup.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_class.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_default_to_dict_implementation.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_function.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_keyword_aliases.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_namedtuple.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_nesting.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_object.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_primitive_values.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_set.py +0 -0
- {serializable-0.3.0 → serializable-0.4.0}/tests/test_tuple.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: serializable
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Base class with serialization helpers for user-defined Python objects
|
|
5
5
|
Home-page: https://github.com/iskandr/serializable
|
|
6
6
|
Author: Alex Rubinsteyn
|
|
@@ -16,25 +16,29 @@ License-File: LICENSE
|
|
|
16
16
|
Requires-Dist: typechecks>=0.0.2
|
|
17
17
|
Requires-Dist: simplejson
|
|
18
18
|
|
|
19
|
-
[](https://github.com/openvax/serializable/actions/workflows/tests.yml)
|
|
20
|
+
<a href="https://pypi.python.org/pypi/serializable/">
|
|
21
|
+
<img src="https://img.shields.io/pypi/v/serializable.svg?maxAge=1000" alt="PyPI" />
|
|
22
|
+
</a>
|
|
21
23
|
# serializable
|
|
24
|
+
|
|
22
25
|
Base class with serialization methods for user-defined Python objects
|
|
23
26
|
|
|
24
27
|
## Usage
|
|
28
|
+
|
|
25
29
|
Classes which inherit from `Serializable` are enabled with default implementations of
|
|
26
30
|
`to_json`, `from_json`, `__reduce__` (for pickling), and other serialization
|
|
27
|
-
helpers.
|
|
31
|
+
helpers.
|
|
28
32
|
|
|
29
33
|
A derived class must either:
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
- have a member data matching the name of each argument to `__init__`
|
|
36
|
+
- provide a user-defined `to_dict()` method which returns a dictionary whose keys match the arguments to `__init__`
|
|
33
37
|
|
|
34
38
|
If you change the keyword arguments to a class which derives from `Serializable` but would like to be able to deserialize older JSON representations then you can define a class-level dictionary called `_KEYWORD_ALIASES` which maps old keywords to new names (or `None` if a keyword was removed).
|
|
35
39
|
|
|
36
40
|
## Limitations
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
- Serializable objects must inherit from `Serializable`, be tuples or namedtuples, be serializble primitive types such as dict, list, int, float, or str.
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
- The serialized representation of objects relies on reserved keywords (such as `"__name__"`, and `"__class__"`), so dictionaries are expected to not contain any keys which begin with two underscores.
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
[](https://github.com/openvax/serializable/actions/workflows/tests.yml)
|
|
2
|
+
<a href="https://pypi.python.org/pypi/serializable/">
|
|
3
|
+
<img src="https://img.shields.io/pypi/v/serializable.svg?maxAge=1000" alt="PyPI" />
|
|
4
|
+
</a>
|
|
3
5
|
# serializable
|
|
6
|
+
|
|
4
7
|
Base class with serialization methods for user-defined Python objects
|
|
5
8
|
|
|
6
9
|
## Usage
|
|
10
|
+
|
|
7
11
|
Classes which inherit from `Serializable` are enabled with default implementations of
|
|
8
12
|
`to_json`, `from_json`, `__reduce__` (for pickling), and other serialization
|
|
9
|
-
helpers.
|
|
13
|
+
helpers.
|
|
10
14
|
|
|
11
15
|
A derived class must either:
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
- have a member data matching the name of each argument to `__init__`
|
|
18
|
+
- provide a user-defined `to_dict()` method which returns a dictionary whose keys match the arguments to `__init__`
|
|
15
19
|
|
|
16
20
|
If you change the keyword arguments to a class which derives from `Serializable` but would like to be able to deserialize older JSON representations then you can define a class-level dictionary called `_KEYWORD_ALIASES` which maps old keywords to new names (or `None` if a keyword was removed).
|
|
17
21
|
|
|
18
22
|
## Limitations
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
- Serializable objects must inherit from `Serializable`, be tuples or namedtuples, be serializble primitive types such as dict, list, int, float, or str.
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
- The serialized representation of objects relies on reserved keywords (such as `"__name__"`, and `"__class__"`), so dictionaries are expected to not contain any keys which begin with two underscores.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: serializable
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Base class with serialization helpers for user-defined Python objects
|
|
5
5
|
Home-page: https://github.com/iskandr/serializable
|
|
6
6
|
Author: Alex Rubinsteyn
|
|
@@ -16,25 +16,29 @@ License-File: LICENSE
|
|
|
16
16
|
Requires-Dist: typechecks>=0.0.2
|
|
17
17
|
Requires-Dist: simplejson
|
|
18
18
|
|
|
19
|
-
[](https://github.com/openvax/serializable/actions/workflows/tests.yml)
|
|
20
|
+
<a href="https://pypi.python.org/pypi/serializable/">
|
|
21
|
+
<img src="https://img.shields.io/pypi/v/serializable.svg?maxAge=1000" alt="PyPI" />
|
|
22
|
+
</a>
|
|
21
23
|
# serializable
|
|
24
|
+
|
|
22
25
|
Base class with serialization methods for user-defined Python objects
|
|
23
26
|
|
|
24
27
|
## Usage
|
|
28
|
+
|
|
25
29
|
Classes which inherit from `Serializable` are enabled with default implementations of
|
|
26
30
|
`to_json`, `from_json`, `__reduce__` (for pickling), and other serialization
|
|
27
|
-
helpers.
|
|
31
|
+
helpers.
|
|
28
32
|
|
|
29
33
|
A derived class must either:
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
- have a member data matching the name of each argument to `__init__`
|
|
36
|
+
- provide a user-defined `to_dict()` method which returns a dictionary whose keys match the arguments to `__init__`
|
|
33
37
|
|
|
34
38
|
If you change the keyword arguments to a class which derives from `Serializable` but would like to be able to deserialize older JSON representations then you can define a class-level dictionary called `_KEYWORD_ALIASES` which maps old keywords to new names (or `None` if a keyword was removed).
|
|
35
39
|
|
|
36
40
|
## Limitations
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
- Serializable objects must inherit from `Serializable`, be tuples or namedtuples, be serializble primitive types such as dict, list, int, float, or str.
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
- The serialized representation of objects relies on reserved keywords (such as `"__name__"`, and `"__class__"`), so dictionaries are expected to not contain any keys which begin with two underscores.
|
|
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
|
|
File without changes
|
|
File without changes
|