fastapi-mongo-base 1.4.2__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.
- {fastapi_mongo_base-1.4.2/src/fastapi_mongo_base.egg-info → fastapi_mongo_base-1.4.3}/PKG-INFO +1 -1
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/pyproject.toml +1 -1
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/prometheus/mongo.py +12 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3/src/fastapi_mongo_base.egg-info}/PKG-INFO +1 -1
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/LICENSE.txt +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/MANIFEST.in +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/README.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/boilerplate.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/changelog.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/contributing.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/endpoints.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/extra.css +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/index.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/installation.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/license.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/quickstart.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/settings.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/tutorial.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/docs/usage.md +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/mkdocs.yml +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/pytest.ini +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/setup.cfg +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/__init__.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/__init__.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/app_factory.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/config.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/db.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/enums.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/error_responses.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/errors/mongodb_errors.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/errors/resource_errors.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/exceptions.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/middlewares/prometheus.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/sentry.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/models.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/py.typed +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/routes.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/schemas.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/sql.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/tasks.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/utils/__init__.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/utils/basic.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/utils/bsontools.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/utils/timezone.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/utils/usso_routes.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base.egg-info/SOURCES.txt +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base.egg-info/dependency_links.txt +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base.egg-info/requires.txt +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base.egg-info/top_level.txt +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/__init__.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/app/__init__.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/app/logs/app.log +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/app/main.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/app/server.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/conftest.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/test_apis.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/test_app.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/test_db.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/test_mongodb_errors.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/test_openapi_errors.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/test_resource_errors.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/test_sentry.py +0 -0
- {fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/tests/test_usso_routes_workspace.py +0 -0
{fastapi_mongo_base-1.4.2/src/fastapi_mongo_base.egg-info → fastapi_mongo_base-1.4.3}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-mongo-base
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.3
|
|
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 = "1.4.
|
|
7
|
+
version = "1.4.3"
|
|
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.10"
|
|
@@ -65,6 +65,8 @@ class DatabasePoolMonitor(monitoring.ConnectionPoolListener):
|
|
|
65
65
|
self.in_use_connections = 0
|
|
66
66
|
|
|
67
67
|
def _update_metrics(self) -> None:
|
|
68
|
+
if pool_connections is None:
|
|
69
|
+
return
|
|
68
70
|
pool_connections.labels(
|
|
69
71
|
database=self.database_name,
|
|
70
72
|
state="available",
|
|
@@ -109,6 +111,8 @@ class DatabasePoolMonitor(monitoring.ConnectionPoolListener):
|
|
|
109
111
|
"""Record a MongoDB connection creation event."""
|
|
110
112
|
del event
|
|
111
113
|
|
|
114
|
+
if connections_created_total is None:
|
|
115
|
+
return
|
|
112
116
|
with self._lock:
|
|
113
117
|
connections_created_total.labels(
|
|
114
118
|
database=self.database_name,
|
|
@@ -121,6 +125,8 @@ class DatabasePoolMonitor(monitoring.ConnectionPoolListener):
|
|
|
121
125
|
"""Record a MongoDB connection readiness event."""
|
|
122
126
|
del event
|
|
123
127
|
|
|
128
|
+
if connections_ready_total is None:
|
|
129
|
+
return
|
|
124
130
|
with self._lock:
|
|
125
131
|
self.available_connections += 1
|
|
126
132
|
|
|
@@ -137,6 +143,8 @@ class DatabasePoolMonitor(monitoring.ConnectionPoolListener):
|
|
|
137
143
|
"""Record a MongoDB connection closure event."""
|
|
138
144
|
del event
|
|
139
145
|
|
|
146
|
+
if connections_closed_total is None:
|
|
147
|
+
return
|
|
140
148
|
with self._lock:
|
|
141
149
|
if self.in_use_connections > 0:
|
|
142
150
|
self.in_use_connections -= 1
|
|
@@ -159,6 +167,8 @@ class DatabasePoolMonitor(monitoring.ConnectionPoolListener):
|
|
|
159
167
|
"""Record the start of a MongoDB connection checkout attempt."""
|
|
160
168
|
del event
|
|
161
169
|
|
|
170
|
+
if checkouts_started_total is None:
|
|
171
|
+
return
|
|
162
172
|
with self._lock:
|
|
163
173
|
checkouts_started_total.labels(
|
|
164
174
|
database=self.database_name,
|
|
@@ -169,6 +179,8 @@ class DatabasePoolMonitor(monitoring.ConnectionPoolListener):
|
|
|
169
179
|
event: monitoring.ConnectionCheckOutFailedEvent,
|
|
170
180
|
) -> None:
|
|
171
181
|
"""Record a failed MongoDB connection checkout attempt."""
|
|
182
|
+
if checkouts_failed_total is None:
|
|
183
|
+
return
|
|
172
184
|
with self._lock:
|
|
173
185
|
checkouts_failed_total.labels(
|
|
174
186
|
database=self.database_name,
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3/src/fastapi_mongo_base.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-mongo-base
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.3
|
|
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
|
|
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
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/__init__.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/app_factory.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/error_responses.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/core/exceptions.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
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/utils/bsontools.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/utils/timezone.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base/utils/usso_routes.py
RENAMED
|
File without changes
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base.egg-info/requires.txt
RENAMED
|
File without changes
|
{fastapi_mongo_base-1.4.2 → fastapi_mongo_base-1.4.3}/src/fastapi_mongo_base.egg-info/top_level.txt
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|