maleo-foundation 0.1.71__tar.gz → 0.1.73__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.1.71 → maleo_foundation-0.1.73}/PKG-INFO +1 -1
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/base.py +12 -1
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/service.py +1 -1
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation.egg-info/PKG-INFO +1 -1
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/pyproject.toml +1 -1
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/README.md +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/authentication.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/client/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/client/manager.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/client/services/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/client/services/signature.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/client/services/token.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/constants.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/enums.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/client.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/general.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/query.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/service.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/signature.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/token.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/extended_types.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/google/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/google/base.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/google/secret.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/google/storage.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/maleo.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/db.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/middleware.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/middlewares/authentication.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/middlewares/base.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/middlewares/cors.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/responses.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/general.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/parameter.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/result.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/signature.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/token.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/table.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/general/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/general/signature.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/general/token.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/parameters/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/parameters/client.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/parameters/general.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/parameters/service.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/parameters/signature.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/parameters/token.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/client/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/client/controllers/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/client/controllers/http.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/client/service.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/service/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/service/controllers/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/service/controllers/rest.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/service/general.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/service/query.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/signature.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/transfers/results/token.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/types.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/controller.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/exceptions.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/extractor.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/formatter/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/formatter/case.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/loaders/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/loaders/json.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/loaders/key/__init__.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/loaders/key/rsa.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/loaders/yaml.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/logging.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/mergers.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/query.py +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation.egg-info/SOURCES.txt +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation.egg-info/dependency_links.txt +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation.egg-info/requires.txt +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation.egg-info/top_level.txt +0 -0
- {maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/setup.cfg +0 -0
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/base.py
RENAMED
@@ -1,10 +1,21 @@
|
|
1
1
|
import httpx
|
2
2
|
from contextlib import asynccontextmanager
|
3
3
|
from pydantic import BaseModel, Field
|
4
|
-
from typing import AsyncGenerator
|
4
|
+
from typing import AsyncGenerator, Generator
|
5
5
|
from maleo_foundation.types import BaseTypes
|
6
6
|
from maleo_foundation.utils.logging import ClientLogger, SimpleConfig
|
7
7
|
|
8
|
+
class BearerAuth(httpx.Auth):
|
9
|
+
def __init__(self, token:str) -> None:
|
10
|
+
self._auth_header = self._build_auth_header(token)
|
11
|
+
|
12
|
+
def auth_flow(self, request:httpx.Request) -> Generator[httpx.Request, httpx.Response, None]:
|
13
|
+
request.headers["Authorization"] = self._auth_header
|
14
|
+
yield request
|
15
|
+
|
16
|
+
def _build_auth_header(self, token:str) -> str:
|
17
|
+
return f"Bearer {token}"
|
18
|
+
|
8
19
|
class URL(BaseModel):
|
9
20
|
base:str = Field(..., description="Base URL")
|
10
21
|
|
@@ -284,7 +284,7 @@ class ServiceManager:
|
|
284
284
|
parameters = BaseTokenParametersTransfers.Encode(key=self._keys.private, password=self._keys.password, payload=payload)
|
285
285
|
result = self._clients.maleo.foundation.services.token.encode(parameters=parameters)
|
286
286
|
if not result.success:
|
287
|
-
|
287
|
+
raise RuntimeError("Failed encoding payload into token")
|
288
288
|
return result.data.token
|
289
289
|
|
290
290
|
def create_app(self, router:APIRouter, lifespan:Optional[Lifespan[AppType]] = None) -> FastAPI:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/client/services/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/client/services/signature.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/client/services/token.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/client.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/general.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/query.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/service.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/signature.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/expanded_types/token.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/__init__.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/google/base.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/managers/client/maleo.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/middlewares/authentication.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/general.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/parameter.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/result.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/signature.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/models/schemas/token.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/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
|
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.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/formatter/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/formatter/case.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/loaders/__init__.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation/utils/loaders/key/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/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
|
{maleo_foundation-0.1.71 → maleo_foundation-0.1.73}/maleo_foundation.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|