plexus-python-common 1.0.59__tar.gz → 1.0.61__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.
Files changed (94) hide show
  1. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/PKG-INFO +1 -1
  2. plexus_python_common-1.0.61/README.md +5 -0
  3. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/ormutils.py +28 -1
  4. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus_python_common.egg-info/PKG-INFO +1 -1
  5. plexus_python_common-1.0.59/README.md +0 -4
  6. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/.editorconfig +0 -0
  7. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/.github/workflows/pr.yml +0 -0
  8. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/.github/workflows/push.yml +0 -0
  9. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/.gitignore +0 -0
  10. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/MANIFEST.in +0 -0
  11. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/VERSION +0 -0
  12. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/pyproject.toml +0 -0
  13. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/jsonutils/dummy.0.jsonl +0 -0
  14. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/jsonutils/dummy.1.jsonl +0 -0
  15. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/jsonutils/dummy.2.jsonl +0 -0
  16. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/0-dummy +0 -0
  17. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/1-dummy +0 -0
  18. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/2-dummy +0 -0
  19. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.0.0.jsonl +0 -0
  20. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.0.0.vol-0.jsonl +0 -0
  21. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.0.jsonl +0 -0
  22. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.1.1.jsonl +0 -0
  23. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.1.1.vol-1.jsonl +0 -0
  24. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.1.jsonl +0 -0
  25. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.2.2.jsonl +0 -0
  26. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.2.2.vol-2.jsonl +0 -0
  27. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.2.jsonl +0 -0
  28. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.csv.part0 +0 -0
  29. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.csv.part1 +0 -0
  30. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.csv.part2 +0 -0
  31. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/pathutils/dummy.txt +0 -0
  32. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.baz/file.bar.baz +0 -0
  33. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.baz/file.foo.bar +0 -0
  34. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.baz/file.foo.baz +0 -0
  35. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
  36. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
  37. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
  38. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
  39. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.foo/file.bar +0 -0
  40. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.foo/file.baz +0 -0
  41. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils/dir.foo/file.foo +0 -0
  42. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils_archive/archive.compressed.zip +0 -0
  43. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/resources/unittest/s3utils_archive/archive.uncompressed.zip +0 -0
  44. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/setup.cfg +0 -0
  45. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/setup.py +0 -0
  46. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/__init__.py +0 -0
  47. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/carto/OSMFile.py +0 -0
  48. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/carto/OSMNode.py +0 -0
  49. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/carto/OSMTags.py +0 -0
  50. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/carto/OSMWay.py +0 -0
  51. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/carto/__init__.py +0 -0
  52. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/pose.py +0 -0
  53. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/proj.py +0 -0
  54. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/resources/__init__.py +0 -0
  55. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/resources/tags/__init__.py +0 -0
  56. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/resources/tags/unittest-1.0.0.tagset.yaml +0 -0
  57. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/resources/tags/universal-1.0.0.tagset.yaml +0 -0
  58. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/__init__.py +0 -0
  59. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/apiutils.py +0 -0
  60. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/bagutils.py +0 -0
  61. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/config.py +0 -0
  62. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/datautils.py +0 -0
  63. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/dockerutils.py +0 -0
  64. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/jsonutils.py +0 -0
  65. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/pathutils.py +0 -0
  66. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/s3utils.py +0 -0
  67. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/sqlutils.py +0 -0
  68. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/strutils.py +0 -0
  69. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/tagutils.py +0 -0
  70. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus/common/utils/testutils.py +0 -0
  71. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus_python_common.egg-info/SOURCES.txt +0 -0
  72. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus_python_common.egg-info/dependency_links.txt +0 -0
  73. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus_python_common.egg-info/not-zip-safe +0 -0
  74. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus_python_common.egg-info/requires.txt +0 -0
  75. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/src/plexus_python_common.egg-info/top_level.txt +0 -0
  76. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/__init__.py +0 -0
  77. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/__init__.py +0 -0
  78. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/carto/__init__.py +0 -0
  79. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/carto/osm_file_test.py +0 -0
  80. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/carto/osm_tags_test.py +0 -0
  81. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/pose_test.py +0 -0
  82. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/proj_test.py +0 -0
  83. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/__init__.py +0 -0
  84. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/bagutils_test.py +0 -0
  85. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/datautils_test.py +0 -0
  86. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/dockerutils_test.py +0 -0
  87. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/jsonutils_test.py +0 -0
  88. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/ormutils_test.py +0 -0
  89. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/pathutils_test.py +0 -0
  90. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/s3utils_test.py +0 -0
  91. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/strutils_test.py +0 -0
  92. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/tagutils_test.py +0 -0
  93. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/plexus_tests/common/utils/testutils_test.py +0 -0
  94. {plexus_python_common-1.0.59 → plexus_python_common-1.0.61}/test/testenv.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plexus-python-common
3
- Version: 1.0.59
3
+ Version: 1.0.61
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.12
6
6
  Classifier: Programming Language :: Python :: 3.13
@@ -0,0 +1,5 @@
1
+ # Plexus Python Common Module
2
+
3
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/plexus-python-common?style=for-the-badge)
4
+ ![PyPI - Version](https://img.shields.io/pypi/v/plexus-python-common?style=for-the-badge)
5
+ ![Codecov](https://img.shields.io/codecov/c/github/ruyangshou/plexus-python-common?token=U8EPB2JZ70&style=for-the-badge)
@@ -250,7 +250,6 @@ def make_base_model() -> type[SQLModel]:
250
250
 
251
251
  class BaseModel(SQLModel):
252
252
  metadata = sa.MetaData()
253
- model_config = pdt.ConfigDict(json_encoders={datetime.datetime: json_datetime_encoder})
254
253
 
255
254
  return BaseModel
256
255
 
@@ -515,6 +514,14 @@ def make_changing_model_mixin(dialect: str | None = None) -> type[ChangingModelM
515
514
  raise ValueError(f"create time '{self.created_at}' is greater than update time '{self.updated_at}'")
516
515
  return self
517
516
 
517
+ @pdt.field_serializer("created_at", mode="plain")
518
+ def serialize_created_at(self, v: datetime.datetime | None) -> str | None:
519
+ return json_datetime_encoder(v) if v is not None else None
520
+
521
+ @pdt.field_serializer("updated_at", mode="plain")
522
+ def serialize_updated_at(self, v: datetime.datetime | None) -> str | None:
523
+ return json_datetime_encoder(v) if v is not None else None
524
+
518
525
  @classmethod
519
526
  def make_index_created_at(cls, index_name: str) -> sa.Index:
520
527
  return sa.Index(index_name, "created_at")
@@ -582,6 +589,14 @@ def make_snapshot_model_mixin(dialect: str | None = None) -> type[SnapshotModelM
582
589
  raise ValueError(f"create time '{self.created_at}' is greater than expire time '{self.expired_at}'")
583
590
  return self
584
591
 
592
+ @pdt.field_serializer("created_at", mode="plain")
593
+ def serialize_created_at(self, v: datetime.datetime | None) -> str | None:
594
+ return json_datetime_encoder(v) if v is not None else None
595
+
596
+ @pdt.field_serializer("expired_at", mode="plain")
597
+ def serialize_expired_at(self, v: datetime.datetime | None) -> str | None:
598
+ return json_datetime_encoder(v) if v is not None else None
599
+
585
600
  @classmethod
586
601
  def make_index_created_at_expired_at(cls, index_name: str) -> sa.Index:
587
602
  return sa.Index(index_name, "created_at", "expired_at")
@@ -703,6 +718,18 @@ def make_revision_model_mixin(dialect: str | None = None) -> type[RevisionModelM
703
718
  raise ValueError(f"update time '{self.updated_at}' is greater than expire time '{self.expired_at}'")
704
719
  return self
705
720
 
721
+ @pdt.field_serializer("created_at", mode="plain")
722
+ def serialize_created_at(self, v: datetime.datetime | None) -> str | None:
723
+ return json_datetime_encoder(v) if v is not None else None
724
+
725
+ @pdt.field_serializer("updated_at", mode="plain")
726
+ def serialize_updated_at(self, v: datetime.datetime | None) -> str | None:
727
+ return json_datetime_encoder(v) if v is not None else None
728
+
729
+ @pdt.field_serializer("expired_at", mode="plain")
730
+ def serialize_expired_at(self, v: datetime.datetime | None) -> str | None:
731
+ return json_datetime_encoder(v) if v is not None else None
732
+
706
733
  @classmethod
707
734
  def make_index_created_at_updated_at_expired_at(cls, index_name: str) -> sa.Index:
708
735
  return sa.Index(index_name, "created_at", "updated_at", "expired_at")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plexus-python-common
3
- Version: 1.0.59
3
+ Version: 1.0.61
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.12
6
6
  Classifier: Programming Language :: Python :: 3.13
@@ -1,4 +0,0 @@
1
- # Plexus Python Common Module
2
-
3
- [![codecov](https://codecov.io/gh/ruyangshou/plexus-python-common/graph/badge.svg?token=U8EPB2JZ70)](
4
- https://codecov.io/gh/ruyangshou/plexus-python-common)