goodmap 1.1.14__py3-none-any.whl → 1.3.0__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.
- goodmap/admin_api.py +251 -0
- goodmap/api_models.py +105 -0
- goodmap/core.py +39 -0
- goodmap/core_api.py +354 -417
- goodmap/data_models/location.py +154 -23
- goodmap/formatter.py +20 -0
- goodmap/goodmap.py +113 -18
- goodmap/json_security.py +102 -0
- {goodmap-1.1.14.dist-info → goodmap-1.3.0.dist-info}/METADATA +2 -2
- goodmap-1.3.0.dist-info/RECORD +20 -0
- goodmap-1.1.14.dist-info/RECORD +0 -17
- {goodmap-1.1.14.dist-info → goodmap-1.3.0.dist-info}/LICENSE.md +0 -0
- {goodmap-1.1.14.dist-info → goodmap-1.3.0.dist-info}/WHEEL +0 -0
goodmap/admin_api.py
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import uuid
|
|
3
|
+
from typing import Any, Type
|
|
4
|
+
|
|
5
|
+
from flask import Blueprint, jsonify, make_response, request
|
|
6
|
+
from spectree import Response, SpecTree
|
|
7
|
+
from werkzeug.exceptions import BadRequest
|
|
8
|
+
|
|
9
|
+
from goodmap.api_models import (
|
|
10
|
+
ErrorResponse,
|
|
11
|
+
ReportUpdateRequest,
|
|
12
|
+
SuggestionStatusRequest,
|
|
13
|
+
)
|
|
14
|
+
from goodmap.exceptions import (
|
|
15
|
+
LocationAlreadyExistsError,
|
|
16
|
+
LocationNotFoundError,
|
|
17
|
+
LocationValidationError,
|
|
18
|
+
ReportNotFoundError,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
# Error message constants
|
|
22
|
+
ERROR_INVALID_REQUEST_DATA = "Invalid request data"
|
|
23
|
+
ERROR_INVALID_LOCATION_DATA = "Invalid location data"
|
|
24
|
+
ERROR_INTERNAL_ERROR = "An internal error occurred"
|
|
25
|
+
ERROR_LOCATION_NOT_FOUND = "Location not found"
|
|
26
|
+
|
|
27
|
+
logger = logging.getLogger(__name__)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _clean_model_name(model: Type[Any]) -> str:
|
|
31
|
+
return model.__name__
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _handle_location_validation_error(e: LocationValidationError):
|
|
35
|
+
"""Handle LocationValidationError and return appropriate response."""
|
|
36
|
+
logger.warning(
|
|
37
|
+
"Location validation failed",
|
|
38
|
+
extra={"uuid": e.uuid, "errors": e.validation_errors},
|
|
39
|
+
)
|
|
40
|
+
return make_response(jsonify({"message": ERROR_INVALID_LOCATION_DATA}), 400)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _get_locations_handler(database):
|
|
44
|
+
"""Handle GET /locations request."""
|
|
45
|
+
query_params = request.args.to_dict(flat=False)
|
|
46
|
+
if "sort_by" not in query_params:
|
|
47
|
+
query_params["sort_by"] = ["name"]
|
|
48
|
+
result = database.get_locations_paginated(query_params)
|
|
49
|
+
return jsonify(result)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _create_location_handler(database, location_model):
|
|
53
|
+
"""Handle POST /locations request."""
|
|
54
|
+
location_data = request.get_json()
|
|
55
|
+
if location_data is None:
|
|
56
|
+
logger.warning("Empty or invalid JSON in admin create location endpoint")
|
|
57
|
+
return make_response(jsonify({"message": ERROR_INVALID_REQUEST_DATA}), 400)
|
|
58
|
+
# TODO: Catch pydantic.ValidationError separately to return 400 instead of 500
|
|
59
|
+
try:
|
|
60
|
+
location_data.update({"uuid": str(uuid.uuid4())})
|
|
61
|
+
location = location_model.model_validate(location_data)
|
|
62
|
+
database.add_location(location.model_dump())
|
|
63
|
+
except LocationValidationError as e:
|
|
64
|
+
return _handle_location_validation_error(e)
|
|
65
|
+
except Exception:
|
|
66
|
+
logger.error("Error creating location", exc_info=True)
|
|
67
|
+
return make_response(jsonify({"message": ERROR_INTERNAL_ERROR}), 500)
|
|
68
|
+
return jsonify(location.model_dump())
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _update_location_handler(database, location_model, location_id):
|
|
72
|
+
"""Handle PUT /locations/<location_id> request."""
|
|
73
|
+
location_data = request.get_json()
|
|
74
|
+
if location_data is None:
|
|
75
|
+
logger.warning("Empty or invalid JSON in admin update location endpoint")
|
|
76
|
+
return make_response(jsonify({"message": ERROR_INVALID_REQUEST_DATA}), 400)
|
|
77
|
+
# TODO: Catch pydantic.ValidationError separately to return 400 instead of 500
|
|
78
|
+
try:
|
|
79
|
+
location_data.update({"uuid": location_id})
|
|
80
|
+
location = location_model.model_validate(location_data)
|
|
81
|
+
database.update_location(location_id, location.model_dump())
|
|
82
|
+
except LocationValidationError as e:
|
|
83
|
+
return _handle_location_validation_error(e)
|
|
84
|
+
except LocationNotFoundError as e:
|
|
85
|
+
logger.info("Location not found for update", extra={"uuid": e.uuid})
|
|
86
|
+
return make_response(jsonify({"message": ERROR_LOCATION_NOT_FOUND}), 404)
|
|
87
|
+
except Exception:
|
|
88
|
+
logger.error("Error updating location", exc_info=True)
|
|
89
|
+
return make_response(jsonify({"message": ERROR_INTERNAL_ERROR}), 500)
|
|
90
|
+
return jsonify(location.model_dump())
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def _delete_location_handler(database, location_id):
|
|
94
|
+
"""Handle DELETE /locations/<location_id> request."""
|
|
95
|
+
try:
|
|
96
|
+
database.delete_location(location_id)
|
|
97
|
+
except LocationNotFoundError as e:
|
|
98
|
+
logger.info("Location not found for deletion", extra={"uuid": e.uuid})
|
|
99
|
+
return make_response(jsonify({"message": ERROR_LOCATION_NOT_FOUND}), 404)
|
|
100
|
+
except Exception:
|
|
101
|
+
logger.error("Error deleting location", exc_info=True)
|
|
102
|
+
return make_response(jsonify({"message": ERROR_INTERNAL_ERROR}), 500)
|
|
103
|
+
return "", 204
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def _get_suggestions_handler(database):
|
|
107
|
+
"""Handle GET /suggestions request."""
|
|
108
|
+
query_params = request.args.to_dict(flat=False)
|
|
109
|
+
result = database.get_suggestions_paginated(query_params)
|
|
110
|
+
return jsonify(result)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def _update_suggestion_handler(database, suggestion_id):
|
|
114
|
+
"""Handle PUT /suggestions/<suggestion_id> request."""
|
|
115
|
+
try:
|
|
116
|
+
data = request.get_json()
|
|
117
|
+
status = data["status"] # Validated by Spectree
|
|
118
|
+
suggestion = database.get_suggestion(suggestion_id)
|
|
119
|
+
if not suggestion:
|
|
120
|
+
return make_response(jsonify({"message": "Suggestion not found"}), 404)
|
|
121
|
+
if suggestion.get("status") != "pending":
|
|
122
|
+
return make_response(jsonify({"message": "Suggestion already processed"}), 409)
|
|
123
|
+
if status == "accepted":
|
|
124
|
+
suggestion_data = {k: v for k, v in suggestion.items() if k != "status"}
|
|
125
|
+
database.add_location(suggestion_data)
|
|
126
|
+
database.update_suggestion(suggestion_id, status)
|
|
127
|
+
except LocationValidationError as e:
|
|
128
|
+
logger.warning(
|
|
129
|
+
"Location validation failed in suggestion",
|
|
130
|
+
extra={"uuid": e.uuid, "errors": e.validation_errors},
|
|
131
|
+
)
|
|
132
|
+
return make_response(jsonify({"message": ERROR_INVALID_LOCATION_DATA}), 400)
|
|
133
|
+
except LocationAlreadyExistsError as e:
|
|
134
|
+
logger.warning(
|
|
135
|
+
"Attempted to create duplicate location from suggestion", extra={"uuid": e.uuid}
|
|
136
|
+
)
|
|
137
|
+
return make_response(jsonify({"message": "Location already exists"}), 409)
|
|
138
|
+
except Exception:
|
|
139
|
+
logger.error("Error processing suggestion", exc_info=True)
|
|
140
|
+
return make_response(jsonify({"message": ERROR_INTERNAL_ERROR}), 500)
|
|
141
|
+
return jsonify(database.get_suggestion(suggestion_id))
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _get_reports_handler(database):
|
|
145
|
+
"""Handle GET /reports request."""
|
|
146
|
+
query_params = request.args.to_dict(flat=False)
|
|
147
|
+
result = database.get_reports_paginated(query_params)
|
|
148
|
+
return jsonify(result)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def _update_report_handler(database, report_id):
|
|
152
|
+
"""Handle PUT /reports/<report_id> request."""
|
|
153
|
+
try:
|
|
154
|
+
data = request.get_json()
|
|
155
|
+
status = data.get("status")
|
|
156
|
+
priority = data.get("priority")
|
|
157
|
+
report = database.get_report(report_id)
|
|
158
|
+
if not report:
|
|
159
|
+
return make_response(jsonify({"message": "Report not found"}), 404)
|
|
160
|
+
database.update_report(report_id, status=status, priority=priority)
|
|
161
|
+
except BadRequest:
|
|
162
|
+
logger.warning("Invalid JSON in report update endpoint")
|
|
163
|
+
return make_response(jsonify({"message": ERROR_INVALID_REQUEST_DATA}), 400)
|
|
164
|
+
except ReportNotFoundError as e:
|
|
165
|
+
logger.info("Report not found for update", extra={"uuid": e.uuid})
|
|
166
|
+
return make_response(jsonify({"message": "Report not found"}), 404)
|
|
167
|
+
except Exception:
|
|
168
|
+
logger.error("Error updating report", exc_info=True)
|
|
169
|
+
return make_response(jsonify({"message": ERROR_INTERNAL_ERROR}), 500)
|
|
170
|
+
return jsonify(database.get_report(report_id))
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def admin_pages(database, location_model) -> Blueprint:
|
|
174
|
+
"""Create and return the admin API blueprint.
|
|
175
|
+
|
|
176
|
+
Args:
|
|
177
|
+
database: Database instance for data operations
|
|
178
|
+
location_model: Pydantic model for location validation
|
|
179
|
+
|
|
180
|
+
Returns:
|
|
181
|
+
Blueprint: Flask blueprint with all admin endpoints
|
|
182
|
+
"""
|
|
183
|
+
admin_api_blueprint = Blueprint("admin_api", __name__, url_prefix="/api/admin")
|
|
184
|
+
|
|
185
|
+
spec = SpecTree(
|
|
186
|
+
"flask",
|
|
187
|
+
title="Goodmap Admin API",
|
|
188
|
+
version="0.1",
|
|
189
|
+
path="doc",
|
|
190
|
+
annotations=True,
|
|
191
|
+
naming_strategy=_clean_model_name,
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
@admin_api_blueprint.route("/locations", methods=["GET"])
|
|
195
|
+
@spec.validate()
|
|
196
|
+
def admin_get_locations():
|
|
197
|
+
"""Get paginated list of all locations for admin panel."""
|
|
198
|
+
return _get_locations_handler(database)
|
|
199
|
+
|
|
200
|
+
@admin_api_blueprint.route("/locations", methods=["POST"])
|
|
201
|
+
@spec.validate(resp=Response(HTTP_400=ErrorResponse))
|
|
202
|
+
def admin_create_location():
|
|
203
|
+
"""Create a new location (admin only)."""
|
|
204
|
+
return _create_location_handler(database, location_model)
|
|
205
|
+
|
|
206
|
+
@admin_api_blueprint.route("/locations/<location_id>", methods=["PUT"])
|
|
207
|
+
@spec.validate(resp=Response(HTTP_400=ErrorResponse, HTTP_404=ErrorResponse))
|
|
208
|
+
def admin_update_location(location_id):
|
|
209
|
+
"""Update an existing location (admin only)."""
|
|
210
|
+
return _update_location_handler(database, location_model, location_id)
|
|
211
|
+
|
|
212
|
+
@admin_api_blueprint.route("/locations/<location_id>", methods=["DELETE"])
|
|
213
|
+
@spec.validate(resp=Response(HTTP_404=ErrorResponse))
|
|
214
|
+
def admin_delete_location(location_id):
|
|
215
|
+
"""Delete a location (admin only)."""
|
|
216
|
+
return _delete_location_handler(database, location_id)
|
|
217
|
+
|
|
218
|
+
@admin_api_blueprint.route("/suggestions", methods=["GET"])
|
|
219
|
+
@spec.validate()
|
|
220
|
+
def admin_get_suggestions():
|
|
221
|
+
"""Get paginated list of location suggestions (admin only)."""
|
|
222
|
+
return _get_suggestions_handler(database)
|
|
223
|
+
|
|
224
|
+
@admin_api_blueprint.route("/suggestions/<suggestion_id>", methods=["PUT"])
|
|
225
|
+
@spec.validate(
|
|
226
|
+
json=SuggestionStatusRequest,
|
|
227
|
+
resp=Response(HTTP_400=ErrorResponse, HTTP_404=ErrorResponse, HTTP_409=ErrorResponse),
|
|
228
|
+
)
|
|
229
|
+
def admin_update_suggestion(suggestion_id):
|
|
230
|
+
"""Accept or reject a location suggestion (admin only)."""
|
|
231
|
+
return _update_suggestion_handler(database, suggestion_id)
|
|
232
|
+
|
|
233
|
+
@admin_api_blueprint.route("/reports", methods=["GET"])
|
|
234
|
+
@spec.validate()
|
|
235
|
+
def admin_get_reports():
|
|
236
|
+
"""Get paginated list of location reports (admin only)."""
|
|
237
|
+
return _get_reports_handler(database)
|
|
238
|
+
|
|
239
|
+
@admin_api_blueprint.route("/reports/<report_id>", methods=["PUT"])
|
|
240
|
+
@spec.validate(
|
|
241
|
+
json=ReportUpdateRequest,
|
|
242
|
+
resp=Response(HTTP_400=ErrorResponse, HTTP_404=ErrorResponse),
|
|
243
|
+
)
|
|
244
|
+
def admin_update_report(report_id):
|
|
245
|
+
"""Update a report's status and/or priority (admin only)."""
|
|
246
|
+
return _update_report_handler(database, report_id)
|
|
247
|
+
|
|
248
|
+
# Register Spectree with blueprint after all routes are defined
|
|
249
|
+
spec.register(admin_api_blueprint)
|
|
250
|
+
|
|
251
|
+
return admin_api_blueprint
|
goodmap/api_models.py
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""Pydantic models for API request/response validation.
|
|
2
|
+
|
|
3
|
+
This module defines request and response models for the Goodmap REST API.
|
|
4
|
+
These models are used by Spectree for automatic OpenAPI schema generation
|
|
5
|
+
and request/response validation.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from typing import Literal
|
|
9
|
+
|
|
10
|
+
from pydantic import BaseModel, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LocationReportRequest(BaseModel):
|
|
14
|
+
"""Request model for reporting a location issue."""
|
|
15
|
+
|
|
16
|
+
id: str = Field(..., description="Location UUID to report")
|
|
17
|
+
description: str = Field(..., min_length=1, description="Description of the problem")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class LocationReportResponse(BaseModel):
|
|
21
|
+
"""Response model for location report submission."""
|
|
22
|
+
|
|
23
|
+
message: str = Field(..., description="Success message")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class SuggestionStatusRequest(BaseModel):
|
|
27
|
+
"""Request model for updating suggestion status."""
|
|
28
|
+
|
|
29
|
+
status: Literal["accepted", "rejected"] = Field(
|
|
30
|
+
..., description="Status to set for the suggestion"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ReportUpdateRequest(BaseModel):
|
|
35
|
+
"""Request model for updating a report's status and priority."""
|
|
36
|
+
|
|
37
|
+
status: Literal["resolved", "rejected"] | None = Field(
|
|
38
|
+
None, description="New status for the report"
|
|
39
|
+
)
|
|
40
|
+
priority: Literal["critical", "high", "medium", "low"] | None = Field(
|
|
41
|
+
None, description="New priority for the report"
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class VersionResponse(BaseModel):
|
|
46
|
+
"""Response model for version endpoint."""
|
|
47
|
+
|
|
48
|
+
backend: str = Field(..., description="Backend version")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class CSRFTokenResponse(BaseModel):
|
|
52
|
+
"""Response model for CSRF token endpoint (deprecated)."""
|
|
53
|
+
|
|
54
|
+
csrf_token: str = Field(..., description="CSRF token")
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class PaginationParams(BaseModel):
|
|
58
|
+
"""Common pagination and filtering parameters."""
|
|
59
|
+
|
|
60
|
+
page: int | None = Field(None, ge=1, description="Page number (1-indexed)")
|
|
61
|
+
per_page: int | None = Field(None, ge=1, le=100, description="Items per page")
|
|
62
|
+
sort_by: str | None = Field(None, description="Field to sort by")
|
|
63
|
+
sort_order: Literal["asc", "desc"] | None = Field(None, description="Sort direction")
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class ClusteringParams(BaseModel):
|
|
67
|
+
"""Parameters for clustering request."""
|
|
68
|
+
|
|
69
|
+
zoom: int = Field(7, ge=0, le=16, description="Map zoom level for clustering")
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class ErrorResponse(BaseModel):
|
|
73
|
+
"""Standard error response."""
|
|
74
|
+
|
|
75
|
+
message: str = Field(..., description="Error message")
|
|
76
|
+
error: str | None = Field(None, description="Detailed error information")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class SuccessResponse(BaseModel):
|
|
80
|
+
"""Standard success response."""
|
|
81
|
+
|
|
82
|
+
message: str = Field(..., description="Success message")
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class BasicLocationInfo(BaseModel):
|
|
86
|
+
"""Basic location information (uuid + position)."""
|
|
87
|
+
|
|
88
|
+
uuid: str = Field(..., description="Location UUID")
|
|
89
|
+
position: tuple[float, float] = Field(
|
|
90
|
+
..., description="Location coordinates as (latitude, longitude)"
|
|
91
|
+
)
|
|
92
|
+
remark: bool = Field(False, description="Whether location has a remark")
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class ClusterInfo(BaseModel):
|
|
96
|
+
"""Cluster information for map display."""
|
|
97
|
+
|
|
98
|
+
uuid: str | None = Field(None, description="Location UUID (None for multi-point clusters)")
|
|
99
|
+
position: tuple[float, float] = Field(..., description="Cluster center coordinates")
|
|
100
|
+
count: int = Field(..., description="Number of locations in cluster")
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# Note: Full location model is dynamically created from LocationBase
|
|
104
|
+
# and cannot be statically defined here. API endpoints will use the
|
|
105
|
+
# dynamically created location_model passed to core_pages() function.
|
goodmap/core.py
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
+
"""Core data filtering and sorting utilities for location queries."""
|
|
2
|
+
|
|
1
3
|
from typing import Any, Dict, List
|
|
2
4
|
|
|
3
5
|
# TODO move filtering to db site
|
|
4
6
|
|
|
5
7
|
|
|
6
8
|
def does_fulfill_requirement(entry, requirements):
|
|
9
|
+
"""Check if an entry fulfills all category requirements.
|
|
10
|
+
|
|
11
|
+
Args:
|
|
12
|
+
entry: Location data entry to check
|
|
13
|
+
requirements: List of (category, values) tuples to match
|
|
14
|
+
|
|
15
|
+
Returns:
|
|
16
|
+
bool: True if entry matches all non-empty requirements
|
|
17
|
+
"""
|
|
7
18
|
matches = []
|
|
8
19
|
for category, values in requirements:
|
|
9
20
|
if not values:
|
|
@@ -13,6 +24,15 @@ def does_fulfill_requirement(entry, requirements):
|
|
|
13
24
|
|
|
14
25
|
|
|
15
26
|
def sort_by_distance(data: List[Dict[str, Any]], query_params: Dict[str, List[str]]):
|
|
27
|
+
"""Sort locations by distance from query coordinates.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
data: List of location dictionaries
|
|
31
|
+
query_params: Query parameters containing 'lat' and 'lon'
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
List[Dict[str, Any]]: Sorted data (or original if no coordinates provided)
|
|
35
|
+
"""
|
|
16
36
|
try:
|
|
17
37
|
if "lat" in query_params and "lon" in query_params:
|
|
18
38
|
lat = float(query_params["lat"][0])
|
|
@@ -25,6 +45,15 @@ def sort_by_distance(data: List[Dict[str, Any]], query_params: Dict[str, List[st
|
|
|
25
45
|
|
|
26
46
|
|
|
27
47
|
def limit(data, query_params):
|
|
48
|
+
"""Limit number of results based on query parameter.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
data: List of data to limit
|
|
52
|
+
query_params: Query parameters containing optional 'limit'
|
|
53
|
+
|
|
54
|
+
Returns:
|
|
55
|
+
Limited data (or original if no limit specified)
|
|
56
|
+
"""
|
|
28
57
|
try:
|
|
29
58
|
if "limit" in query_params:
|
|
30
59
|
limit = int(query_params["limit"][0])
|
|
@@ -36,6 +65,16 @@ def limit(data, query_params):
|
|
|
36
65
|
|
|
37
66
|
|
|
38
67
|
def get_queried_data(all_data, categories, query_params):
|
|
68
|
+
"""Filter, sort, and limit location data based on query parameters.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
all_data: Complete list of location data
|
|
72
|
+
categories: Available categories for filtering
|
|
73
|
+
query_params: Query parameters for filtering, sorting, and limiting
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
Filtered, sorted, and limited location data
|
|
77
|
+
"""
|
|
39
78
|
requirements = []
|
|
40
79
|
for key in categories.keys():
|
|
41
80
|
requirements.append((key, query_params.get(key)))
|