trd-utils 0.0.10__tar.gz → 0.0.12__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.

Potentially problematic release.


This version of trd-utils might be problematic. Click here for more details.

Files changed (24) hide show
  1. {trd_utils-0.0.10 → trd_utils-0.0.12}/PKG-INFO +1 -1
  2. {trd_utils-0.0.10 → trd_utils-0.0.12}/pyproject.toml +1 -1
  3. trd_utils-0.0.12/trd_utils/__init__.py +3 -0
  4. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/types_helper/base_model.py +11 -6
  5. trd_utils-0.0.10/trd_utils/__init__.py +0 -3
  6. {trd_utils-0.0.10 → trd_utils-0.0.12}/LICENSE +0 -0
  7. {trd_utils-0.0.10 → trd_utils-0.0.12}/README.md +0 -0
  8. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/cipher/__init__.py +0 -0
  9. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/common_utils/float_utils.py +0 -0
  10. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/exchanges/__init__.py +0 -0
  11. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/exchanges/blofin/__init__.py +0 -0
  12. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/exchanges/blofin/blofin_client.py +0 -0
  13. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/exchanges/blofin/blofin_types.py +0 -0
  14. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/exchanges/bx_ultra/__init__.py +0 -0
  15. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/exchanges/bx_ultra/bx_types.py +0 -0
  16. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/exchanges/bx_ultra/bx_ultra_client.py +0 -0
  17. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/exchanges/bx_ultra/bx_utils.py +0 -0
  18. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/exchanges/exchange_base.py +0 -0
  19. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/html_utils/__init__.py +0 -0
  20. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/html_utils/html_formats.py +0 -0
  21. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/tradingview/__init__.py +0 -0
  22. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/tradingview/tradingview_client.py +0 -0
  23. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/tradingview/tradingview_types.py +0 -0
  24. {trd_utils-0.0.10 → trd_utils-0.0.12}/trd_utils/types_helper/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: trd_utils
3
- Version: 0.0.10
3
+ Version: 0.0.12
4
4
  Summary: Common Basic Utils for Python3. By ALiwoto.
5
5
  Keywords: utils,trd_utils,basic-utils,common-utils
6
6
  Author: ALiwoto
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "trd_utils"
3
- version = "0.0.10"
3
+ version = "0.0.12"
4
4
  description = "Common Basic Utils for Python3. By ALiwoto."
5
5
  authors = ["ALiwoto <aminnimaj@gmail.com>"]
6
6
  packages = [
@@ -0,0 +1,3 @@
1
+
2
+ __version__ = "0.0.12"
3
+
@@ -48,13 +48,15 @@ def is_any_type(target_type: type) -> bool:
48
48
 
49
49
 
50
50
  # TODO: add support for max_depth for this...
51
- def value_to_normal_obj(value, omit_none: bool = False,):
51
+ def value_to_normal_obj(value, omit_none: bool = False):
52
52
  """
53
53
  Converts a custom value, to a corresponding "normal object" which can be used
54
54
  in dict.
55
55
  """
56
56
  if isinstance(value, BaseModel):
57
- return value.to_dict()
57
+ return value.to_dict(
58
+ omit_none=omit_none,
59
+ )
58
60
 
59
61
  if isinstance(value, list):
60
62
  results = []
@@ -261,12 +263,15 @@ class BaseModel:
261
263
 
262
264
  def serialize(
263
265
  self,
264
- separators=(",", ":"),
265
- ensure_ascii=True,
266
- sort_keys=True,
266
+ separators = (",", ":"),
267
+ ensure_ascii: bool = True,
268
+ sort_keys: bool = True,
269
+ omit_none: bool = False,
267
270
  ) -> bytes:
268
271
  return json.dumps(
269
- obj=self.to_dict(),
272
+ obj=self.to_dict(
273
+ omit_none=omit_none,
274
+ ),
270
275
  ensure_ascii=ensure_ascii,
271
276
  separators=separators,
272
277
  sort_keys=sort_keys,
@@ -1,3 +0,0 @@
1
-
2
- __version__ = "0.0.10"
3
-
File without changes
File without changes