fastapi-mongo-base 0.8.7__tar.gz → 0.8.9__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.8.7/src/fastapi_mongo_base.egg-info → fastapi_mongo_base-0.8.9}/PKG-INFO +1 -1
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/pyproject.toml +1 -1
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/app_factory.py +3 -1
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/routes.py +5 -5
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9/src/fastapi_mongo_base.egg-info}/PKG-INFO +1 -1
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/LICENSE.txt +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/README.md +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/setup.cfg +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/__init__.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/cached.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/__init__.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/config.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/db.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/enums.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/exceptions.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/middlewares.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/handlers.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/models.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/schemas.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/tasks.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/utils/__init__.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/utils/aionetwork.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/utils/basic.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/utils/bsontools.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/utils/texttools.py +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base.egg-info/SOURCES.txt +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base.egg-info/dependency_links.txt +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base.egg-info/requires.txt +0 -0
- {fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base.egg-info/top_level.txt +0 -0
{fastapi_mongo_base-0.8.7/src/fastapi_mongo_base.egg-info → fastapi_mongo_base-0.8.9}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fastapi-mongo-base
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.9
|
|
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.8.
|
|
7
|
+
version = "0.8.9"
|
|
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"
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/app_factory.py
RENAMED
|
@@ -38,7 +38,9 @@ async def lifespan(app: fastapi.FastAPI, worker=None, init_functions=[]): # typ
|
|
|
38
38
|
"""Initialize application services."""
|
|
39
39
|
Settings().config_logger()
|
|
40
40
|
await db.init_mongo_db()
|
|
41
|
-
|
|
41
|
+
|
|
42
|
+
if worker:
|
|
43
|
+
app.state.worker = asyncio.create_task(worker())
|
|
42
44
|
|
|
43
45
|
for function in init_functions:
|
|
44
46
|
if asyncio.iscoroutine(function):
|
|
@@ -65,7 +65,7 @@ class AbstractBaseRouter(Generic[T, TS], metaclass=singleton.Singleton):
|
|
|
65
65
|
self.update_request_schema = schema
|
|
66
66
|
|
|
67
67
|
def config_routes(self, **kwargs):
|
|
68
|
-
if kwargs.get("
|
|
68
|
+
if kwargs.get("list_route", True):
|
|
69
69
|
self.router.add_api_route(
|
|
70
70
|
"/",
|
|
71
71
|
self.list_items,
|
|
@@ -74,7 +74,7 @@ class AbstractBaseRouter(Generic[T, TS], metaclass=singleton.Singleton):
|
|
|
74
74
|
status_code=200,
|
|
75
75
|
)
|
|
76
76
|
|
|
77
|
-
if kwargs.get("
|
|
77
|
+
if kwargs.get("retrieve_route", True):
|
|
78
78
|
self.router.add_api_route(
|
|
79
79
|
"/{uid:uuid}",
|
|
80
80
|
self.retrieve_item,
|
|
@@ -83,7 +83,7 @@ class AbstractBaseRouter(Generic[T, TS], metaclass=singleton.Singleton):
|
|
|
83
83
|
status_code=200,
|
|
84
84
|
)
|
|
85
85
|
|
|
86
|
-
if kwargs.get("
|
|
86
|
+
if kwargs.get("create_route", True):
|
|
87
87
|
self.router.add_api_route(
|
|
88
88
|
"/",
|
|
89
89
|
self.create_item,
|
|
@@ -92,7 +92,7 @@ class AbstractBaseRouter(Generic[T, TS], metaclass=singleton.Singleton):
|
|
|
92
92
|
status_code=201,
|
|
93
93
|
)
|
|
94
94
|
|
|
95
|
-
if kwargs.get("
|
|
95
|
+
if kwargs.get("update_route", True):
|
|
96
96
|
self.router.add_api_route(
|
|
97
97
|
"/{uid:uuid}",
|
|
98
98
|
self.update_item,
|
|
@@ -101,7 +101,7 @@ class AbstractBaseRouter(Generic[T, TS], metaclass=singleton.Singleton):
|
|
|
101
101
|
status_code=200,
|
|
102
102
|
)
|
|
103
103
|
|
|
104
|
-
if kwargs.get("
|
|
104
|
+
if kwargs.get("delete_route", True):
|
|
105
105
|
self.router.add_api_route(
|
|
106
106
|
"/{uid:uuid}",
|
|
107
107
|
self.delete_item,
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9/src/fastapi_mongo_base.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fastapi-mongo-base
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.9
|
|
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.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/core/exceptions.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/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.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/utils/__init__.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/utils/aionetwork.py
RENAMED
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/utils/bsontools.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base/utils/texttools.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base.egg-info/requires.txt
RENAMED
|
File without changes
|
{fastapi_mongo_base-0.8.7 → fastapi_mongo_base-0.8.9}/src/fastapi_mongo_base.egg-info/top_level.txt
RENAMED
|
File without changes
|