maleo-foundation 0.0.35__tar.gz → 0.0.37__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.0.35 → maleo_foundation-0.0.37}/PKG-INFO +1 -1
- maleo_foundation-0.0.37/maleo_foundation/constants.py +33 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/responses.py +9 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation.egg-info/PKG-INFO +1 -1
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/pyproject.toml +1 -1
- maleo_foundation-0.0.35/maleo_foundation/constants.py +0 -8
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/README.md +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/general/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/general/http.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/google/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/google/cloud/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/google/cloud/logging.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/google/cloud/secret.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/google/cloud/storage.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/controller.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/db/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/db/database.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/db/engine.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/db/session.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/middlewares/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/middlewares/base.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/middlewares/cors.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/enums.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/expanded_types/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/expanded_types/client.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/expanded_types/query.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/expanded_types/service.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/extended_types.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/schemas/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/schemas/general.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/schemas/parameter.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/schemas/result.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/parameters/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/parameters/client.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/parameters/general.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/parameters/service.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/client/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/client/controllers/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/client/controllers/http.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/client/service.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/service/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/service/controllers/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/service/controllers/rest.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/service/general.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/transfers/results/service/query.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/types.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/query.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/utils/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/utils/exceptions.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/utils/formatter/__init__.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/utils/formatter/case.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/utils/logger.py +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation.egg-info/SOURCES.txt +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation.egg-info/dependency_links.txt +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation.egg-info/requires.txt +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation.egg-info/top_level.txt +0 -0
- {maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/setup.cfg +0 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
import re
|
2
|
+
from uuid import UUID
|
3
|
+
from maleo_foundation.models.enums import BaseEnums
|
4
|
+
from maleo_foundation.models.types import BaseTypes
|
5
|
+
|
6
|
+
EMAIL_REGEX:str = r"^[^\s@]+@[^\s@]+\.[^\s@]+$"
|
7
|
+
TOKEN_COOKIE_KEY_NAME="token"
|
8
|
+
REFRESH_TOKEN_DURATION_DAYS:int = 7
|
9
|
+
ACCESS_TOKEN_DURATION_MINUTES:int = 5
|
10
|
+
SORT_COLUMN_PATTERN = re.compile(r'^[a-z_]+\.(asc|desc)$')
|
11
|
+
DATE_FILTER_PATTERN = re.compile(r'^[a-z_]+(?:\|from::\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2}))?(?:\|to::\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2}))?$')
|
12
|
+
STATUS_UPDATE_CRITERIAS:dict[
|
13
|
+
BaseEnums.StatusUpdateAction,
|
14
|
+
BaseTypes.OptionalListOfStatuses
|
15
|
+
] = {
|
16
|
+
BaseEnums.StatusUpdateAction.DELETE: None,
|
17
|
+
BaseEnums.StatusUpdateAction.RESTORE: None,
|
18
|
+
BaseEnums.StatusUpdateAction.DEACTIVATE: [
|
19
|
+
BaseEnums.StatusType.INACTIVE,
|
20
|
+
BaseEnums.StatusType.ACTIVE,
|
21
|
+
],
|
22
|
+
BaseEnums.StatusUpdateAction.ACTIVATE: [
|
23
|
+
BaseEnums.StatusType.INACTIVE,
|
24
|
+
BaseEnums.StatusType.ACTIVE,
|
25
|
+
]
|
26
|
+
}
|
27
|
+
IDENTIFIER_TYPE_VALUE_PAIR_MAP:dict[
|
28
|
+
BaseEnums.IdentifierTypes,
|
29
|
+
object
|
30
|
+
] = {
|
31
|
+
BaseEnums.IdentifierTypes.ID: int,
|
32
|
+
BaseEnums.IdentifierTypes.UUID: UUID
|
33
|
+
}
|
@@ -9,6 +9,11 @@ class BaseResponses:
|
|
9
9
|
class Fail(BaseResultSchemas.Fail):
|
10
10
|
other:BaseTypes.OptionalAny = Field("Please try again later or contact administrator.", description="Response's other information")
|
11
11
|
|
12
|
+
class BadRequest(Fail):
|
13
|
+
code:str = "MAL-BDR-001"
|
14
|
+
message:str = "Bad Request"
|
15
|
+
description:str = "Bad/Unexpected parameters given in the request"
|
16
|
+
|
12
17
|
class Unauthorized(Fail):
|
13
18
|
code:str = "MAL-ATH-001"
|
14
19
|
message:str = "Unauthorized Request"
|
@@ -79,6 +84,10 @@ class BaseResponses:
|
|
79
84
|
|
80
85
|
#* ----- ----- Responses Class ----- ----- *#
|
81
86
|
other_responses={
|
87
|
+
status.HTTP_400_BAD_REQUEST: {
|
88
|
+
"description": "Bad Request Response",
|
89
|
+
"model": BadRequest
|
90
|
+
},
|
82
91
|
status.HTTP_401_UNAUTHORIZED: {
|
83
92
|
"description": "Unauthorized Response",
|
84
93
|
"model": Unauthorized
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import re
|
2
|
-
|
3
|
-
EMAIL_REGEX:str = r"^[^\s@]+@[^\s@]+\.[^\s@]+$"
|
4
|
-
TOKEN_COOKIE_KEY_NAME="token"
|
5
|
-
REFRESH_TOKEN_DURATION_DAYS:int = 7
|
6
|
-
ACCESS_TOKEN_DURATION_MINUTES:int = 5
|
7
|
-
SORT_COLUMN_PATTERN = re.compile(r'^[a-z_]+\.(asc|desc)$')
|
8
|
-
DATE_FILTER_PATTERN = re.compile(r'^[a-z_]+(?:\|from::\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2}))?(?:\|to::\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2}))?$')
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/general/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/general/http.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/google/__init__.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/google/cloud/logging.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/google/cloud/secret.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/clients/google/cloud/storage.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/middlewares/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/expanded_types/client.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/expanded_types/query.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/extended_types.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/schemas/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/schemas/general.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/schemas/parameter.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/models/schemas/result.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/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
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/utils/formatter/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation/utils/formatter/case.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.0.35 → maleo_foundation-0.0.37}/maleo_foundation.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|