-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from ceb10n/features/parameter-store
Add Parameter Store Settings
- Loading branch information
Showing
13 changed files
with
329 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from .settings import SecretsManagerBaseSettings | ||
from .settings import ParameterStoreBaseSettings, SecretsManagerBaseSettings | ||
from .version import VERSION | ||
|
||
__all__ = [ "SecretsManagerBaseSettings" ] | ||
__all__ = ["ParameterStoreBaseSettings", "SecretsManagerBaseSettings"] | ||
|
||
__version__ = VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from typing import Any, List, Optional | ||
|
||
|
||
def get_ssm_name_from_annotated_field(metadata: List[Any]) -> Optional[str]: | ||
ssm_metadata = list( | ||
filter(_get_ssm_info_from_metadata, metadata) | ||
) | ||
|
||
if ssm_metadata: | ||
return ssm_metadata[0] | ||
|
||
return None | ||
|
||
|
||
def _get_ssm_info_from_metadata(metadata: Any) -> Optional[Any]: | ||
if isinstance(metadata, str): | ||
return metadata | ||
|
||
if isinstance(metadata, dict) and "ssm" in metadata.keys(): | ||
return metadata | ||
|
||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
VERSION = "0.0.1" | ||
VERSION = "0.0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.