sharedkernel 1.7.0__tar.gz → 1.7.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.7.0 → sharedkernel-1.7.2}/PKG-INFO +5 -1
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/README.md +4 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/setup.py +1 -1
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/date_converter.py +5 -5
- sharedkernel-1.7.2/sharedkernel/objects/base_document.py +10 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel.egg-info/PKG-INFO +5 -1
- sharedkernel-1.7.0/sharedkernel/objects/base_document.py +0 -10
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/setup.cfg +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/common.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/database/__init__.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/database/mongo_generic_repository.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/database/vector_database_repository/__init__.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/database/vector_database_repository/chroma_startegy.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/database/vector_database_repository/vector_database_repository.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/database/vector_database_repository/vector_database_strategy.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/enum/__init__.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/enum/error_code.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/enum/vector_database_type.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/exception/__init__.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/exception/exception.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/exception/exception_handlers.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/jwt_service.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/normalizer/__init__.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/normalizer/phone_number_normalizer.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/objects/__init__.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/objects/jwt_model.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/objects/result.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/regex_masking.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/s3_uploader.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/string_extentions.py +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel.egg-info/SOURCES.txt +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel.egg-info/dependency_links.txt +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel.egg-info/requires.txt +0 -0
- {sharedkernel-1.7.0 → sharedkernel-1.7.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.7.
|
|
3
|
+
Version: 1.7.2
|
|
4
4
|
Summary: sharekernel is a shared package between all python projects
|
|
5
5
|
Author: Smilinno
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -20,6 +20,10 @@ Requires-Dist: boto3
|
|
|
20
20
|
this a shared kernel package
|
|
21
21
|
|
|
22
22
|
# Change Log
|
|
23
|
+
### Version 1.7.2
|
|
24
|
+
- Fix bug of to_diff_persian_date_time_string
|
|
25
|
+
### Version 1.7.1
|
|
26
|
+
- Update BaseDocument initial values
|
|
23
27
|
### Version 1.7.0
|
|
24
28
|
- Implement S3 Uploader
|
|
25
29
|
### Version 1.6.10
|
|
@@ -35,7 +35,7 @@ setup(
|
|
|
35
35
|
"boto3"
|
|
36
36
|
],
|
|
37
37
|
# *strongly* suggested for sharing
|
|
38
|
-
version="1.7.
|
|
38
|
+
version="1.7.2",
|
|
39
39
|
description="sharekernel is a shared package between all python projects",
|
|
40
40
|
long_description=long_description,
|
|
41
41
|
long_description_content_type="text/markdown",
|
|
@@ -76,7 +76,7 @@ class DateConverter:
|
|
|
76
76
|
total_days = abs(total_days)
|
|
77
77
|
total_months = abs(total_months)
|
|
78
78
|
|
|
79
|
-
date_time_today =
|
|
79
|
+
date_time_today = JalaliDateTime.to_jalali(comparison_base)
|
|
80
80
|
yesterday = date_time_today - timedelta(days=1)
|
|
81
81
|
tomorrow = date_time_today + timedelta(days=1)
|
|
82
82
|
|
|
@@ -95,10 +95,10 @@ class DateConverter:
|
|
|
95
95
|
if total_seconds < 86400:
|
|
96
96
|
return f"{floor(total_seconds / 3600)} ساعت{suffix}{hh_mm}"
|
|
97
97
|
|
|
98
|
-
if yesterday == date.date():
|
|
99
|
-
return f"دیروز {get_persian_day_name(JalaliDate(yesterday.year, yesterday.month, yesterday.day
|
|
98
|
+
if yesterday.date() == date.date():
|
|
99
|
+
return f"دیروز {get_persian_day_name(JalaliDate(yesterday.year, yesterday.month, yesterday.day))}"
|
|
100
100
|
if tomorrow == date.date():
|
|
101
|
-
return f"فردا {get_persian_day_name(JalaliDate(tomorrow.year, tomorrow.month, tomorrow.day
|
|
101
|
+
return f"فردا {get_persian_day_name(JalaliDate(tomorrow.year, tomorrow.month, tomorrow.day))}"
|
|
102
102
|
|
|
103
103
|
if total_days < MONTH: # 30 days
|
|
104
104
|
return f"{int(total_days)} روز{suffix}"
|
|
@@ -106,7 +106,7 @@ class DateConverter:
|
|
|
106
106
|
total_months = int(total_days / MONTH)
|
|
107
107
|
total_days = total_days - total_months * MONTH
|
|
108
108
|
|
|
109
|
-
if total_months < 12
|
|
109
|
+
if total_months < 12:
|
|
110
110
|
if total_days == 0:
|
|
111
111
|
return f"{total_months} ماه {suffix}"
|
|
112
112
|
else:
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from pydantic import BaseModel, Field
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class BaseDocument(BaseModel):
|
|
7
|
+
id: Optional[str]
|
|
8
|
+
is_deleted: bool = False
|
|
9
|
+
created_on: datetime = Field(default_factory=datetime.now)
|
|
10
|
+
updated_on: datetime = Field(default_factory=datetime.now)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sharedkernel
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.2
|
|
4
4
|
Summary: sharekernel is a shared package between all python projects
|
|
5
5
|
Author: Smilinno
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -20,6 +20,10 @@ Requires-Dist: boto3
|
|
|
20
20
|
this a shared kernel package
|
|
21
21
|
|
|
22
22
|
# Change Log
|
|
23
|
+
### Version 1.7.2
|
|
24
|
+
- Fix bug of to_diff_persian_date_time_string
|
|
25
|
+
### Version 1.7.1
|
|
26
|
+
- Update BaseDocument initial values
|
|
23
27
|
### Version 1.7.0
|
|
24
28
|
- Implement S3 Uploader
|
|
25
29
|
### Version 1.6.10
|
|
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
|
{sharedkernel-1.7.0 → sharedkernel-1.7.2}/sharedkernel/normalizer/phone_number_normalizer.py
RENAMED
|
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
|