Skip to main content

Easy way to handle platform secrets.

Project description


Black Holes is a simple way to handle your projects secrets using a database or

IMPORTANT: Work-in-Progress. Beta version. Non production software.


Installing from Pip

(pyenv) $ pip install blackhole

Installing from sources:

(pyenv) $ cd black_holes
(pyenv) $ python install



Database BlackHole based

simple usage db-black-hole

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
# >>> value

Advanced usage db-black-hole:

Encrypted {'key': 'values'} storage.

from black_holes import SqliteBlackHole

# Create a new SqliteBlackHole instance
# By default AES password is `qwerty12345678`
near_black_hole = SqliteBlackHole()

# Create a new custom password_callback function
my_pass = lambda instance: 'my-very-poor-password'
near_black_hole = SqliteBlackHole(password_callback=my_pass)

# Create a AES Encrypted key
near_black_hole['encrypted_key'] = 'it is a secret'

# Encrypted value
# >>> Encrypted Value

# Decrypted value
# >>> Decrypted Value

ConsulBlackHole BlackHole based

Simple usage consul-black-hole

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
# >>> value

Made it with ❤ by DTecDeal

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for black-holes, version 0.0.32
Filename, size File type Python version Upload date Hashes
Filename, size black_holes-0.0.32-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size black_holes-0.0.32.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page