maleo-foundation 0.3.14__py3-none-any.whl → 0.3.17__py3-none-any.whl
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/authentication.py +4 -6
- maleo_foundation/managers/cache.py +3 -4
- maleo_foundation/managers/client/base.py +7 -11
- maleo_foundation/managers/client/maleo.py +3 -4
- maleo_foundation/models/transfers/general/configurations/__init__.py +10 -14
- maleo_foundation/models/transfers/general/configurations/client/__init__.py +3 -4
- maleo_foundation/models/transfers/general/configurations/client/maleo.py +4 -5
- maleo_foundation/models/transfers/general/configurations/middleware.py +5 -8
- maleo_foundation/models/transfers/general/request.py +4 -5
- maleo_foundation/models/transfers/results/client/controllers/http.py +3 -4
- maleo_foundation/models/transfers/results/service/controllers/rest.py +3 -4
- maleo_foundation/utils/logging.py +3 -4
- {maleo_foundation-0.3.14.dist-info → maleo_foundation-0.3.17.dist-info}/METADATA +1 -1
- {maleo_foundation-0.3.14.dist-info → maleo_foundation-0.3.17.dist-info}/RECORD +16 -17
- maleo_foundation/utils/cleaner.py +0 -22
- {maleo_foundation-0.3.14.dist-info → maleo_foundation-0.3.17.dist-info}/WHEEL +0 -0
- {maleo_foundation-0.3.14.dist-info → maleo_foundation-0.3.17.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,8 @@
|
|
1
|
-
from pydantic import BaseModel, Field
|
1
|
+
from pydantic import BaseModel, ConfigDict, Field
|
2
2
|
from starlette.authentication import AuthCredentials, BaseUser
|
3
3
|
from typing import Optional, Sequence
|
4
4
|
from maleo_foundation.enums import BaseEnums
|
5
5
|
from maleo_foundation.models.transfers.general.token import MaleoFoundationTokenGeneralTransfers
|
6
|
-
from maleo_foundation.types import BaseTypes
|
7
6
|
|
8
7
|
class Token(BaseModel):
|
9
8
|
type: BaseEnums.TokenType = Field(..., description="Token's type")
|
@@ -46,8 +45,7 @@ class User(BaseUser):
|
|
46
45
|
return self._email
|
47
46
|
|
48
47
|
class Authentication(BaseModel):
|
49
|
-
|
50
|
-
user: User = Field(..., description="User's information")
|
48
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
51
49
|
|
52
|
-
|
53
|
-
|
50
|
+
credentials: Credentials = Field(..., description="Credentials's information")
|
51
|
+
user: User = Field(..., description="User's information")
|
@@ -1,9 +1,8 @@
|
|
1
1
|
from __future__ import annotations
|
2
|
-
from pydantic import BaseModel, Field
|
2
|
+
from pydantic import BaseModel, ConfigDict, Field
|
3
3
|
from redis.asyncio.client import Redis
|
4
4
|
|
5
5
|
class CacheManagers(BaseModel):
|
6
|
-
|
6
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
7
7
|
|
8
|
-
|
9
|
-
arbitrary_types_allowed=True
|
8
|
+
redis:Redis = Field(..., description="Redis client")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import httpx
|
2
2
|
from contextlib import asynccontextmanager
|
3
|
-
from pydantic import BaseModel, Field
|
3
|
+
from pydantic import BaseModel, ConfigDict, Field
|
4
4
|
from typing import AsyncGenerator, Generator
|
5
5
|
from maleo_foundation.types import BaseTypes
|
6
6
|
from maleo_foundation.utils.logging import ClientLogger, SimpleConfig
|
@@ -51,10 +51,9 @@ class ClientHTTPControllerManager:
|
|
51
51
|
await self._client.aclose()
|
52
52
|
|
53
53
|
class ClientControllerManagers(BaseModel):
|
54
|
-
|
54
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
55
55
|
|
56
|
-
|
57
|
-
arbitrary_types_allowed=True
|
56
|
+
http:ClientHTTPControllerManager = Field(..., description="HTTP Client Controller")
|
58
57
|
|
59
58
|
class ClientHTTPController:
|
60
59
|
def __init__(self, manager:ClientHTTPControllerManager):
|
@@ -65,15 +64,13 @@ class ClientHTTPController:
|
|
65
64
|
return self._manager
|
66
65
|
|
67
66
|
class ClientServiceControllers(BaseModel):
|
68
|
-
|
67
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
69
68
|
|
70
|
-
|
71
|
-
arbitrary_types_allowed=True
|
69
|
+
http:ClientHTTPController = Field(..., description="HTTP Client Controller")
|
72
70
|
|
73
71
|
class ClientControllers(BaseModel):
|
72
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
74
73
|
#* Reuse this class while also adding all controllers of the client
|
75
|
-
class Config:
|
76
|
-
arbitrary_types_allowed=True
|
77
74
|
|
78
75
|
class ClientService:
|
79
76
|
def __init__(self, logger:ClientLogger):
|
@@ -88,9 +85,8 @@ class ClientService:
|
|
88
85
|
return self._logger
|
89
86
|
|
90
87
|
class ClientServices(BaseModel):
|
88
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
91
89
|
#* Reuse this class while also adding all the services of the client
|
92
|
-
class Config:
|
93
|
-
arbitrary_types_allowed=True
|
94
90
|
|
95
91
|
class ClientManager:
|
96
92
|
def __init__(
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from pydantic import Field
|
1
|
+
from pydantic import ConfigDict, Field
|
2
2
|
from maleo_foundation.managers.client.base import (
|
3
3
|
ClientManager,
|
4
4
|
ClientHTTPControllerManager,
|
@@ -25,10 +25,9 @@ class MaleoClientHTTPController(ClientHTTPController):
|
|
25
25
|
return self._service_manager
|
26
26
|
|
27
27
|
class MaleoClientServiceControllers(ClientServiceControllers):
|
28
|
-
|
28
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
29
29
|
|
30
|
-
|
31
|
-
arbitrary_types_allowed=True
|
30
|
+
http:MaleoClientHTTPController = Field(..., description="Maleo's HTTP Client Controller")
|
32
31
|
|
33
32
|
class MaleoClientService(ClientService):
|
34
33
|
def __init__(
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from pydantic import BaseModel, Field
|
1
|
+
from pydantic import BaseModel, ConfigDict, Field
|
2
2
|
from maleo_foundation.utils.logging import MiddlewareLogger, ServiceLogger
|
3
3
|
from .cache import CacheConfigurations
|
4
4
|
from .client import ClientConfigurations
|
@@ -11,35 +11,31 @@ from .middleware import (
|
|
11
11
|
from .service import ServiceConfigurations
|
12
12
|
|
13
13
|
class RuntimeConfigurations(BaseModel):
|
14
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
15
|
+
|
14
16
|
service: ServiceConfigurations = Field(..., description="Service's configurations")
|
15
17
|
middleware: MiddlewareRuntimeConfigurations = Field(..., description="Middleware's runtime configurations")
|
16
18
|
database: DatabaseConfigurations = Field(..., description="Database's configurations")
|
17
19
|
|
18
|
-
class Config:
|
19
|
-
arbitrary_types_allowed=True
|
20
|
-
|
21
20
|
class StaticConfigurations(BaseModel):
|
21
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
22
|
+
|
22
23
|
middleware: MiddlewareStaticConfigurations = Field(..., description="Middleware's static configurations")
|
23
24
|
client: ClientConfigurations = Field(..., description="Client's configurations")
|
24
25
|
|
25
|
-
class Config:
|
26
|
-
arbitrary_types_allowed=True
|
27
|
-
|
28
26
|
class Configurations(BaseModel):
|
27
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
28
|
+
|
29
29
|
service: ServiceConfigurations = Field(..., description="Service's configurations")
|
30
30
|
middleware: MiddlewareConfigurations = Field(..., description="Middleware's configurations")
|
31
31
|
cache: CacheConfigurations = Field(..., description="Cache's configurations")
|
32
32
|
database: DatabaseConfigurations = Field(..., description="Database's configurations")
|
33
33
|
client: ClientConfigurations = Field(..., description="Client's configurations")
|
34
34
|
|
35
|
-
class Config:
|
36
|
-
arbitrary_types_allowed=True
|
37
|
-
|
38
35
|
class Loggers(BaseModel):
|
36
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
37
|
+
|
39
38
|
application: ServiceLogger = Field(..., description="Application logger")
|
40
39
|
repository: ServiceLogger = Field(..., description="Repository logger")
|
41
40
|
database: ServiceLogger = Field(..., description="Database logger")
|
42
|
-
middleware: MiddlewareLogger = Field(..., description="Middleware logger")
|
43
|
-
|
44
|
-
class Config:
|
45
|
-
arbitrary_types_allowed=True
|
41
|
+
middleware: MiddlewareLogger = Field(..., description="Middleware logger")
|
@@ -1,8 +1,7 @@
|
|
1
|
-
from pydantic import BaseModel, Field
|
1
|
+
from pydantic import BaseModel, ConfigDict, Field
|
2
2
|
from .maleo import MaleoClientsConfigurations
|
3
3
|
|
4
4
|
class ClientConfigurations(BaseModel):
|
5
|
-
|
5
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
6
6
|
|
7
|
-
|
8
|
-
arbitrary_types_allowed=True
|
7
|
+
maleo: MaleoClientsConfigurations = Field(..., description="Maleo client's configurations")
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from pydantic import BaseModel, Field
|
1
|
+
from pydantic import BaseModel, ConfigDict, Field
|
2
2
|
|
3
3
|
class MaleoClientConfigurations(BaseModel):
|
4
4
|
key: str = Field(..., description="Client's key")
|
@@ -6,6 +6,8 @@ class MaleoClientConfigurations(BaseModel):
|
|
6
6
|
url: str = Field(..., description="Client's URL")
|
7
7
|
|
8
8
|
class MaleoClientsConfigurations(BaseModel):
|
9
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
10
|
+
|
9
11
|
telemetry: MaleoClientConfigurations = Field(..., description="MaleoTelemetry client's configuration")
|
10
12
|
metadata: MaleoClientConfigurations = Field(..., description="MaleoMetadata client's configuration")
|
11
13
|
identity: MaleoClientConfigurations = Field(..., description="MaleoIdentity client's configuration")
|
@@ -17,7 +19,4 @@ class MaleoClientsConfigurations(BaseModel):
|
|
17
19
|
scribe: MaleoClientConfigurations = Field(..., description="MaleoScribe client's configuration")
|
18
20
|
cds: MaleoClientConfigurations = Field(..., description="MaleoCDS client's configuration")
|
19
21
|
imaging: MaleoClientConfigurations = Field(..., description="MaleoImaging client's configuration")
|
20
|
-
mcu: MaleoClientConfigurations = Field(..., description="MaleoMCU client's configuration")
|
21
|
-
|
22
|
-
class Config:
|
23
|
-
arbitrary_types_allowed=True
|
22
|
+
mcu: MaleoClientConfigurations = Field(..., description="MaleoMCU client's configuration")
|
@@ -1,6 +1,5 @@
|
|
1
|
-
from pydantic import BaseModel, Field
|
1
|
+
from pydantic import BaseModel, ConfigDict, Field
|
2
2
|
from typing import List
|
3
|
-
from maleo_foundation.utils.logging import MiddlewareLogger
|
4
3
|
|
5
4
|
_ALLOW_METHODS: List[str] = [
|
6
5
|
"GET",
|
@@ -36,12 +35,11 @@ class CORSMiddlewareConfigurations(BaseModel):
|
|
36
35
|
expose_headers: List[str] = Field(_EXPOSE_HEADERS, description="Exposed headers")
|
37
36
|
|
38
37
|
class MiddlewareStaticConfigurations(BaseModel):
|
38
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
39
|
+
|
39
40
|
general: GeneralMiddlewareConfigurations = Field(..., description="Middleware's general configurations")
|
40
41
|
cors: CORSMiddlewareConfigurations = Field(..., description="CORS middleware's configurations")
|
41
42
|
|
42
|
-
class Config:
|
43
|
-
arbitrary_types_allowed=True
|
44
|
-
|
45
43
|
class BaseMiddlewareConfigurations(BaseModel):
|
46
44
|
limit: int = Field(10, description="Request limit (per 'window' seconds)")
|
47
45
|
window: int = Field(1, description="Request limit window (seconds)")
|
@@ -49,10 +47,9 @@ class BaseMiddlewareConfigurations(BaseModel):
|
|
49
47
|
ip_timeout: int = Field(300, description="Idle IP's timeout (seconds)")
|
50
48
|
|
51
49
|
class MiddlewareRuntimeConfigurations(BaseModel):
|
52
|
-
|
50
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
53
51
|
|
54
|
-
|
55
|
-
arbitrary_types_allowed=True
|
52
|
+
base: BaseMiddlewareConfigurations = Field(..., description="Base middleware's configurations")
|
56
53
|
|
57
54
|
class MiddlewareConfigurations(BaseModel):
|
58
55
|
general: GeneralMiddlewareConfigurations = Field(..., description="Middleware's general configurations")
|
@@ -1,10 +1,12 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
from datetime import datetime, timezone
|
3
|
-
from pydantic import BaseModel, Field
|
3
|
+
from pydantic import BaseModel, ConfigDict, Field
|
4
4
|
from uuid import UUID
|
5
5
|
from maleo_foundation.types import BaseTypes
|
6
6
|
|
7
7
|
class RequestContext(BaseModel):
|
8
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
9
|
+
|
8
10
|
request_id: UUID = Field(..., description="Unique identifier for tracing the request")
|
9
11
|
requested_at: datetime = Field(datetime.now(tz=timezone.utc), description="Request timestamp")
|
10
12
|
method: str = Field(..., description="Request's method")
|
@@ -21,7 +23,4 @@ class RequestContext(BaseModel):
|
|
21
23
|
origin: BaseTypes.OptionalString = Field(None, description="Origin of the request")
|
22
24
|
host: BaseTypes.OptionalString = Field(None, description="Host header from request")
|
23
25
|
forwarded_proto: BaseTypes.OptionalString = Field(None, description="Forwarded protocol (http/https)")
|
24
|
-
language: BaseTypes.OptionalString = Field(None, description="Accepted languages from client")
|
25
|
-
|
26
|
-
class Config:
|
27
|
-
arbitrary_types_allowed = True
|
26
|
+
language: BaseTypes.OptionalString = Field(None, description="Accepted languages from client")
|
@@ -1,17 +1,16 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
from httpx import Response
|
3
|
-
from pydantic import BaseModel, Field, model_validator
|
3
|
+
from pydantic import BaseModel, ConfigDict, Field, model_validator
|
4
4
|
from typing import Any
|
5
5
|
|
6
6
|
class BaseClientHTTPControllerResults(BaseModel):
|
7
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
8
|
+
|
7
9
|
response: Response = Field(..., description="Client's HTTP Controller response")
|
8
10
|
status_code: int = Field(..., description="Client's HTTP Controller response status code")
|
9
11
|
content: Any = Field(..., description="Client's HTTP Controller response content")
|
10
12
|
success: bool = Field(..., description="Client's HTTP Controller success status")
|
11
13
|
|
12
|
-
class Config:
|
13
|
-
arbitrary_types_allowed=True
|
14
|
-
|
15
14
|
@model_validator(mode="before")
|
16
15
|
@classmethod
|
17
16
|
def process_response(cls, values:dict) -> dict:
|
@@ -1,19 +1,18 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
from fastapi import status, Response
|
3
3
|
from typing import Any
|
4
|
-
from pydantic import BaseModel, Field, model_validator
|
4
|
+
from pydantic import BaseModel, ConfigDict, Field, model_validator
|
5
5
|
from maleo_foundation.enums import BaseEnums
|
6
6
|
|
7
7
|
class BaseServiceRESTControllerResults(BaseModel):
|
8
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
9
|
+
|
8
10
|
success:bool = Field(..., description="REST Controller's success status")
|
9
11
|
response_type:BaseEnums.RESTControllerResponseType = Field(BaseEnums.RESTControllerResponseType.JSON, description="REST Controller's response class")
|
10
12
|
content:Any = Field(..., description="REST Controller's response content")
|
11
13
|
status_code:int = Field(status.HTTP_200_OK, description="REST Controller's response status code")
|
12
14
|
response:Response = Field(Response(), description="REST Controller's Response")
|
13
15
|
|
14
|
-
class Config:
|
15
|
-
arbitrary_types_allowed=True
|
16
|
-
|
17
16
|
@model_validator(mode="after")
|
18
17
|
def process_response(self):
|
19
18
|
"""Dynamically creates a response based on response_type."""
|
@@ -5,7 +5,7 @@ from google.cloud.logging import Client
|
|
5
5
|
from google.cloud.logging.handlers import CloudLoggingHandler
|
6
6
|
from google.oauth2.service_account import Credentials
|
7
7
|
from pathlib import Path
|
8
|
-
from pydantic import BaseModel, Field
|
8
|
+
from pydantic import BaseModel, ConfigDict, Field
|
9
9
|
from typing import Optional, Union
|
10
10
|
from maleo_foundation.enums import BaseEnums
|
11
11
|
from maleo_foundation.types import BaseTypes
|
@@ -41,13 +41,12 @@ class GoogleCloudLogging:
|
|
41
41
|
return CloudLoggingHandler(client=self._client, name=name)
|
42
42
|
|
43
43
|
class SimpleConfig(BaseModel):
|
44
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
45
|
+
|
44
46
|
dir: str = Field(..., description="Log's directory")
|
45
47
|
level: BaseEnums.LoggerLevel = Field(BaseEnums.LoggerLevel.INFO, description="Log's level")
|
46
48
|
google_cloud_logging: Optional[GoogleCloudLogging] = Field(default_factory=GoogleCloudLogging, description="Google cloud logging")
|
47
49
|
|
48
|
-
class Config:
|
49
|
-
arbitrary_types_allowed=True
|
50
|
-
|
51
50
|
class BaseLogger(logging.Logger):
|
52
51
|
def __init__(
|
53
52
|
self,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
maleo_foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
maleo_foundation/authentication.py,sha256=
|
2
|
+
maleo_foundation/authentication.py,sha256=TSszeTEKijy95gdYM_fFGR_VtpPWKDwkP7_AOdoGCA0,1556
|
3
3
|
maleo_foundation/authorization.py,sha256=HGXCJ47AU1YFMDSmGhrMMmlHnAyghcFZVUiPa1FSvog,283
|
4
4
|
maleo_foundation/constants.py,sha256=LjMIy_Fcr6HLuhIuXs5lCtkyScZXXHOtBMPYx5lwg00,1446
|
5
5
|
maleo_foundation/enums.py,sha256=08rkuG3Y4-8kvd5BOBhhIS0UhzBT4kAPQX4L95GqnWQ,5316
|
@@ -32,15 +32,15 @@ maleo_foundation/expanded_types/encryption/__init__.py,sha256=yvqKW_VprQP_3YSL-A
|
|
32
32
|
maleo_foundation/expanded_types/encryption/aes.py,sha256=1rj43qjIO0TePpr1mErT_NJnqFZSgMM9gybfFxsTams,488
|
33
33
|
maleo_foundation/expanded_types/encryption/rsa.py,sha256=Esf_H8nMz2kOLAWa3M7dlD-sFdFIZylNjB_qB20Yaww,488
|
34
34
|
maleo_foundation/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
|
-
maleo_foundation/managers/cache.py,sha256=
|
35
|
+
maleo_foundation/managers/cache.py,sha256=IgcA-NAJbW83jRyApuQPbSJdth2LUpix9o-5CMWNwdI,274
|
36
36
|
maleo_foundation/managers/configuration.py,sha256=IyefI1GDDRYf5FRjxpJ2LfYiRL1fuzIOwrO1aAy5zy0,3814
|
37
37
|
maleo_foundation/managers/credential.py,sha256=i1w9bVozf7FYG8NGfLgJYRdLWBQBf35yyzVOEDgdXSA,3108
|
38
38
|
maleo_foundation/managers/db.py,sha256=y5oP3bTXKeXYKqng-E_HZ-3wC0ZPtl5bls0AEEej6zM,6050
|
39
39
|
maleo_foundation/managers/middleware.py,sha256=ecTNloglV67xoC_hqIEMIxhfQwzXRKHLI3ThJdd-lbY,2480
|
40
40
|
maleo_foundation/managers/service.py,sha256=UxQnWjfzqCR_e8n18-oSgM61Z9yuA93FmuqQ_vp6vmo,11168
|
41
41
|
maleo_foundation/managers/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
|
-
maleo_foundation/managers/client/base.py,sha256=
|
43
|
-
maleo_foundation/managers/client/maleo.py,sha256=
|
42
|
+
maleo_foundation/managers/client/base.py,sha256=o4D_y52Zxl-jOtV59o6ZCJOuS6rlUy7e2x3vs7vB5tk,4314
|
43
|
+
maleo_foundation/managers/client/maleo.py,sha256=fhIXKeIjx0VgS8wjX0Cpk05ZHHRiPvmpUQl0890mZxw,2686
|
44
44
|
maleo_foundation/managers/client/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
45
45
|
maleo_foundation/managers/client/google/base.py,sha256=sxALVZIyKUUbNamMrXSlyb3ftI8wSl5YUlRY2sG-iBg,1383
|
46
46
|
maleo_foundation/managers/client/google/parameter.py,sha256=Jy-rMz_xhepmxBI2rWPxdP8AENBbiApg04nO6cIGXN8,1429
|
@@ -67,18 +67,18 @@ maleo_foundation/models/transfers/general/__init__.py,sha256=rzHpxhyNphl5RVrsAlz
|
|
67
67
|
maleo_foundation/models/transfers/general/credentials.py,sha256=kLS0ymFipQmL3QaA2YFQepRfrQYlEm0jp1MiviAnfXM,345
|
68
68
|
maleo_foundation/models/transfers/general/database.py,sha256=bFNPd-1x3jNHPscwCk0besnpwartAeLY2e5PfKVyI4M,1201
|
69
69
|
maleo_foundation/models/transfers/general/key.py,sha256=S37SqD3qwTbgMk7785hW7Kl9d4Kouh4uPZcGoyMQ_-Q,755
|
70
|
-
maleo_foundation/models/transfers/general/request.py,sha256=
|
70
|
+
maleo_foundation/models/transfers/general/request.py,sha256=xOeBbtXygK5P6DxPyf3C4LIH3nb262tqWsgvALB4yfQ,1792
|
71
71
|
maleo_foundation/models/transfers/general/settings.py,sha256=aGknx8K-GWLPSn2eEkdlmZuYAtnurHeKOS2RWyPN-zI,4089
|
72
72
|
maleo_foundation/models/transfers/general/signature.py,sha256=J9xQy2HjpCQOnES7RJqsUnDgjFPuakQ1mxyfdTdstSE,297
|
73
73
|
maleo_foundation/models/transfers/general/token.py,sha256=PU-_wLFaY2i8pwRi9-jlk4nh7XzoTKOk0BEsUCGbD80,4979
|
74
|
-
maleo_foundation/models/transfers/general/configurations/__init__.py,sha256=
|
74
|
+
maleo_foundation/models/transfers/general/configurations/__init__.py,sha256=DMiBLOnA4Ye2q0-n0EyUU6U8YbpyqRn1l_vl4kuMKAI,2042
|
75
75
|
maleo_foundation/models/transfers/general/configurations/database.py,sha256=v-IzSm8kZa1TQByCc8dpIU-8csJN_G2irWeN4EClNlo,690
|
76
|
-
maleo_foundation/models/transfers/general/configurations/middleware.py,sha256=
|
76
|
+
maleo_foundation/models/transfers/general/configurations/middleware.py,sha256=UV4vUg936Wb4xq1AMgFGcfPewAIJHswadK25jqoETB8,2254
|
77
77
|
maleo_foundation/models/transfers/general/configurations/service.py,sha256=8lag1KXkS43IwsMGWka7L-peQ9YT1-dmWeEhQ1hnnLU,304
|
78
78
|
maleo_foundation/models/transfers/general/configurations/cache/__init__.py,sha256=a7p5LWkQJlgcfKpdJrKnCfe1LUAnwltXwTOThANlR6s,286
|
79
79
|
maleo_foundation/models/transfers/general/configurations/cache/redis.py,sha256=CFUkIgE6OyFeHcVBqShI8NBbG1G0wpJg6b2t8Ssq3OI,1161
|
80
|
-
maleo_foundation/models/transfers/general/configurations/client/__init__.py,sha256=
|
81
|
-
maleo_foundation/models/transfers/general/configurations/client/maleo.py,sha256=
|
80
|
+
maleo_foundation/models/transfers/general/configurations/client/__init__.py,sha256=BC4KHpGte5ZSw8TH2s_zWDvFEFOGl-mfAOPhtNOREyk,292
|
81
|
+
maleo_foundation/models/transfers/general/configurations/client/maleo.py,sha256=ChT7r6LnJHUtd4aHRX0xTYzcAEb9xuTe200-9TtSt_I,1577
|
82
82
|
maleo_foundation/models/transfers/parameters/__init__.py,sha256=oKW4RPIEISISRjsJzD8lsCGY1HhZRTzshPpWHcJu86k,353
|
83
83
|
maleo_foundation/models/transfers/parameters/client.py,sha256=wI2-ML99yn5HR0AciFg2C9EQixrWjbIR8x_bDbqKeDM,4069
|
84
84
|
maleo_foundation/models/transfers/parameters/general.py,sha256=-nSIcn0thtodk-69Uwj6qdrX8zfe-PX-gWwD-_VCVyY,779
|
@@ -101,7 +101,7 @@ maleo_foundation/models/transfers/results/token.py,sha256=WOYmby70PwHcBm_Qz_wa_q
|
|
101
101
|
maleo_foundation/models/transfers/results/client/__init__.py,sha256=xBRuY0NUIPpQEGQ2qoBnqLZGX4W1YSrQ0VnDf5OYJBo,290
|
102
102
|
maleo_foundation/models/transfers/results/client/service.py,sha256=7BsyJVUotOz7Ew_EoXwcMpIcU2DdQQh5rOBOOlHbG2k,1192
|
103
103
|
maleo_foundation/models/transfers/results/client/controllers/__init__.py,sha256=x5pcJ33rsG8SqecwL1g762DFoySisTLbZqOqKqKoaKU,173
|
104
|
-
maleo_foundation/models/transfers/results/client/controllers/http.py,sha256=
|
104
|
+
maleo_foundation/models/transfers/results/client/controllers/http.py,sha256=UOP-oDjaM8RPTacb_NkOoVcB3lpCNvtwXfeS99GLN8Y,1520
|
105
105
|
maleo_foundation/models/transfers/results/encryption/__init__.py,sha256=Uo8lKBcjlvtCjgPk4sz44GY_fjG3QooatbVYBDFwF8g,307
|
106
106
|
maleo_foundation/models/transfers/results/encryption/aes.py,sha256=JhsYVSR105mri-NU7E8oNw1JWYJpYOQBxgx3_0eV2Ck,830
|
107
107
|
maleo_foundation/models/transfers/results/encryption/rsa.py,sha256=NaSx1r6xWsaBkEp-5G4_DnlRraD6cNgWudQVTzCWR44,685
|
@@ -109,15 +109,14 @@ maleo_foundation/models/transfers/results/service/__init__.py,sha256=qKCJTtuLJed
|
|
109
109
|
maleo_foundation/models/transfers/results/service/general.py,sha256=RfxzBNZQhMNwNGYnDOygueK_x-xcYmqmkF3VgiX3SUA,1468
|
110
110
|
maleo_foundation/models/transfers/results/service/repository.py,sha256=djITRZh2jrncxd19MyCYBux8C7u906u224U2DPgAQI8,1471
|
111
111
|
maleo_foundation/models/transfers/results/service/controllers/__init__.py,sha256=HZJWMy2dskzOCzLmp_UaL9rjbQ-sDMI7sd2bXb-4QOU,175
|
112
|
-
maleo_foundation/models/transfers/results/service/controllers/rest.py,sha256=
|
112
|
+
maleo_foundation/models/transfers/results/service/controllers/rest.py,sha256=txZG-yFttHTla8-m85taLt8lrt-n3NeYVvRPGQnGm4M,1124
|
113
113
|
maleo_foundation/utils/__init__.py,sha256=ZZv0NDcTdHsHl51EKfgrlCm8CQmgvyIndMcQABDudN0,391
|
114
114
|
maleo_foundation/utils/cache.py,sha256=2EtXXN4Yl7P98Jc-C9P6FaBU5NOh1hFqeThRXkf99rg,734
|
115
|
-
maleo_foundation/utils/cleaner.py,sha256=dv80jDd8uAXuqyB5_UPbT2JksJ-hsq286DB2WCjjAYs,696
|
116
115
|
maleo_foundation/utils/client.py,sha256=CGwn8eH5WlwnE5tPMfMAH5V3BItBgVmYBZnXpLjTVSc,2826
|
117
116
|
maleo_foundation/utils/controller.py,sha256=Ub1R-JN6spmXakYrOY7igwaNt4Sg8LASASdXymxZcCI,6954
|
118
117
|
maleo_foundation/utils/exceptions.py,sha256=z24kzEP2geaAEElxXaEy7ln6KodebXvtlu-h1inZ_nw,6376
|
119
118
|
maleo_foundation/utils/extractor.py,sha256=ZNX0sQKcUwwh7paUZpdR04a18s8Ru2xNXhWZl-XN3l4,2197
|
120
|
-
maleo_foundation/utils/logging.py,sha256=
|
119
|
+
maleo_foundation/utils/logging.py,sha256=EfigViQmvtIlktr87O91ftlj6RxYaMNegHglfX6M63c,6839
|
121
120
|
maleo_foundation/utils/merger.py,sha256=MdocyCOtIhqjcmqx2mJ0V8vtwsrunRXqhRdrBCruh7Q,622
|
122
121
|
maleo_foundation/utils/query.py,sha256=hhISpBAZ4SV_pGf7uGBC6fzLrs_yj5_8gj-kFFeeNrw,8060
|
123
122
|
maleo_foundation/utils/repository.py,sha256=pxpws2PDyXwGACms_1azlabqzT6q1x41aYAQRablSnk,2860
|
@@ -134,7 +133,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
|
|
134
133
|
maleo_foundation/utils/loaders/credential/google.py,sha256=ZglnLdW3lHmaKER4mwGe5N5ERus-bdsamfpwGmQYPIo,6344
|
135
134
|
maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
|
136
135
|
maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
|
137
|
-
maleo_foundation-0.3.
|
138
|
-
maleo_foundation-0.3.
|
139
|
-
maleo_foundation-0.3.
|
140
|
-
maleo_foundation-0.3.
|
136
|
+
maleo_foundation-0.3.17.dist-info/METADATA,sha256=qawLY52SbAKJOeAhOwTLl5ouPE2cWsDGiIgVSidUrts,3740
|
137
|
+
maleo_foundation-0.3.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
138
|
+
maleo_foundation-0.3.17.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
|
139
|
+
maleo_foundation-0.3.17.dist-info/RECORD,,
|
@@ -1,22 +0,0 @@
|
|
1
|
-
from typing import Any, Dict, List, Optional
|
2
|
-
|
3
|
-
def clean_pubsub_message(
|
4
|
-
msg:Dict[str, Any],
|
5
|
-
custom_types:Optional[List[str]] = None
|
6
|
-
) -> Dict[str, Any]:
|
7
|
-
for k, v in msg.items():
|
8
|
-
# Clean custom_types
|
9
|
-
if isinstance(v, dict) and len(v) == 1:
|
10
|
-
only_key = next(iter(v))
|
11
|
-
if custom_types is not None and only_key in custom_types:
|
12
|
-
msg[k] = v[only_key]
|
13
|
-
|
14
|
-
# Clean "map"
|
15
|
-
if isinstance(v, dict) and "map" in v and isinstance(v["map"], dict):
|
16
|
-
msg[k] = v["map"]
|
17
|
-
|
18
|
-
# Clean "array"
|
19
|
-
if isinstance(v, dict) and "array" in v and isinstance(v["array"], list):
|
20
|
-
msg[k] = v["array"]
|
21
|
-
|
22
|
-
return msg
|
File without changes
|
File without changes
|