Skip to main content

Like Blockchain But Tastier™️

Project description

sausagelink

GitHub Travis PyPI Downloads

About

sausagelink is like Blockchain, but tastier. The package allows you to maintain a Link (chain) of Sausage (blocks) such that the data contained within each Sausage and the order of the Link cannot be tampered with.

Usage

from sausagelink import Sausage, Link

link = Link()
link.append('Hello, World!')
link.append(2019)
link.append({'foo': 'bar'})

print(link)
# [⎨0⎬, ⎨1⎬, ⎨2⎬, ⎨3⎬]

print([sausage.data for sausage in link])
# [None, 'Hello, World!', 2019, {'foo': 'bar'}]

link.refrigerate('foo.sl')
del link
link = Link('foo.sl')

print([sausage.data for sausage in link])
# [None, 'Hello, World!', 2019, {'foo': 'bar'}]

Audit

print(link.rancid())
# []

sausage = link[2]
print(sausage.data)
# 2019
print(sausage.rancid())
# False

sausage.data = 2020
print(sausage.rancid())
# True

print(link.rancid())
# ['⎨2⎬']

Install

pip install sausagelink

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 sausagelink, version 1.5.1
Filename, size File type Python version Upload date Hashes
Filename, size sausagelink-1.5.1.tar.gz (3.1 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