A python library to interact with the erasure protocol.
Project description
erasure.py
Python client for the erasure protocol
Erasure Protocol version: 1.2.0
Setup:
- Create & activate virtulenv (python 3.6+)
- Install the library using pypi.
pip install erasure
Usage:
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 inreceipt = feed.create_post(raw_data, key=key)
ERASURE_KEY_STORE/<proof_hash>
- Reveal a post:
key_cid, data_cid = post.reveal()
Development:
- Clone & enter the repo.
git clone https://github.com/ankitchiplunkar/erasure.py.git
- Install required libraries.
pip install -r requirements.txt
Testing:
- Launch a local version of erasure protocol via ganache
- Install, initlalize and run the ipfs daemon locally
ipfs daemon
- Run the tests locally
pytest -vv tests/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
erasure-0.0.4.tar.gz
(6.4 kB
view details)
File details
Details for the file erasure-0.0.4.tar.gz
.
File metadata
- Download URL: erasure-0.0.4.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c341b4a304a1ffda46b66b3b7bc36f278fbc68d77c99d0d583617864bdecfd20 |
|
MD5 | 0aaea9f479b6159a02c62a73b18f19ef |
|
BLAKE2b-256 | 985e748a3eed2a98959631da5864f16d585057fce310974f42bb3b75e6a68976 |