Easy way to handle platform secrets.
Project description
BlackHoles
Black Holes is a simple way to handle your projects secrets using a database
or Consul.io
.
IMPORTANT: Work-in-Progress. Beta version. Non production software.
Install
Installing from Pip
(pyenv) $ pip install blackhole
Installing from sources
:
(pyenv) $ cd black_holes
(pyenv) $ python setup.py install
Usage:
SqliteBlackHole
Database BlackHole based
simple usage
Plain {'key': 'values'}
storage.
from black_holes import SqliteBlackHole
# Create a new SqliteBlackHole instance
near_black_hole = SqliteBlackHole()
# Create a key called "key" with value "value"
near_black_hole['key'] = 'value'
# print key
print(near_black_hole['key'])
# >>> value
Advanced usage:
Encrypted {'key': 'values'}
storage.
from black_holes import SqliteBlackHole
# Create a new SqliteBlackHole instance
near_black_hole = SqliteBlackHole()
# Create a AES Encrypted key
near_black_hole['encrypted_key'] = 'it is a secret'
# Encrypted value
print(near_black_hole['key'])
# >>> Encrypted Value
# Decrypted value
print(near_black_hole['decrypted_key'])
# >>> Decrypted Value
ConsulBlackHole
Consul.io BlackHole based
Simple usage
Plain {'key': 'values'}
storage.
from black_holes import ConsulBlackHole
# Create a new DEV ConsulBlackHole instance
remote_black_hole = ConsulBlackHole()
# You can also creates a new ConsulBlackHole instance using consul auth token
# remote_black_hole = ConsulBlackHole(token='{consul-io-token}')
# Create a key called "key" with value "value"
remote_black_hole['key']= 'value'
# print key
print(remote_black_hole['key'])
# >>> value
Made it with ❤ by DTecDeal
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
black_holes-0.0.3b0.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for black_holes-0.0.3b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04c345aceeb16d9812aa7624cdf938c55c2602857ddda1b669bbb53197f06b0c |
|
MD5 | cda44bbc2653601fb367d93d4ed72328 |
|
BLAKE2b-256 | 3e620c90b0de2407cd80edcf62b6bc64d79c2239245b17f070b86282f42044f4 |