api-foundry-query-engine 0.0.2__tar.gz → 0.0.4__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.
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/PKG-INFO +1 -2
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/lambda_handler.py +1 -1
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/pyproject.toml +7 -1
- api_foundry_query_engine-0.0.2/api_foundry_query_engine/handler.py +0 -48
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/.gitignore +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/LICENSE +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/__init__.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/adapters/adapter.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/adapters/case_change_adapter.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/adapters/gateway_adapter.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/connectors/connection.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/connectors/connection_factory.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/connectors/oracle_connector.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/connectors/postgres_connection.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/dao/dao.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/dao/operation_dao.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/dao/sql_custom_query_handler.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/dao/sql_delete_query_handler.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/dao/sql_insert_query_handler.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/dao/sql_query_handler.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/dao/sql_select_query_handler.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/dao/sql_subselect_query_handler.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/dao/sql_update_query_handler.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/operation.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/services/service.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/services/transactional_service.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/utils/api_model.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/utils/app_exception.py +0 -0
- {api_foundry_query_engine-0.0.2 → api_foundry_query_engine-0.0.4}/api_foundry_query_engine/utils/logger.py +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: api-foundry-query-engine
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: The AWS lambda service handler use by the `api_foundry` project is a powerful tool designed to automate the deployment of REST APIs on AWS using Lambda services to access and interact with relational databases (RDBMS). This project leverages the OpenAPI specification to define and manage the APIs
|
|
5
5
|
Project-URL: Documentation, https://github.com/DanRepik/api-foundry
|
|
6
6
|
Project-URL: Source, https://github.com/DanRepik/api-foundry
|
|
7
7
|
Author-email: Daniel Repik <danrepik@icloud.com>
|
|
8
|
-
License-File: LICENSE
|
|
9
8
|
Classifier: Operating System :: OS Independent
|
|
10
9
|
Classifier: Programming Language :: Python :: 3.9
|
|
11
10
|
Requires-Python: >=3.9
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "api-foundry-query-engine"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.4"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Daniel Repik", email="danrepik@icloud.com" },
|
|
10
10
|
]
|
|
@@ -32,3 +32,9 @@ include = ["api_foundry_query_engine"]
|
|
|
32
32
|
|
|
33
33
|
[project.scripts]
|
|
34
34
|
|
|
35
|
+
[tool.pytest.ini_options]
|
|
36
|
+
markers = [
|
|
37
|
+
"unit: marks tests as unit tests that do not require a database",
|
|
38
|
+
"integration: marks tests that operate on a real database",
|
|
39
|
+
]
|
|
40
|
+
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
import logging
|
|
3
|
-
import os
|
|
4
|
-
import yaml
|
|
5
|
-
|
|
6
|
-
from api_foundry_query_engine.utils.app_exception import ApplicationException
|
|
7
|
-
from api_foundry_query_engine.utils.api_model import APIModel
|
|
8
|
-
|
|
9
|
-
from api_foundry_query_engine.adapters.gateway_adapter import GatewayAdapter
|
|
10
|
-
|
|
11
|
-
log = logging.getLogger(__name__)
|
|
12
|
-
|
|
13
|
-
api_model = None
|
|
14
|
-
adapter = GatewayAdapter()
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def lambda_handler(event, _):
|
|
18
|
-
log.debug(f"event: {event}")
|
|
19
|
-
try:
|
|
20
|
-
if not api_model:
|
|
21
|
-
with open(os.environ.get("API_SPEC", "/var/task/api_spec.yaml"), "r") as file:
|
|
22
|
-
api_model = APIModel(yaml.safe_load(file))
|
|
23
|
-
|
|
24
|
-
response = adapter.process_event(event)
|
|
25
|
-
|
|
26
|
-
# Ensure the response conforms to API Gateway requirements
|
|
27
|
-
return {
|
|
28
|
-
"isBase64Encoded": False,
|
|
29
|
-
"statusCode": 200,
|
|
30
|
-
"headers": {"Content-Type": "application/json"},
|
|
31
|
-
"body": json.dumps(response),
|
|
32
|
-
}
|
|
33
|
-
except ApplicationException as e:
|
|
34
|
-
log.error(f"exception: {e}", exc_info=True)
|
|
35
|
-
return {
|
|
36
|
-
"isBase64Encoded": False,
|
|
37
|
-
"statusCode": e.status_code,
|
|
38
|
-
"headers": {"Content-Type": "application/json"},
|
|
39
|
-
"body": json.dumps({"message": f"exception: {e}"}),
|
|
40
|
-
}
|
|
41
|
-
except Exception as e:
|
|
42
|
-
log.error(f"exception: {e}", exc_info=True)
|
|
43
|
-
return {
|
|
44
|
-
"isBase64Encoded": False,
|
|
45
|
-
"statusCode": 500,
|
|
46
|
-
"headers": {"Content-Type": "application/json"},
|
|
47
|
-
"body": json.dumps({"message": f"exception: {e}"}),
|
|
48
|
-
}
|
|
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
|