luckylucy.utils.json 1.85rc1__py2.py3-none-any.whl

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.
@@ -0,0 +1,34 @@
1
+ # -*- coding: utf-8 -*-
2
+ # /// script
3
+ # requires-python = ">=2.7"
4
+ # dependencies = [
5
+ # "luckylucy.utils.compat",
6
+ # ]
7
+ #
8
+ # [tool.luckylucy]
9
+ # module = true
10
+ # ///
11
+ from datetime import datetime
12
+ from .compat import py2
13
+
14
+ __author__ = 'luckydonald'
15
+
16
+
17
+ if py2:
18
+ def to_jsonable_dict_iterator(dict, skip_keys=list()):
19
+ for key, value in dict.iteritems():
20
+ if key in skip_keys:
21
+ continue
22
+ if isinstance(value, datetime):
23
+ yield (key, str(value.isoformat()))
24
+ else:
25
+ yield (key, value)
26
+ else:
27
+ def to_jsonable_dict_iterator(dict, skip_keys=list()):
28
+ for key, value in dict.items():
29
+ if key in skip_keys:
30
+ continue
31
+ if isinstance(value, datetime):
32
+ yield (key, str(value.isoformat()))
33
+ else:
34
+ yield (key, value)
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.5
2
+ Name: luckylucy.utils.json
3
+ Version: 1.85.pre1
4
+ Summary: A collection of utilities I use across different projects (luckylucy.utils.json)
5
+ Project-URL: Homepage, https://github.com/luckydonald/luckylucy.utils
6
+ Project-URL: Changelog, https://github.com/luckydonald/luckylucy.utils/blob/HEAD/CHANGELOG.md
7
+ Author-email: luckylucy <luckylucy.utils._.code@luckydonald.de>
8
+ License-Expression: GPL-2.0-or-later
9
+ Requires-Python: >=2.7
10
+ Requires-Dist: luckylucy-utils-compat==1.85.pre1
11
+ Description-Content-Type: text/markdown
12
+
13
+ # luckylucy.utils.json 1.85.pre1
14
+
15
+ A collection of utilities I use across different projects, part of [luckylucy.utils](https://github.com/luckydonald/luckylucy.utils).
16
+
17
+ ## Requirements
18
+
19
+ - `luckylucy.utils.compat==1.85.pre1`
20
+
21
+ - [Changes in 1.85.pre1](https://github.com/luckydonald/luckylucy.utils/releases/tag/v1.85.pre1)
22
+ - [Changelog](https://github.com/luckydonald/luckylucy.utils/blob/HEAD/CHANGELOG.md)
@@ -0,0 +1,4 @@
1
+ luckylucy/utils/json.py,sha256=RqvPZB3mFGuxREMmPPFvD90dHu7yUpLvgXrCbjzuOMM,877
2
+ luckylucy_utils_json-1.85rc1.dist-info/METADATA,sha256=-Un_L_bAxltEan5vPkUxyD02QolvYyRzehGZ38XUTHU,943
3
+ luckylucy_utils_json-1.85rc1.dist-info/WHEEL,sha256=K_1GFnQyJknHy845BKcqIEBshHiHkrbA-n3al-vZCiY,105
4
+ luckylucy_utils_json-1.85rc1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py2-none-any
5
+ Tag: py3-none-any