This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


Chef style Databag Storage

Supports plain text and encrypted databags.

A data bag is an object with two properties:

* _id
* data

The _\_id_ represent the databag name and _data_ contains the data we want to store in the databag.


python sdist
pip install ./dist/vaultlib-0.0.1.tar.gz


pip install vaultlib



* add_databag()
* get_databag()
* delete_databag()
* list_databags()


* encrypt()
* decrypt()


* from_file()
* from_data()

##Library Usage

### Create encryption key

To encrypt a databag we need a key:

openssl genrsa -out my_key.pem 4096

### Initialize the Vault

couchdb_host = ''
couchdb_port = 6984
couchdb_database = 'databags'

vault = Vault('http', couchdb_host, couchdb_port, couchdb_database)

### Create a databag

databag_data = {
"foo": "bar",
"and": {
"foo": "bar"

databag_name = ""
databag = Databag(databag_name, databag_data)

### Encrypt databag (optional)

key_file = "mykey.pem"
pk = Key(filename=key_file).private

### Store databag in the Vault


### Retrieve data bag from the vault

databag_name = ""
databag = vault.get_databag(databag_name)

data =
id_ =

### Decrypt databag (optional)

key_file = "mykey.pem"
pk = Key(filename=key_file).private

data =
id_ =

### List all databags

for databag in vault.list_databags():

##Cli Usage

Required environment variables:

export VAULT_PROTOCOL=http
export VAULT_HOST=''
export VAULT_PORT=5984
export VAULT_DATABASE='vault'


vault-cli --help


usage: vault-cli [-h] [--databag DATABAG] [--key KEY] [cmd [cmd ...]]

Manage databags

positional arguments:
cmd [add, list, show]

optional arguments:
-h, --help show this help message and exit
--databag DATABAG specify .json databag
--key KEY specify encryption key

__Add databag__

vault-cli add --databag databag.json

vault-cli add --databag databag.json --key /my/path/key.pem

__List databag__

vault-cli list

__Show databag__

vault-cli show databag_name

vault-cli show databag_name --key /my/path/key.pem

__Delete databag__

vault-cli delete databag_name

## v0.0.1:
* super rought prototype (Initial release)
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
vaultlib-0.0.1.tar.gz (5.0 kB) Copy SHA256 Checksum SHA256 Source Aug 22, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting