alpha-python 0.6.1__py3-none-any.whl → 0.6.2__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.
- alpha/__init__.py +2 -1
- alpha/handlers/templates/python-flask/controller.mustache +1 -3
- alpha/infra/__init__.py +2 -1
- alpha/infra/models/filter_operators.py +3 -5
- alpha/interfaces/sql_database.py +0 -2
- {alpha_python-0.6.1.dist-info → alpha_python-0.6.2.dist-info}/METADATA +1 -1
- {alpha_python-0.6.1.dist-info → alpha_python-0.6.2.dist-info}/RECORD +11 -11
- {alpha_python-0.6.1.dist-info → alpha_python-0.6.2.dist-info}/WHEEL +0 -0
- {alpha_python-0.6.1.dist-info → alpha_python-0.6.2.dist-info}/entry_points.txt +0 -0
- {alpha_python-0.6.1.dist-info → alpha_python-0.6.2.dist-info}/licenses/LICENSE +0 -0
- {alpha_python-0.6.1.dist-info → alpha_python-0.6.2.dist-info}/top_level.txt +0 -0
alpha/__init__.py
CHANGED
|
@@ -20,7 +20,7 @@ from alpha.infra.connectors.oidc_connector import (
|
|
|
20
20
|
KeyCloakOIDCConnector,
|
|
21
21
|
)
|
|
22
22
|
from alpha.infra.connectors.sql_alchemy import SqlAlchemyDatabase
|
|
23
|
-
from alpha.infra.models.filter_operators import And, Or
|
|
23
|
+
from alpha.infra.models.filter_operators import And, Or, FilterOperator
|
|
24
24
|
from alpha.infra.models.json_patch import JsonPatch
|
|
25
25
|
from alpha.infra.models.order_by import OrderBy, Order
|
|
26
26
|
from alpha.infra.models.search_filter import SearchFilter, Operator
|
|
@@ -116,6 +116,7 @@ __all__ = [
|
|
|
116
116
|
"SqlAlchemyDatabase",
|
|
117
117
|
"And",
|
|
118
118
|
"Or",
|
|
119
|
+
"FilterOperator",
|
|
119
120
|
"JsonPatch",
|
|
120
121
|
"OrderBy",
|
|
121
122
|
"Order",
|
|
@@ -43,9 +43,7 @@ from {{packageName}} import models as api_models
|
|
|
43
43
|
|
|
44
44
|
{{#operations}}
|
|
45
45
|
{{#operation}}
|
|
46
|
-
{{#authMethods}}{{#vendorExtensions.x-alpha-service-name}}@inject{{/vendorExtensions.x-alpha-service-name}}{{/authMethods}}
|
|
47
|
-
{{^authMethods}}{{#vendorExtensions.x-alpha-service-name}}@inject{{/vendorExtensions.x-alpha-service-name}}{{/authMethods}}
|
|
48
|
-
{{#authMethods}}{{^vendorExtensions.x-alpha-service-name}}@inject{{/vendorExtensions.x-alpha-service-name}}{{/authMethods}}
|
|
46
|
+
{{#authMethods}}{{#-first}}@inject{{/-first}}{{/authMethods}}{{^authMethods}}{{#vendorExtensions.x-alpha-service-name}}@inject{{/vendorExtensions.x-alpha-service-name}}{{/authMethods}}
|
|
49
47
|
def {{operationId}}(
|
|
50
48
|
{{#allParams}}{{^isBodyParam}}{{paramName}}{{^required}}=None{{/required}},{{/isBodyParam}}{{/allParams}}
|
|
51
49
|
{{#authMethods}}{{#isBasicBearer}}token_factory=Provide[Container.token_factory],{{/isBasicBearer}}{{/authMethods}}
|
alpha/infra/__init__.py
CHANGED
|
@@ -3,7 +3,7 @@ from alpha.infra.connectors.oidc_connector import (
|
|
|
3
3
|
KeyCloakOIDCConnector,
|
|
4
4
|
)
|
|
5
5
|
from alpha.infra.connectors.sql_alchemy import SqlAlchemyDatabase
|
|
6
|
-
from alpha.infra.models.filter_operators import And, Or
|
|
6
|
+
from alpha.infra.models.filter_operators import And, Or, FilterOperator
|
|
7
7
|
from alpha.infra.models.json_patch import JsonPatch
|
|
8
8
|
from alpha.infra.models.order_by import OrderBy, Order
|
|
9
9
|
from alpha.infra.models.search_filter import SearchFilter, Operator
|
|
@@ -22,6 +22,7 @@ __all__ = [
|
|
|
22
22
|
"SqlAlchemyDatabase",
|
|
23
23
|
"And",
|
|
24
24
|
"Or",
|
|
25
|
+
"FilterOperator",
|
|
25
26
|
"JsonPatch",
|
|
26
27
|
"OrderBy",
|
|
27
28
|
"Order",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
- Or
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
from typing import Any, Callable, Iterable
|
|
7
|
+
from typing import Any, Callable, Iterable, Self
|
|
8
8
|
|
|
9
9
|
from sqlalchemy.orm import Query
|
|
10
10
|
from sqlalchemy.sql.expression import ColumnElement, and_, or_
|
|
@@ -17,13 +17,11 @@ class FilterOperator:
|
|
|
17
17
|
search query
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
def __init__(self, *search_filters: SearchFilter):
|
|
20
|
+
def __init__(self, *search_filters: SearchFilter | Self) -> None:
|
|
21
21
|
"""Instantiate the filter operator by storing the search filter
|
|
22
22
|
objects
|
|
23
23
|
"""
|
|
24
|
-
self.search_filters: Iterable[SearchFilter |
|
|
25
|
-
search_filters
|
|
26
|
-
)
|
|
24
|
+
self.search_filters: Iterable[SearchFilter | Self] = search_filters
|
|
27
25
|
|
|
28
26
|
@property
|
|
29
27
|
def filter_operator(
|
alpha/interfaces/sql_database.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alpha-python
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: Alpha is intended to be the first dependency you need to add to your Python application. It is a Python library which contains standard building blocks that can be used in applications that are used as APIs and/or make use of database interaction.
|
|
5
5
|
Author-email: Bart Reijling <bart@reijling.eu>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
alpha/__init__.py,sha256=
|
|
1
|
+
alpha/__init__.py,sha256=FnXcEv9PSCLWDKE4-9GCqI7HSAvzo3WW_mfcBLPBBxo,6153
|
|
2
2
|
alpha/cli.py,sha256=YTWM7lzmydYazXMJ6LULywvJTMHzvfTO6yNuPrUgHCY,5813
|
|
3
3
|
alpha/encoder.py,sha256=sNYZ30uNiJWV0xpeIiTVCDAsM86Nk_914kF7Ye2Woao,2610
|
|
4
4
|
alpha/exceptions.py,sha256=AHoFMPyHvjj6j_1X2TS40dSaFBzCDtgzAmucimSZjfc,5793
|
|
@@ -48,7 +48,7 @@ alpha/handlers/templates/python-flask/__init__model.mustache,sha256=JRwyJmOCAD8n
|
|
|
48
48
|
alpha/handlers/templates/python-flask/__init__test.mustache,sha256=wUxDXcyE4rPh3sDp8MvR5m8vqzoU25Fw1bo_xh6InnY,438
|
|
49
49
|
alpha/handlers/templates/python-flask/__main__.mustache,sha256=D11Z_bhka_NsK3EP8iSzV8_Hcc15L-uOntH2IbzrKng,2942
|
|
50
50
|
alpha/handlers/templates/python-flask/base_model.mustache,sha256=B--jl9LmfiHACq9n1kDxm6YTi6tb1oSUFnZya_IKOhU,2184
|
|
51
|
-
alpha/handlers/templates/python-flask/controller.mustache,sha256=
|
|
51
|
+
alpha/handlers/templates/python-flask/controller.mustache,sha256=iOIpFCFVj0y_fvKqY8quwTR4Cdsk0TaKZuOCKojUfOE,17341
|
|
52
52
|
alpha/handlers/templates/python-flask/controller_test.mustache,sha256=2i2cwgQonT1RMJQwdxeq8B3x8-hLjpK7YkI--LkKLOI,2848
|
|
53
53
|
alpha/handlers/templates/python-flask/dockerignore.mustache,sha256=hqlHuqIMLuuwvVqK6xhIcfaezKoChriR3D7TvxtkjGo,906
|
|
54
54
|
alpha/handlers/templates/python-flask/encoder.mustache,sha256=03rsvhN_QdqaWsQC2v3772UvrLEXna9WcvxQsl6mwiU,866
|
|
@@ -65,7 +65,7 @@ alpha/handlers/templates/python-flask/tox.mustache,sha256=iuEc1JquvGZ0UlCCJus2X_
|
|
|
65
65
|
alpha/handlers/templates/python-flask/travis.mustache,sha256=M9UNXQnfg8F6uFvOSsay8FQ0YvPDi8EF6HIiu4UW4-o,319
|
|
66
66
|
alpha/handlers/templates/python-flask/typing_utils.mustache,sha256=mGDTJkj9V9w7NsFSljw33GKB-gWfqoceAot-iHTViNs,809
|
|
67
67
|
alpha/handlers/templates/python-flask/util.mustache,sha256=iQVhsAN_ZCQuQGOxoqATTE90fkIEojKyrfooFqa7Jck,3534
|
|
68
|
-
alpha/infra/__init__.py,sha256=
|
|
68
|
+
alpha/infra/__init__.py,sha256=4eIKsW1N06_vVBrO2u1ESU5iURBb0cGvxcscaPsB4PE,1018
|
|
69
69
|
alpha/infra/connectors/__init__.py,sha256=kEh_mOIIqkWeY4cilislM8ZjKXNFp8zBuMThfbJ1CGc,647
|
|
70
70
|
alpha/infra/connectors/ldap_connector.py,sha256=ntBheImY90qtZ8tTYv0Dh64vxNho0k8FwTOAYkVdZsU,4019
|
|
71
71
|
alpha/infra/connectors/oidc_connector.py,sha256=z9AY1lMVK5nULd80zOvJzo8zPbp6CHJ7fv2smp71eIs,15675
|
|
@@ -73,7 +73,7 @@ alpha/infra/connectors/sql_alchemy.py,sha256=8DivUj25_OAVaXmaCsbSnHgOD1w5_ewAXSl
|
|
|
73
73
|
alpha/infra/databases/__init__.py,sha256=IyA_aB9h_7rOM-aa50QLsA_q4e9W4HnJOqh76aDyrj4,106
|
|
74
74
|
alpha/infra/databases/sql_alchemy.py,sha256=7t17M8UEgW1NMX9LYW6A14EM5UxEJZyp-8a_xLEONAs,235
|
|
75
75
|
alpha/infra/models/__init__.py,sha256=SIakw9bAPXwFmx3I7exCRBs3e2Ug3etOJy6JyIOR1Uc,348
|
|
76
|
-
alpha/infra/models/filter_operators.py,sha256=
|
|
76
|
+
alpha/infra/models/filter_operators.py,sha256=LJw2w8v1FvDhQnEZ8hKq3Rq54_MwolGn7SSDT5t5rT4,2797
|
|
77
77
|
alpha/infra/models/json_patch.py,sha256=w8L59E6w-aSeEknww-JLCrB1kEpFbPXcRlweKP4kU1A,1753
|
|
78
78
|
alpha/infra/models/order_by.py,sha256=QN4ALsbJ-zoh1dx5OHZ2L9pijwfjBM5G0pBbpNrNHnM,4569
|
|
79
79
|
alpha/infra/models/query_clause.py,sha256=xLWxm-cWrODMqpqqVIu1veSVBWLENt97TTHq8CinP7M,2555
|
|
@@ -88,7 +88,7 @@ alpha/interfaces/openapi_model.py,sha256=9QayfwbwTg_3-reFso_ktwNqGI2f2C4AQOAPvPH
|
|
|
88
88
|
alpha/interfaces/patchable.py,sha256=9L42VdrvfDhKKlfjQAMDX6FDA0R-U6QkOWlAHUdxneQ,705
|
|
89
89
|
alpha/interfaces/providers.py,sha256=S0uBThEI_qqRpxyQmwNNSPGMcAVIU2ngXIimflDqUbc,4162
|
|
90
90
|
alpha/interfaces/pydantic_instance.py,sha256=S96jLEWRmDyvYV3VqofSqjiN-lcjfkjiNp7Vpumw49A,245
|
|
91
|
-
alpha/interfaces/sql_database.py,sha256
|
|
91
|
+
alpha/interfaces/sql_database.py,sha256=-YiMBSrGkd2NTS4FEBjXenlPnVQW2t3SvQJMDRyHDjA,919
|
|
92
92
|
alpha/interfaces/sql_mapper.py,sha256=OSGIwbtlQ5-cBHUIiJfLgJlkBU3MgMAbSdxj8X2v-eI,624
|
|
93
93
|
alpha/interfaces/sql_repository.py,sha256=nJCdF_G8YS7_VST_OL14wBA_Ne_DyGZhQQDAta1zqYk,9814
|
|
94
94
|
alpha/interfaces/token_factory.py,sha256=MeSvnyH699vBG0c7Oli4M6RT1wEsCVTNy7V4XQpu31o,1882
|
|
@@ -136,9 +136,9 @@ alpha/utils/openapi_test/models.py,sha256=vAHbjmwc0rVsCj9m8iKqkwPpSkSmkTOT8UQvff
|
|
|
136
136
|
alpha/utils/openapi_test/orm.py,sha256=Py95GV_0e7wI1MYDZR1_EHkvTgev6eNo70SVmnD7kGc,3045
|
|
137
137
|
alpha/utils/openapi_test/response.py,sha256=IxbQ6Nw258LLViHkgfjOpc7zWGTP8ofVOX1zrwDoR50,270
|
|
138
138
|
alpha/utils/openapi_test/service.py,sha256=ycrEUlQmygKthnOhEiir-wtbPFi5cT-bepVclaL9FAk,5003
|
|
139
|
-
alpha_python-0.6.
|
|
140
|
-
alpha_python-0.6.
|
|
141
|
-
alpha_python-0.6.
|
|
142
|
-
alpha_python-0.6.
|
|
143
|
-
alpha_python-0.6.
|
|
144
|
-
alpha_python-0.6.
|
|
139
|
+
alpha_python-0.6.2.dist-info/licenses/LICENSE,sha256=5KwEqC3KUoH4lVXgZ9tGriKOl-LGxHkXBWo16mFmAYM,1070
|
|
140
|
+
alpha_python-0.6.2.dist-info/METADATA,sha256=K6meojtl5hwwRM-AA3uvAfsg3oKZL42l3lK4S53jlTE,8645
|
|
141
|
+
alpha_python-0.6.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
142
|
+
alpha_python-0.6.2.dist-info/entry_points.txt,sha256=LBEXdcofOugYYdZ46nz5Dxj_aj1QbRBkumfPGhy-GXI,41
|
|
143
|
+
alpha_python-0.6.2.dist-info/top_level.txt,sha256=tqmNnOmi2RSSiPo99C03fD5Cc3r9za9xTjPAoQC1EGA,6
|
|
144
|
+
alpha_python-0.6.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|