A python library to interact with the erasure protocol.
Python client for the erasure protocol
Erasure Protocol version:
- Create & activate virtulenv (python 3.6+)
- Install the library using pypi.
pip install erasure
The client is built to replicate the usage here.
- Update the settings by configuring the appropriate enviornment variables.
- Initialize a client:
erasure_client = ErasureClient(w3, mode, version)
- Create a feed:
feed = Feed(erasure_client=erasure_client, feed_address=FEED_ADDRESS)
- Submit a post:
Note: The encryption keys, and data for this post will be saved in
receipt = feed.create_post(raw_data, key=key)
- Reveal a post:
key_cid, data_cid = post.reveal()
- Clone & enter the repo.
git clone https://github.com/ankitchiplunkar/erasure.py.git
- Install required libraries.
pip install -r requirements.txt
- Launch a local version of erasure protocol via ganache
- Install, initlalize and run the ipfs daemon locally
- Run the tests locally
pytest -vv tests/
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.