sharedkernel 1.5.0__tar.gz → 1.5.2__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.
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/PKG-INFO +8 -1
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/README.md +7 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/setup.py +1 -1
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/database/mongo_generic_repository.py +2 -1
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/objects/base_document.py +4 -3
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel.egg-info/PKG-INFO +8 -1
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/setup.cfg +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/common.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/database/__init__.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/database/vector_database_repository/__init__.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/database/vector_database_repository/chroma_startegy.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/database/vector_database_repository/milvus_strategy.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/database/vector_database_repository/vector_database_repository.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/database/vector_database_repository/vector_database_strategy.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/date_converter.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/enum/__init__.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/enum/error_code.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/enum/vector_database_type.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/exception/__init__.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/exception/exception.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/exception/exception_handlers.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/jwt_service.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/objects/__init__.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/objects/jwt_model.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/objects/result.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/regex_masking.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel/string_extentions.py +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel.egg-info/SOURCES.txt +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel.egg-info/dependency_links.txt +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel.egg-info/requires.txt +0 -0
- {sharedkernel-1.5.0 → sharedkernel-1.5.2}/sharedkernel.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sharedkernel
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.2
|
|
4
4
|
Summary: sharekernel is an shared package between all python projects
|
|
5
5
|
Author: Smilinno
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -20,6 +20,13 @@ Requires-Dist: persiantools
|
|
|
20
20
|
this a shared kernel package
|
|
21
21
|
|
|
22
22
|
# Change Log
|
|
23
|
+
### Version 1.5.2
|
|
24
|
+
- add created_on to base_document
|
|
25
|
+
### Version 1.5.1
|
|
26
|
+
- fix mongo repository bug
|
|
27
|
+
### Version 1.5.0
|
|
28
|
+
- implement date converter
|
|
29
|
+
- example: فردا - دیروز - یک ماه قبل
|
|
23
30
|
### Version 1.4.5
|
|
24
31
|
- upgrade fastapi version
|
|
25
32
|
### Version 1.4.4
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
this a shared kernel package
|
|
3
3
|
|
|
4
4
|
# Change Log
|
|
5
|
+
### Version 1.5.2
|
|
6
|
+
- add created_on to base_document
|
|
7
|
+
### Version 1.5.1
|
|
8
|
+
- fix mongo repository bug
|
|
9
|
+
### Version 1.5.0
|
|
10
|
+
- implement date converter
|
|
11
|
+
- example: فردا - دیروز - یک ماه قبل
|
|
5
12
|
### Version 1.4.5
|
|
6
13
|
- upgrade fastapi version
|
|
7
14
|
### Version 1.4.4
|
|
@@ -33,7 +33,7 @@ setup(
|
|
|
33
33
|
"persiantools"
|
|
34
34
|
],
|
|
35
35
|
# *strongly* suggested for sharing
|
|
36
|
-
version="1.5.
|
|
36
|
+
version="1.5.2",
|
|
37
37
|
description="sharekernel is an shared package between all python projects",
|
|
38
38
|
long_description=long_description,
|
|
39
39
|
long_description_content_type="text/markdown",
|
|
@@ -22,6 +22,7 @@ class MongoGenericRepository(Generic[T]):
|
|
|
22
22
|
query = {"_id": ObjectId(id), "is_deleted": False}
|
|
23
23
|
result = self.collection.find_one(query)
|
|
24
24
|
return self._map_to_model(result) if result else None
|
|
25
|
+
|
|
25
26
|
|
|
26
27
|
def insert_one(self, data: T) -> str:
|
|
27
28
|
delattr(data, "id")
|
|
@@ -46,6 +47,6 @@ class MongoGenericRepository(Generic[T]):
|
|
|
46
47
|
|
|
47
48
|
def get_all(self, page_number=1, page_size=10) -> List[T]:
|
|
48
49
|
skip_count = (page_number - 1) * page_size
|
|
49
|
-
query = {"
|
|
50
|
+
query = {"is_deleted": False}
|
|
50
51
|
result = self.collection.find(query).skip(skip_count).limit(page_size)
|
|
51
52
|
return [self._map_to_model(doc) for doc in result]
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
from pydantic import BaseModel
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
|
|
3
5
|
|
|
4
6
|
class BaseDocument(BaseModel):
|
|
5
7
|
id: Optional[str]
|
|
6
8
|
is_deleted: bool = False
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
created_on: datetime = datetime.now()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sharedkernel
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.2
|
|
4
4
|
Summary: sharekernel is an shared package between all python projects
|
|
5
5
|
Author: Smilinno
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -20,6 +20,13 @@ Requires-Dist: persiantools
|
|
|
20
20
|
this a shared kernel package
|
|
21
21
|
|
|
22
22
|
# Change Log
|
|
23
|
+
### Version 1.5.2
|
|
24
|
+
- add created_on to base_document
|
|
25
|
+
### Version 1.5.1
|
|
26
|
+
- fix mongo repository bug
|
|
27
|
+
### Version 1.5.0
|
|
28
|
+
- implement date converter
|
|
29
|
+
- example: فردا - دیروز - یک ماه قبل
|
|
23
30
|
### Version 1.4.5
|
|
24
31
|
- upgrade fastapi version
|
|
25
32
|
### Version 1.4.4
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|