Helper classes to integrate psycopg2 with Vault
Project description
vault-psycopg2
Helper classes to integrate psycopg2 with Vault
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.6.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for vault_psycopg2-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40215581c818ad1b2ed5193f1c0faa14f6d5b8537c7e4fb1b08076e337a63dc0 |
|
MD5 | 4c34e94dab637e96cd46658c6792c9e9 |
|
BLAKE2b-256 | d41f6ec3e83cd3218f6ca3b4ef10ceeadd50ee8d14f5e08b6c300536b4fab197 |