Helper classes to integrate psycopg2 with Vault
Project description
vault-psycopg2
Helper classes to integrate psycopg2 with Vault
Note: WIP. Ugly code. May or may not work.
Usage:
pip install vault-psycopg2
from vault_psycopg2 import VaultPsycopg
vp = VaultPsycopg(
database_config={
'host': 'localhost',
'dbname': 'name_of_database'
},
vault_config={
'server': 'http://127.0.0.1:8200',
'connection_mode': 'ec2',
'nonce': '5daa3d21-4e21-4bd5-8978-fcb81e658d8b',
'role': 'some-instance'
}
)
# An instance of psycopg2.connection that is properly authenticated
vp.connection
Other examples of vault config:
vault_config={
'server': 'http://127.0.0.1:8200',
'connection_mode': 'token',
'token': '5daa3d21-4e21-4bd5-8978-fcb81e658d8b'
}
vault_config={
'server': 'http://127.0.0.1:8200',
'connection_mode': 'userpass',
'username': 'john.doe',
'password': 'xyzzyabc'
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vault-psycopg2-0.1.5.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for vault_psycopg2-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e28a0bc0ecdbedd54d9482529f71488b04ceee3a3c77d11b0054d613c40976cc |
|
MD5 | e6cd0c92e423be016ed03bc382bc7f3e |
|
BLAKE2b-256 | 181e9a2e5b773e7dc424bcabc39ef03909b75840a4e64ce9de237286955d22c8 |