sharedkernel 1.4.1__tar.gz → 1.4.3__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.4.1 → sharedkernel-1.4.3}/PKG-INFO +5 -1
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/README.md +4 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/setup.py +1 -1
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/database/mongo_generic_repository.py +6 -6
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel.egg-info/PKG-INFO +5 -1
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/setup.cfg +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/common.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/database/__init__.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/database/vector_database_repository/__init__.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/database/vector_database_repository/chroma_startegy.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/database/vector_database_repository/milvus_strategy.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/database/vector_database_repository/vector_database_repository.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/database/vector_database_repository/vector_database_strategy.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/date_converter.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/enum/__init__.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/enum/error_code.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/enum/vector_database_type.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/exception/__init__.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/exception/exception.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/exception/exception_handlers.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/jwt_service.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/objects/__init__.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/objects/base_document.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/objects/jwt_model.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/objects/result.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/regex_masking.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel/string_extentions.py +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel.egg-info/SOURCES.txt +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel.egg-info/dependency_links.txt +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/sharedkernel.egg-info/requires.txt +0 -0
- {sharedkernel-1.4.1 → sharedkernel-1.4.3}/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.4.
|
|
3
|
+
Version: 1.4.3
|
|
4
4
|
Summary: sharekernel is an shared package between all python projects
|
|
5
5
|
Author: Smilinno
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -19,6 +19,10 @@ Requires-Dist: jdatetime
|
|
|
19
19
|
this a shared kernel package
|
|
20
20
|
|
|
21
21
|
# Change Log
|
|
22
|
+
### Version 1.4.2
|
|
23
|
+
- Fix collection bug in MongoGenericRepository
|
|
24
|
+
### Version 1.4.2
|
|
25
|
+
- Fix minor bugs
|
|
22
26
|
### Version 1.4.1
|
|
23
27
|
- Fix minor bug in MongoGenericRepository
|
|
24
28
|
### Version 1.4.0
|
|
@@ -32,7 +32,7 @@ setup(
|
|
|
32
32
|
"jdatetime"
|
|
33
33
|
],
|
|
34
34
|
# *strongly* suggested for sharing
|
|
35
|
-
version="1.4.
|
|
35
|
+
version="1.4.3",
|
|
36
36
|
description="sharekernel is an shared package between all python projects",
|
|
37
37
|
long_description=long_description,
|
|
38
38
|
long_description_content_type="text/markdown",
|
|
@@ -20,31 +20,31 @@ class MongoGenericRepository(Generic[T]):
|
|
|
20
20
|
|
|
21
21
|
def find_one(self, id: str) -> T:
|
|
22
22
|
query = {"_id": ObjectId(id), "is_deleted": False}
|
|
23
|
-
result = self.
|
|
23
|
+
result = self.collection.find_one(query)
|
|
24
24
|
return self._map_to_model(result) if result else None
|
|
25
25
|
|
|
26
26
|
def insert_one(self, data: T) -> str:
|
|
27
27
|
delattr(data, "id")
|
|
28
|
-
result = self.
|
|
28
|
+
result = self.collection.insert_one(data.dict())
|
|
29
29
|
return str(result.inserted_id)
|
|
30
30
|
|
|
31
31
|
def insert_many(self, data: List[T]) -> List[str]:
|
|
32
32
|
data_list = [delattr(d.dict(), "id") for d in data]
|
|
33
|
-
result = self.
|
|
33
|
+
result = self.collection.insert_many(data_list)
|
|
34
34
|
return [str(id_) for id_ in result.inserted_ids]
|
|
35
35
|
|
|
36
36
|
def update_one(self, id: str, data: T) -> int:
|
|
37
37
|
delattr(data, "id")
|
|
38
38
|
query = {"_id": ObjectId(id)}
|
|
39
|
-
result = self.
|
|
39
|
+
result = self.collection.update_one(query, {"$set": data.dict()})
|
|
40
40
|
return result.modified_count
|
|
41
41
|
|
|
42
42
|
def delete_one(self, id: str) -> int:
|
|
43
43
|
query = {"_id": ObjectId(id)}
|
|
44
|
-
result = self.
|
|
44
|
+
result = self.collection.delete_one(query)
|
|
45
45
|
return result.deleted_count
|
|
46
46
|
|
|
47
47
|
def get_all(self, page_number=1, page_size=10) -> List[T]:
|
|
48
48
|
skip_count = (page_number - 1) * page_size
|
|
49
|
-
result = self.
|
|
49
|
+
result = self.collection.find().skip(skip_count).limit(page_size)
|
|
50
50
|
return [self._map_to_model(doc) for doc in result]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sharedkernel
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.3
|
|
4
4
|
Summary: sharekernel is an shared package between all python projects
|
|
5
5
|
Author: Smilinno
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -19,6 +19,10 @@ Requires-Dist: jdatetime
|
|
|
19
19
|
this a shared kernel package
|
|
20
20
|
|
|
21
21
|
# Change Log
|
|
22
|
+
### Version 1.4.2
|
|
23
|
+
- Fix collection bug in MongoGenericRepository
|
|
24
|
+
### Version 1.4.2
|
|
25
|
+
- Fix minor bugs
|
|
22
26
|
### Version 1.4.1
|
|
23
27
|
- Fix minor bug in MongoGenericRepository
|
|
24
28
|
### Version 1.4.0
|
|
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
|
|
File without changes
|