Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niranjan94/vault-psycopg2
Helper classes to integrate psycopg2 with Vault
https://github.com/niranjan94/vault-psycopg2
Last synced: about 2 months ago
JSON representation
Helper classes to integrate psycopg2 with Vault
- Host: GitHub
- URL: https://github.com/niranjan94/vault-psycopg2
- Owner: niranjan94
- License: mit
- Created: 2018-11-12T10:36:12.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-26T10:04:22.000Z (over 5 years ago)
- Last Synced: 2024-11-29T03:44:29.716Z (2 months ago)
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.com/niranjan94/vault-psycopg2.svg?branch=master)](https://travis-ci.com/niranjan94/vault-psycopg2) [![PyPI version](https://badge.fury.io/py/vault-psycopg2.svg)](https://badge.fury.io/py/vault-psycopg2)
### vault-psycopg2
> Helper classes to integrate psycopg2 with Vault
#### Usage:
```bash
pip install vault-psycopg2
``````python
from vault_psycopg2 import VaultPsycopgvp = 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:
```python
vault_config={
'server': 'http://127.0.0.1:8200',
'connection_mode': 'token',
'token': '5daa3d21-4e21-4bd5-8978-fcb81e658d8b'
}
``````python
vault_config={
'server': 'http://127.0.0.1:8200',
'connection_mode': 'userpass',
'username': 'john.doe',
'password': 'xyzzyabc'
}
```