fastapi-mongo-base 0.9.26__tar.gz → 0.9.28__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.
- {fastapi_mongo_base-0.9.26/src/fastapi_mongo_base.egg-info → fastapi_mongo_base-0.9.28}/PKG-INFO +1 -1
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/pyproject.toml +1 -1
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/tasks.py +6 -6
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/imagetools.py +0 -3
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28/src/fastapi_mongo_base.egg-info}/PKG-INFO +1 -1
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/LICENSE.txt +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/README.md +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/setup.cfg +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/__init__.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/cached.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/__init__.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/app_factory.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/config.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/db.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/enums.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/exceptions.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/middlewares.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/handlers.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/models.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/routes.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/schemas.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/__init__.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/aionetwork.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/basic.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/bsontools.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/conditions.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/texttools.py +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base.egg-info/SOURCES.txt +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base.egg-info/dependency_links.txt +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base.egg-info/requires.txt +0 -0
- {fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base.egg-info/top_level.txt +0 -0
{fastapi_mongo_base-0.9.26/src/fastapi_mongo_base.egg-info → fastapi_mongo_base-0.9.28}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: fastapi-mongo-base
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.28
|
|
4
4
|
Summary: A simple boilerplate application, including models and schemas and abstract router, for FastAPI with MongoDB
|
|
5
5
|
Author-email: Mahdi Kiani <mahdikiany@gmail.com>
|
|
6
6
|
Maintainer-email: Mahdi Kiani <mahdikiany@gmail.com>
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "fastapi-mongo-base"
|
|
7
|
-
version = "0.9.
|
|
7
|
+
version = "0.9.28"
|
|
8
8
|
description = "A simple boilerplate application, including models and schemas and abstract router, for FastAPI with MongoDB"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -116,8 +116,8 @@ class TaskMixin(BaseModel):
|
|
|
116
116
|
task_progress: int = -1
|
|
117
117
|
task_logs: list[TaskLogRecord] = []
|
|
118
118
|
task_references: TaskReferenceList | None = None
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
task_start_at: datetime | None = None
|
|
120
|
+
task_end_at: datetime | None = None
|
|
121
121
|
webhook_url: str | None = None
|
|
122
122
|
|
|
123
123
|
@property
|
|
@@ -126,10 +126,10 @@ class TaskMixin(BaseModel):
|
|
|
126
126
|
|
|
127
127
|
@property
|
|
128
128
|
def task_duration(self):
|
|
129
|
-
if self.
|
|
130
|
-
if self.
|
|
131
|
-
return self.
|
|
132
|
-
return datetime.now() - self.
|
|
129
|
+
if self.task_start_at:
|
|
130
|
+
if self.task_end_at:
|
|
131
|
+
return self.task_end_at - self.task_start_at
|
|
132
|
+
return datetime.now() - self.task_start_at
|
|
133
133
|
return 0
|
|
134
134
|
|
|
135
135
|
@field_validator("task_status", mode="before")
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/imagetools.py
RENAMED
|
@@ -5,7 +5,6 @@ from io import BytesIO
|
|
|
5
5
|
from typing import Literal
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
|
-
from aiocache import cached
|
|
9
8
|
from PIL import ExifTags, Image, ImageFile
|
|
10
9
|
|
|
11
10
|
|
|
@@ -362,7 +361,6 @@ def compress_image(image: Image.Image, max_size_kb: int) -> Image.Image:
|
|
|
362
361
|
return image
|
|
363
362
|
|
|
364
363
|
|
|
365
|
-
@cached(ttl=60 * 60 * 24)
|
|
366
364
|
async def download_image(
|
|
367
365
|
url: str, max_width: int | None = None, max_size_kb: int | None = None, **kwargs
|
|
368
366
|
) -> Image.Image:
|
|
@@ -391,7 +389,6 @@ async def download_image(
|
|
|
391
389
|
return image
|
|
392
390
|
|
|
393
391
|
|
|
394
|
-
@cached(ttl=60 * 60 * 24)
|
|
395
392
|
async def download_image_base64(
|
|
396
393
|
url: str,
|
|
397
394
|
max_width: int | None = None,
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28/src/fastapi_mongo_base.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: fastapi-mongo-base
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.28
|
|
4
4
|
Summary: A simple boilerplate application, including models and schemas and abstract router, for FastAPI with MongoDB
|
|
5
5
|
Author-email: Mahdi Kiani <mahdikiany@gmail.com>
|
|
6
6
|
Maintainer-email: Mahdi Kiani <mahdikiany@gmail.com>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/__init__.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/app_factory.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/config.py
RENAMED
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/enums.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/exceptions.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/core/middlewares.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/__init__.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/aionetwork.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/basic.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/bsontools.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/conditions.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base/utils/texttools.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-0.9.26 → fastapi_mongo_base-0.9.28}/src/fastapi_mongo_base.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|