maleo-foundation 0.3.29__tar.gz → 0.3.32__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.
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/PKG-INFO +1 -1
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/service.py +22 -9
- maleo_foundation-0.3.32/maleo_foundation/models/transfers/general/__init__.py +5 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation.egg-info/PKG-INFO +1 -1
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/pyproject.toml +1 -1
- maleo_foundation-0.3.29/maleo_foundation/models/transfers/general/__init__.py +0 -80
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/README.md +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/authentication.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/authorization.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/manager.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/encryption/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/encryption/aes.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/encryption/rsa.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/hash/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/hash/bcrypt.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/hash/hmac.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/hash/sha256.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/key.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/signature.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/token.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/constants.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/enums.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/client.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/encryption/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/encryption/aes.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/encryption/rsa.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/general.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/hash.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/key.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/repository.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/service.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/signature.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/token.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/extended_types.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/cache.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/base.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/google/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/google/base.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/google/parameter.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/google/secret.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/google/storage.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/google/subscription.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/maleo.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/configuration.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/credential.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/db.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/middleware.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/middlewares/authentication.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/middlewares/base.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/middlewares/cors.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/responses.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/encryption.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/general.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/hash.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/key.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/parameter.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/result.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/signature.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/token.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/table.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/configurations/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/configurations/cache/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/configurations/cache/redis.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/configurations/client/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/configurations/client/maleo.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/configurations/database.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/configurations/middleware.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/configurations/service.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/credentials.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/database.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/key.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/request.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/settings.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/signature.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/token.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/client.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/encryption/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/encryption/aes.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/encryption/rsa.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/general.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/hash/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/hash/bcrypt.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/hash/hmac.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/hash/sha256.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/key.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/service.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/signature.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/parameters/token.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/client/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/client/controllers/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/client/controllers/http.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/client/service.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/encryption/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/encryption/aes.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/encryption/rsa.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/hash.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/key.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/service/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/service/controllers/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/service/controllers/rest.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/service/general.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/service/repository.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/signature.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/token.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/rest_controller_result.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/types.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/cache.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/client.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/controller.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/dependencies/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/dependencies/auth.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/dependencies/context.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/exceptions.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/extractor.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/formatter/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/formatter/case.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/credential/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/credential/google.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/json.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/key/__init__.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/key/rsa.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/yaml.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/logging.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/merger.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/query.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/repository.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/searcher.py +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation.egg-info/SOURCES.txt +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation.egg-info/dependency_links.txt +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation.egg-info/requires.txt +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation.egg-info/top_level.txt +0 -0
- {maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/setup.cfg +0 -0
@@ -1,3 +1,4 @@
|
|
1
|
+
import asyncio
|
1
2
|
from fastapi import FastAPI, APIRouter
|
2
3
|
from fastapi.exceptions import RequestValidationError
|
3
4
|
from google.oauth2.service_account import Credentials
|
@@ -152,6 +153,20 @@ class ServiceManager:
|
|
152
153
|
def loggers(self) -> Loggers:
|
153
154
|
return self._loggers
|
154
155
|
|
156
|
+
async def _clear_cache(self) -> None:
|
157
|
+
prefix = self.configurations.service.key
|
158
|
+
async for key in self._redis.scan_iter(f"{prefix}*"):
|
159
|
+
await self._redis.delete(key)
|
160
|
+
|
161
|
+
def check_redis_connection(self) -> bool:
|
162
|
+
try:
|
163
|
+
self._redis.ping()
|
164
|
+
self._loggers.application.info("Redis connection check successful.")
|
165
|
+
return True
|
166
|
+
except RedisError as e:
|
167
|
+
self._loggers.application.error(f"Redis connection check failed: {e}", exc_info=True)
|
168
|
+
return False
|
169
|
+
|
155
170
|
def _initialize_cache(self) -> None:
|
156
171
|
self._redis = Redis(
|
157
172
|
host=self.configurations.cache.redis.host,
|
@@ -161,7 +176,14 @@ class ServiceManager:
|
|
161
176
|
decode_responses=self.configurations.cache.redis.decode_responses,
|
162
177
|
health_check_interval=self.configurations.cache.redis.health_check_interval
|
163
178
|
)
|
179
|
+
self.check_redis_connection()
|
164
180
|
self._cache = CacheManagers(redis=self._redis)
|
181
|
+
try:
|
182
|
+
asyncio.run(self._clear_cache())
|
183
|
+
except RuntimeError:
|
184
|
+
loop = asyncio.new_event_loop()
|
185
|
+
asyncio.set_event_loop(loop)
|
186
|
+
loop.run_until_complete(self._clear_cache())
|
165
187
|
|
166
188
|
@property
|
167
189
|
def redis(self) -> Redis:
|
@@ -171,15 +193,6 @@ class ServiceManager:
|
|
171
193
|
def cache(self) -> CacheManagers:
|
172
194
|
return self._cache
|
173
195
|
|
174
|
-
def check_redis_connection(self) -> bool:
|
175
|
-
try:
|
176
|
-
self._redis.ping()
|
177
|
-
self._loggers.application.info("Redis connection check successful.")
|
178
|
-
return True
|
179
|
-
except RedisError as e:
|
180
|
-
self._loggers.application.error(f"Redis connection check failed: {e}", exc_info=True)
|
181
|
-
return False
|
182
|
-
|
183
196
|
def _initialize_cloud_storage(self) -> None:
|
184
197
|
environment = (
|
185
198
|
BaseEnums.EnvironmentType.STAGING
|
@@ -1,80 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
from datetime import datetime, timezone
|
3
|
-
from pydantic import BaseModel, Field
|
4
|
-
from typing import Dict, Any
|
5
|
-
from uuid import UUID
|
6
|
-
from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
7
|
-
from maleo_foundation.types import BaseTypes
|
8
|
-
from .token import MaleoFoundationTokenGeneralTransfers
|
9
|
-
|
10
|
-
class BaseGeneralTransfers:
|
11
|
-
Token = MaleoFoundationTokenGeneralTransfers
|
12
|
-
|
13
|
-
class AccessTransfers(
|
14
|
-
BaseGeneralSchemas.AccessedBy,
|
15
|
-
BaseGeneralSchemas.AccessedAt
|
16
|
-
): pass
|
17
|
-
|
18
|
-
class RequestContextTransfers(BaseModel):
|
19
|
-
request_id: UUID = Field(..., description="Unique identifier for tracing the request")
|
20
|
-
requested_at: datetime = Field(datetime.now(tz=timezone.utc), description="Request timestamp")
|
21
|
-
method: str = Field(..., description="Request's method")
|
22
|
-
url: str = Field(..., description="Request's URL")
|
23
|
-
path_params: Dict = Field(..., description="Request's path parameters")
|
24
|
-
query_params: Dict = Field(..., description="Request's query parameters")
|
25
|
-
ip_address: str = Field("unknown", description="Client's IP address")
|
26
|
-
is_internal: BaseTypes.OptionalBoolean = Field(None, description="True if IP is internal")
|
27
|
-
user_agent: BaseTypes.OptionalString = Field(None, description="User-Agent string")
|
28
|
-
ua_browser: BaseTypes.OptionalString = Field(None, description="Browser info from sec-ch-ua")
|
29
|
-
ua_mobile: BaseTypes.OptionalString = Field(None, description="Is mobile device?")
|
30
|
-
platform: BaseTypes.OptionalString = Field(None, description="Client platform or OS")
|
31
|
-
referer: BaseTypes.OptionalString = Field(None, description="Referrer URL")
|
32
|
-
origin: BaseTypes.OptionalString = Field(None, description="Origin of the request")
|
33
|
-
host: BaseTypes.OptionalString = Field(None, description="Host header from request")
|
34
|
-
forwarded_proto: BaseTypes.OptionalString = Field(None, description="Forwarded protocol (http/https)")
|
35
|
-
language: BaseTypes.OptionalString = Field(None, description="Accepted languages from client")
|
36
|
-
|
37
|
-
def to_google_pubsub_object(self) -> Dict[str, Any]:
|
38
|
-
result = {
|
39
|
-
"request_id": str(self.request_id),
|
40
|
-
"requested_at": self.requested_at.isoformat(),
|
41
|
-
"method": self.method,
|
42
|
-
"url": self.url,
|
43
|
-
"path_params": {"map": self.path_params},
|
44
|
-
"query_params": {"map": self.query_params},
|
45
|
-
"ip_address": self.ip_address,
|
46
|
-
"is_internal": None if self.is_internal is None else {"boolean": self.is_internal},
|
47
|
-
"user_agent": None if self.user_agent is None else {"string": self.user_agent},
|
48
|
-
"ua_browser": None if self.ua_browser is None else {"string": self.ua_browser},
|
49
|
-
"ua_mobile": None if self.ua_mobile is None else {"string": self.ua_mobile},
|
50
|
-
"platform": None if self.platform is None else {"string": self.platform},
|
51
|
-
"referer": None if self.referer is None else {"array": self.referer},
|
52
|
-
"origin": None if self.origin is None else {"array": self.origin},
|
53
|
-
"host": None if self.host is None else {"array": self.host},
|
54
|
-
"forwarded_proto": None if self.forwarded_proto is None else {"array": self.forwarded_proto},
|
55
|
-
"language": None if self.language is None else {"array": self.language}
|
56
|
-
}
|
57
|
-
|
58
|
-
return result
|
59
|
-
|
60
|
-
@classmethod
|
61
|
-
def from_google_pubsub_object(cls, obj:Dict[str, Any]):
|
62
|
-
return cls(
|
63
|
-
request_id = UUID(obj["request_id"]),
|
64
|
-
requested_at = datetime.fromisoformat(obj["requested_at"]),
|
65
|
-
method = obj["method"],
|
66
|
-
url = obj["url"],
|
67
|
-
path_params = obj["path_params"]["map"] or {},
|
68
|
-
query_params = obj["query_params"]["map"] or {},
|
69
|
-
ip_address = obj["ip_address"],
|
70
|
-
is_internal = None if obj["is_internal"] is None else bool(obj["is_internal"]["boolean"]),
|
71
|
-
user_agent = None if obj["user_agent"] is None else obj["user_agent"]["string"],
|
72
|
-
ua_browser = None if obj["ua_browser"] is None else obj["ua_browser"]["string"],
|
73
|
-
ua_mobile = None if obj["ua_mobile"] is None else obj["ua_mobile"]["string"],
|
74
|
-
platform = None if obj["platform"] is None else obj["platform"]["string"],
|
75
|
-
referer = None if obj["referer"] is None else obj["referer"]["string"],
|
76
|
-
origin = None if obj["origin"] is None else obj["origin"]["string"],
|
77
|
-
host = None if obj["host"] is None else obj["host"]["string"],
|
78
|
-
forwarded_proto = None if obj["forwarded_proto"] is None else obj["forwarded_proto"]["string"],
|
79
|
-
language = None if obj["language"] is None else obj["language"]["string"],
|
80
|
-
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/hash/bcrypt.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/hash/hmac.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/hash/sha256.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/signature.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/client/services/token.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/general.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/repository.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/service.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/signature.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/expanded_types/token.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/base.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/google/base.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/client/maleo.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/managers/configuration.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/middlewares/authentication.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/encryption.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/general.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/parameter.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/result.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/signature.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/schemas/token.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/__init__.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
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/general/key.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
|
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
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/models/transfers/results/key.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
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/rest_controller_result.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/dependencies/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/dependencies/auth.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/dependencies/context.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/formatter/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/formatter/case.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/key/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation/utils/loaders/key/rsa.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
|
{maleo_foundation-0.3.29 → maleo_foundation-0.3.32}/maleo_foundation.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|