vault-gatekeeper-client
Usage
pip install vault-gatekeeper-client
from vault_gatekeeper_client import VaultGatekeeperClient
gatekeeper = VaultGatekeeperClient(task_id='marathon_app_id',
gatekeeper_addr='https://my-vault-gatekeeper',
vault_addr='https://my-vault:8200',
secret_path='secret/test')
print(gatekeeper.secrets)
The statement above returns a dict of dicts based on the name of each file in the secret_path and the relevant keys within each file, for example:
secret/test/foo
key1: value1
key2: value2
secret/test/bar
key1: value1
key2: value2
Will return
{'foo': {'key1': 'value1', 'key2': 'value2'}, 'bar': {'key1': 'value1', 'key2': 'value2'}}
You can find an example app at https://github.com/jensendw/vault-gatekeeper-client-example-app along with deployment instructions
Contributing
- Fork it ( https://github.com/jensendw/vault-gatekeeper-client )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Run Tests
Tox will test compatibility for all python versions
pip install -r requirements.txt
tox