Skip to content

Commit 3a6e49f

Browse files
committed
Version 2.0.0 - Vault Support
### Changed - Pip installation now requires you to specify optional dependencies with either `pip install fidelius[aws]` for AWS Parameter Store support, `pip install fidelius[vault]` for Hashicorp Vault support or `pip install fidelius[aws,vault]` for both.
1 parent bf0da88 commit 3a6e49f

File tree

5 files changed

+39
-12
lines changed

5 files changed

+39
-12
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
9+
## [2.0.0] - 2024-11-04
10+
11+
### Changed
12+
13+
- Pip installation now requires you to specify optional dependencies with either
14+
`pip install fidelius[aws]` for AWS Parameter Store support,
15+
`pip install fidelius[vault]` for Hashicorp Vault support or
16+
`pip install fidelius[aws,vault]` for both.
17+
18+
819
## [2.0.0-dev.1] - 2024-05-16
920

1021
### Added

fidelius/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '2.0.0-dev.1'
1+
__version__ = '2.0.0'
22

33
__author__ = 'Thordur Matthiasson <thordurm@ccpgames.com>'
44
__license__ = 'MIT License'

fidelius/gateway/paramstore/_paramstorerepo.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@
55
from fidelius.structs import *
66
from fidelius.gateway._abstract import *
77

8-
9-
import boto3
108
import os
119

1210
import logging
1311
log = logging.getLogger(__name__)
1412

13+
try:
14+
import boto3
15+
except ImportError:
16+
log.error('You are trying to use the AwsParamStoreRepo without boto3 installed.')
17+
log.error('Please amend your pip install to `fidelius[aws]` to include boto3 dependencies.')
18+
raise
19+
1520

1621
class AwsParamStoreRepo(_BaseFideliusRepo):
1722
def __init__(self, app_props: FideliusAppProps,
18-
aws_access_key_id: str = None,
19-
aws_secret_access_key: str = None,
20-
aws_key_arn: str = None,
21-
aws_region_name: str = None,
22-
aws_endpoint_url: str = None,
23+
aws_access_key_id: Optional[str] = None,
24+
aws_secret_access_key: Optional[str] = None,
25+
aws_key_arn: Optional[str] = None,
26+
aws_region_name: Optional[str] = None,
27+
aws_endpoint_url: Optional[str] = None,
28+
aws_profile_name: Optional[str] = None,
2329
flush_cache_every_time: bool = False,
2430
**kwargs):
2531
"""Fidelius Admin Repo that uses AWS' Simple Systems Manager's Parameter Store as a back end.
@@ -45,6 +51,7 @@ def __init__(self, app_props: FideliusAppProps,
4551
testing and development, e.g. by spinning up a
4652
LocalStack container and pointing to that
4753
instead of a live AWS environment.
54+
:param aws_profile_name: ....add this @TODO
4855
:param flush_cache_every_time: Optional flat that'll flush the entire
4956
cache before every operation if set to
5057
True and is just intended for testing

fidelius/gateway/vault/_client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@
33
]
44
from fidelius.structs import *
55
from ._structs import *
6-
import hvac
7-
86

97
import logging
108
log = logging.getLogger(__file__)
119

1210

11+
try:
12+
import hvac
13+
except ImportError:
14+
log.error('You are trying to use the VaultKeyValRepo without hvac installed.')
15+
log.error('Please amend your pip install to `fidelius[vaulst]` to include hvac dependencies.')
16+
raise
17+
18+
1319
class VaultGateway:
1420
def __init__(self, url: str, token: str, verify: bool = True, timeout: int = 30, namespace: Optional[str] = None):
1521
self._client = hvac.Client(url=url, token=token, verify=verify, timeout=timeout, namespace=namespace)

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ classifiers = [
3535
]
3636
dependencies = [
3737
"ccptools >=1.1, <2",
38-
"boto3 >=1.20, <2",
39-
"havc >= 2.2, <3"
4038
]
4139

40+
[project.optional-dependencies]
41+
vault = ["havc >= 2.2, <3"]
42+
aws = ["boto3 >=1.20, <2"]
43+
44+
4245
[project.urls]
4346
Homepage = "https://github.com/ccpgames/fidelius"
4447
Documentation = "https://github.com/ccpgames/fidelius/blob/main/README.md"

0 commit comments

Comments
 (0)