sharedkernel 1.3.0__tar.gz → 1.4.0__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.3.0 → sharedkernel-1.4.0}/PKG-INFO +4 -2
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/README.md +2 -1
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/setup.py +2 -1
- sharedkernel-1.4.0/sharedkernel/date_converter.py +32 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/enum/error_code.py +2 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel.egg-info/PKG-INFO +4 -2
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel.egg-info/SOURCES.txt +1 -1
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel.egg-info/requires.txt +1 -0
- sharedkernel-1.3.0/sharedkernel/config.py +0 -12
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/setup.cfg +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/common.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/database/__init__.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/database/mongo_generic_repository.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/database/vector_database_repository/__init__.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/database/vector_database_repository/chroma_startegy.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/database/vector_database_repository/milvus_strategy.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/database/vector_database_repository/vector_database_repository.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/database/vector_database_repository/vector_database_strategy.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/enum/__init__.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/enum/vector_database_type.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/exception/__init__.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/exception/exception.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/exception/exception_handlers.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/jwt_service.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/objects/__init__.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/objects/base_document.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/objects/jwt_model.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/objects/result.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/regex_masking.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel/string_extentions.py +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/sharedkernel.egg-info/dependency_links.txt +0 -0
- {sharedkernel-1.3.0 → sharedkernel-1.4.0}/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.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: sharekernel is an shared package between all python projects
|
|
5
5
|
Author: Smilinno
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -13,11 +13,14 @@ Requires-Dist: pymilvus
|
|
|
13
13
|
Requires-Dist: chromadb
|
|
14
14
|
Requires-Dist: persian_tools
|
|
15
15
|
Requires-Dist: sentry-sdk
|
|
16
|
+
Requires-Dist: jdatetime
|
|
16
17
|
|
|
17
18
|
# SharedKernel
|
|
18
19
|
this a shared kernel package
|
|
19
20
|
|
|
20
21
|
# Change Log
|
|
22
|
+
### Version 1.4.0
|
|
23
|
+
- Implement date convertor for jalali and georgian
|
|
21
24
|
### Version 1.3.0
|
|
22
25
|
- Implement Sentry For Log Exceptions
|
|
23
26
|
### Version 1.2.0
|
|
@@ -25,7 +28,6 @@ this a shared kernel package
|
|
|
25
28
|
# Create Package
|
|
26
29
|
py -m pip install --upgrade build
|
|
27
30
|
py -m build
|
|
28
|
-
cd dist
|
|
29
31
|
py -m pip install --upgrade twine
|
|
30
32
|
py -m twine upload dist/*
|
|
31
33
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
this a shared kernel package
|
|
3
3
|
|
|
4
4
|
# Change Log
|
|
5
|
+
### Version 1.4.0
|
|
6
|
+
- Implement date convertor for jalali and georgian
|
|
5
7
|
### Version 1.3.0
|
|
6
8
|
- Implement Sentry For Log Exceptions
|
|
7
9
|
### Version 1.2.0
|
|
@@ -9,7 +11,6 @@ this a shared kernel package
|
|
|
9
11
|
# Create Package
|
|
10
12
|
py -m pip install --upgrade build
|
|
11
13
|
py -m build
|
|
12
|
-
cd dist
|
|
13
14
|
py -m pip install --upgrade twine
|
|
14
15
|
py -m twine upload dist/*
|
|
15
16
|
|
|
@@ -29,9 +29,10 @@ setup(
|
|
|
29
29
|
"chromadb",
|
|
30
30
|
"persian_tools",
|
|
31
31
|
"sentry-sdk",
|
|
32
|
+
"jdatetime"
|
|
32
33
|
],
|
|
33
34
|
# *strongly* suggested for sharing
|
|
34
|
-
version="1.
|
|
35
|
+
version="1.4.0",
|
|
35
36
|
description="sharekernel is an shared package between all python projects",
|
|
36
37
|
long_description=long_description,
|
|
37
38
|
long_description_content_type="text/markdown",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import jdatetime
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
|
|
4
|
+
from sharedkernel.enum import ErrorCode
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class DateConverter:
|
|
8
|
+
@staticmethod
|
|
9
|
+
def to_jalali(
|
|
10
|
+
input_datetime: datetime | jdatetime.datetime, format_string: str = "%Y/%m/%d"
|
|
11
|
+
):
|
|
12
|
+
if isinstance(input_datetime, jdatetime.datetime):
|
|
13
|
+
return input_datetime.strftime(format_string)
|
|
14
|
+
|
|
15
|
+
if isinstance(input_datetime, datetime):
|
|
16
|
+
jalali_date = jdatetime.datetime.fromgregorian(date=input_datetime)
|
|
17
|
+
return jalali_date.strftime(format_string)
|
|
18
|
+
|
|
19
|
+
raise ValueError(ErrorCode.Unsupported_Date_Type)
|
|
20
|
+
|
|
21
|
+
@staticmethod
|
|
22
|
+
def to_georgian(
|
|
23
|
+
input_datetime: datetime | jdatetime.datetime, format_string: str = "%Y/%m/%d"
|
|
24
|
+
):
|
|
25
|
+
if isinstance(input_datetime, jdatetime.datetime):
|
|
26
|
+
georgian_date = jdatetime.datetime.togregorian(input_datetime)
|
|
27
|
+
return georgian_date.strftime(format_string)
|
|
28
|
+
|
|
29
|
+
if isinstance(input_datetime, datetime):
|
|
30
|
+
return input_datetime.strftime(format_string)
|
|
31
|
+
|
|
32
|
+
raise ValueError(ErrorCode.Unsupported_Date_Type)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sharedkernel
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: sharekernel is an shared package between all python projects
|
|
5
5
|
Author: Smilinno
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -13,11 +13,14 @@ Requires-Dist: pymilvus
|
|
|
13
13
|
Requires-Dist: chromadb
|
|
14
14
|
Requires-Dist: persian_tools
|
|
15
15
|
Requires-Dist: sentry-sdk
|
|
16
|
+
Requires-Dist: jdatetime
|
|
16
17
|
|
|
17
18
|
# SharedKernel
|
|
18
19
|
this a shared kernel package
|
|
19
20
|
|
|
20
21
|
# Change Log
|
|
22
|
+
### Version 1.4.0
|
|
23
|
+
- Implement date convertor for jalali and georgian
|
|
21
24
|
### Version 1.3.0
|
|
22
25
|
- Implement Sentry For Log Exceptions
|
|
23
26
|
### Version 1.2.0
|
|
@@ -25,7 +28,6 @@ this a shared kernel package
|
|
|
25
28
|
# Create Package
|
|
26
29
|
py -m pip install --upgrade build
|
|
27
30
|
py -m build
|
|
28
|
-
cd dist
|
|
29
31
|
py -m pip install --upgrade twine
|
|
30
32
|
py -m twine upload dist/*
|
|
31
33
|
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# MONGO CONFIG
|
|
3
|
-
|
|
4
|
-
# MONGO_CONNECTION_STRING = "mongodb://localhost:27017"
|
|
5
|
-
MONGO_CONNECTION_STRING = "mongodb://admin:Xp!j1h73ALrD@188.121.112.202:27017"
|
|
6
|
-
|
|
7
|
-
# AUTHENTICATION
|
|
8
|
-
|
|
9
|
-
JWT_ISSURE = "enterprise-identity"
|
|
10
|
-
JWT_AUDIENCE = "AdminPortal"
|
|
11
|
-
JWT_SECRETKEY = "ThereR_10_Project$@$milinnoBut50%OfThemRPublished"
|
|
12
|
-
JWT_ALGORITHM= "HS256"
|
|
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
|