api-foundry 0.1.9__tar.gz → 0.1.11__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-0.1.9 → api_foundry-0.1.11}/PKG-INFO +1 -1
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/dao/dao.py +7 -2
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/dao/operation_dao.py +3 -1
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/dao/sql_subselect_query_handler.py +3 -1
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/iac/pulumi/api_foundry.py +2 -2
- api_foundry-0.1.11/api_foundry/scripts/install_secret.py +77 -0
- {api_foundry-0.1.9/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging → api_foundry-0.1.11}/api_foundry/utils/model_factory.py +3 -3
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/dao/dao.py +7 -2
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/dao/operation_dao.py +3 -1
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/dao/sql_subselect_query_handler.py +3 -1
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/iac/pulumi/api_foundry.py +13 -1
- {api_foundry-0.1.9 → api_foundry-0.1.11}/pyproject.toml +2 -1
- {api_foundry-0.1.9 → api_foundry-0.1.11}/.gitignore +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/LICENSE +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/__init__.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/adapters/adapter.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/adapters/case_change_adapter.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/adapters/gateway_adapter.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/cloudprints/archive_builder.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/cloudprints/hash_comparator.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/cloudprints/pulumi/lambda_.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/cloudprints/pulumi/log_group.pv +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/cloudprints/pulumi/rest_api.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/cloudprints/python_archive_builder.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/connectors/connection.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/connectors/connection_factory.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/connectors/oracle_connector.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/connectors/postgres_connection.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/dao/sql_custom_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/dao/sql_delete_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/dao/sql_insert_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/dao/sql_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/dao/sql_select_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/dao/sql_update_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/iac/gateway_spec.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/iac/handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/operation.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/scripts/postgres_to_openapi.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/services/service.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/services/transactional_service.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/utils/app_exception.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/utils/logger.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/api_foundry/utils/spec_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/__init__.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/adapters/adapter.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/adapters/case_change_adapter.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/adapters/gateway_adapter.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/cloudprints/archive_builder.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/cloudprints/hash_comparator.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/cloudprints/pulumi/lambda_.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/cloudprints/pulumi/log_group.pv +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/cloudprints/pulumi/rest_api.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/cloudprints/python_archive_builder.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/connectors/connection.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/connectors/connection_factory.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/connectors/oracle_connector.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/connectors/postgres_connection.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/dao/sql_custom_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/dao/sql_delete_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/dao/sql_insert_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/dao/sql_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/dao/sql_select_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/dao/sql_update_query_handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/iac/gateway_spec.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/iac/handler.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/operation.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/scripts/postgres_to_openapi.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/services/service.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/services/transactional_service.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/utils/app_exception.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/utils/logger.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging}/api_foundry/utils/model_factory.py +0 -0
- {api_foundry-0.1.9 → api_foundry-0.1.11}/examples/chinook-postgres-pulumi/temp/chinook_postgres-archive-builder-lambda/staging/api_foundry/utils/spec_handler.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: api-foundry
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.11
|
|
4
4
|
Summary: 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
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import abc
|
|
2
|
+
from typing import Union
|
|
2
3
|
|
|
3
4
|
from api_foundry.connectors.connection import Connection
|
|
4
5
|
from api_foundry.operation import Operation
|
|
@@ -9,10 +10,14 @@ class DAO(metaclass=abc.ABCMeta):
|
|
|
9
10
|
def __subclasshook__(cls, __subclass: type) -> bool:
|
|
10
11
|
return hasattr(__subclass, "execute") and callable(__subclass.execute)
|
|
11
12
|
|
|
12
|
-
def execute(
|
|
13
|
+
def execute(
|
|
14
|
+
self, connector: Connection, operation: Operation
|
|
15
|
+
) -> Union[list[dict], dict]:
|
|
13
16
|
raise NotImplementedError
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
class DAOAdapter(DAO):
|
|
17
|
-
def execute(
|
|
20
|
+
def execute(
|
|
21
|
+
self, connector: Connection, operation: Operation
|
|
22
|
+
) -> Union[list[dict], dict]:
|
|
18
23
|
return super().execute(connector, operation)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Union
|
|
2
|
+
|
|
1
3
|
from api_foundry.dao.sql_custom_query_handler import SQLCustomQueryHandler
|
|
2
4
|
from api_foundry.dao.sql_delete_query_handler import SQLDeleteSchemaQueryHandler
|
|
3
5
|
from api_foundry.dao.sql_insert_query_handler import SQLInsertSchemaQueryHandler
|
|
@@ -67,7 +69,7 @@ class OperationDAO(DAO):
|
|
|
67
69
|
)
|
|
68
70
|
return self._query_handler
|
|
69
71
|
|
|
70
|
-
def execute(self, cursor: Cursor) -> list[dict]
|
|
72
|
+
def execute(self, cursor: Cursor) -> Union[list[dict], dict]:
|
|
71
73
|
"""
|
|
72
74
|
Execute the database operation based on the provided cursor.
|
|
73
75
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from api_foundry.dao.sql_query_handler import SQLSchemaQueryHandler
|
|
2
4
|
from api_foundry.dao.sql_select_query_handler import SQLSelectSchemaQueryHandler
|
|
3
5
|
from api_foundry.operation import Operation
|
|
@@ -42,7 +44,7 @@ class SQLSubselectSchemaQueryHandler(SQLSelectSchemaQueryHandler):
|
|
|
42
44
|
return self.search_placeholders
|
|
43
45
|
|
|
44
46
|
@property
|
|
45
|
-
def sql(self) -> str
|
|
47
|
+
def sql(self) -> Optional[str]:
|
|
46
48
|
if len(self.select_list_columns) == 1: # then it only contains the key
|
|
47
49
|
return None
|
|
48
50
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import boto3
|
|
3
|
+
import json
|
|
4
|
+
|
|
5
|
+
from botocore.exceptions import ClientError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def create_secret_if_not_exists(secret_name, secret_value):
|
|
9
|
+
# Create a Secrets Manager client
|
|
10
|
+
client = boto3.client(
|
|
11
|
+
"secretsmanager", endpoint_url="http://localhost.localstack.cloud:4566"
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
# Check if the secret already exists
|
|
16
|
+
response = client.describe_secret(SecretId=secret_name)
|
|
17
|
+
return response["ARN"]
|
|
18
|
+
except client.exceptions.ResourceNotFoundException:
|
|
19
|
+
# Secret does not exist, proceed with creating it
|
|
20
|
+
try:
|
|
21
|
+
# Create the secret
|
|
22
|
+
response = client.create_secret(Name=secret_name, SecretString=secret_value)
|
|
23
|
+
print(f"Secret '{secret_name}' created successfully!")
|
|
24
|
+
return response["ARN"]
|
|
25
|
+
except ClientError as e:
|
|
26
|
+
print(f"Failed to create secret '{secret_name}': {e}")
|
|
27
|
+
return None
|
|
28
|
+
except ClientError as e:
|
|
29
|
+
print(f"Failed to check for secret '{secret_name}': {e}")
|
|
30
|
+
return None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def main():
|
|
34
|
+
parser = argparse.ArgumentParser(
|
|
35
|
+
description=(
|
|
36
|
+
"Create a secret containing database connection "
|
|
37
|
+
"configuration as a JSON string for API_Foundry."
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
parser.add_argument(
|
|
41
|
+
"--secret-name",
|
|
42
|
+
required=True,
|
|
43
|
+
help="The name of the secret to be created or checked.",
|
|
44
|
+
)
|
|
45
|
+
parser.add_argument(
|
|
46
|
+
"--engine",
|
|
47
|
+
required=True,
|
|
48
|
+
help="The type of database engine. Required, one of: mysql, oracle, postgres",
|
|
49
|
+
)
|
|
50
|
+
parser.add_argument("--host", required=True, help="The database host name")
|
|
51
|
+
parser.add_argument("--port", help="The database port. Optional, defaults to 5432.")
|
|
52
|
+
parser.add_argument("--database", required=True, help="The database name")
|
|
53
|
+
parser.add_argument("--user", required=True, help="The database user")
|
|
54
|
+
parser.add_argument("--password", required=True, help="The database password")
|
|
55
|
+
parser.add_argument(
|
|
56
|
+
"--schema", default="public", help="The database schema (default: public)"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
args = parser.parse_args()
|
|
60
|
+
|
|
61
|
+
secret_value = json.dumps(
|
|
62
|
+
{
|
|
63
|
+
"engine": args.engine,
|
|
64
|
+
"dbname": args.database,
|
|
65
|
+
"username": args.user,
|
|
66
|
+
"password": args.password,
|
|
67
|
+
"host": args.host,
|
|
68
|
+
"port": args.port,
|
|
69
|
+
"schema": args.schema,
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
create_secret_if_not_exists(args.secret_name, secret_value)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
if __name__ == "__main__":
|
|
77
|
+
main()
|
|
@@ -112,11 +112,11 @@ class SchemaObjectKey(SchemaObjectProperty):
|
|
|
112
112
|
):
|
|
113
113
|
super().__init__(operation_id, name, properties, spec)
|
|
114
114
|
self.key_type = self.get("x-af-primary-key", default="auto")
|
|
115
|
-
if self.key_type not in ["
|
|
115
|
+
if self.key_type not in ["manual", "uuid", "auto", "sequence"]:
|
|
116
116
|
raise ApplicationException(
|
|
117
117
|
500,
|
|
118
|
-
"Invalid primary key type must be one of
|
|
119
|
-
+ f"
|
|
118
|
+
"Invalid primary key type must be one of auto, uuid, "
|
|
119
|
+
+ f"manual, sequence. schema_object: {self.operation_id}, "
|
|
120
120
|
+ f"property: {self.name}, type: {self.type}",
|
|
121
121
|
)
|
|
122
122
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import abc
|
|
2
|
+
from typing import Union
|
|
2
3
|
|
|
3
4
|
from api_foundry.connectors.connection import Connection
|
|
4
5
|
from api_foundry.operation import Operation
|
|
@@ -9,10 +10,14 @@ class DAO(metaclass=abc.ABCMeta):
|
|
|
9
10
|
def __subclasshook__(cls, __subclass: type) -> bool:
|
|
10
11
|
return hasattr(__subclass, "execute") and callable(__subclass.execute)
|
|
11
12
|
|
|
12
|
-
def execute(
|
|
13
|
+
def execute(
|
|
14
|
+
self, connector: Connection, operation: Operation
|
|
15
|
+
) -> Union[list[dict], dict]:
|
|
13
16
|
raise NotImplementedError
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
class DAOAdapter(DAO):
|
|
17
|
-
def execute(
|
|
20
|
+
def execute(
|
|
21
|
+
self, connector: Connection, operation: Operation
|
|
22
|
+
) -> Union[list[dict], dict]:
|
|
18
23
|
return super().execute(connector, operation)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Union
|
|
2
|
+
|
|
1
3
|
from api_foundry.dao.sql_custom_query_handler import SQLCustomQueryHandler
|
|
2
4
|
from api_foundry.dao.sql_delete_query_handler import SQLDeleteSchemaQueryHandler
|
|
3
5
|
from api_foundry.dao.sql_insert_query_handler import SQLInsertSchemaQueryHandler
|
|
@@ -67,7 +69,7 @@ class OperationDAO(DAO):
|
|
|
67
69
|
)
|
|
68
70
|
return self._query_handler
|
|
69
71
|
|
|
70
|
-
def execute(self, cursor: Cursor) -> list[dict]
|
|
72
|
+
def execute(self, cursor: Cursor) -> Union[list[dict], dict]:
|
|
71
73
|
"""
|
|
72
74
|
Execute the database operation based on the provided cursor.
|
|
73
75
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from api_foundry.dao.sql_query_handler import SQLSchemaQueryHandler
|
|
2
4
|
from api_foundry.dao.sql_select_query_handler import SQLSelectSchemaQueryHandler
|
|
3
5
|
from api_foundry.operation import Operation
|
|
@@ -42,7 +44,7 @@ class SQLSubselectSchemaQueryHandler(SQLSelectSchemaQueryHandler):
|
|
|
42
44
|
return self.search_placeholders
|
|
43
45
|
|
|
44
46
|
@property
|
|
45
|
-
def sql(self) -> str
|
|
47
|
+
def sql(self) -> Optional[str]:
|
|
46
48
|
if len(self.select_list_columns) == 1: # then it only contains the key
|
|
47
49
|
return None
|
|
48
50
|
|
|
@@ -13,6 +13,7 @@ from api_foundry.utils.model_factory import ModelFactory
|
|
|
13
13
|
|
|
14
14
|
log = logger(__name__)
|
|
15
15
|
|
|
16
|
+
|
|
16
17
|
class APIFoundry(ComponentResource):
|
|
17
18
|
def __init__(
|
|
18
19
|
self,
|
|
@@ -28,7 +29,7 @@ class APIFoundry(ComponentResource):
|
|
|
28
29
|
assert "secrets" in props, "Missing secrets map"
|
|
29
30
|
|
|
30
31
|
# Dynamically obtain the path to the `api_foundry` package
|
|
31
|
-
with pkg_resources.path(
|
|
32
|
+
with pkg_resources.path("api_foundry", "__init__.py") as p:
|
|
32
33
|
api_foundry_source = str(Path(p).parent)
|
|
33
34
|
|
|
34
35
|
self.archive_builder = PythonArchiveBuilder(
|
|
@@ -83,4 +84,15 @@ class APIFoundry(ComponentResource):
|
|
|
83
84
|
body=body,
|
|
84
85
|
)
|
|
85
86
|
|
|
87
|
+
deployment = aws.apigateway.Deployment(
|
|
88
|
+
f"{name}-deployment", rest_api=gateway.id
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
aws.apigateway.Stage(
|
|
92
|
+
f"{name}-stage",
|
|
93
|
+
rest_api=gateway.id,
|
|
94
|
+
deployment=deployment.id,
|
|
95
|
+
stage_name=name,
|
|
96
|
+
)
|
|
97
|
+
|
|
86
98
|
export("gateway-api", gateway.id)
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "api-foundry"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.11"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Daniel Repik", email="danrepik@icloud.com" },
|
|
10
10
|
]
|
|
@@ -37,6 +37,7 @@ include = ["api_foundry"]
|
|
|
37
37
|
|
|
38
38
|
[tool.hatch.metadata.scripts]
|
|
39
39
|
postgres_to_openapi = "api_foundry.scripts.postgres_to_openapi:main"
|
|
40
|
+
install_secret = "api_foundry.scripts.install_secret:main"
|
|
40
41
|
|
|
41
42
|
[tool.pytest.ini_options]
|
|
42
43
|
markers = [
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|