pylibswarm

Python3 wrapper for libswarm-ng
git clone git://git.defalsify.org/pylibswarm.git
Log | Files | Refs | Submodules | README | LICENSE

README (1066B)


      1 Prepare:
      2 
      3 $ git submodule update --init --recursive
      4 
      5 
      6 Build:
      7 
      8 $ python setup.py build -f
      9 
     10 
     11 Try it out:
     12 
     13 $ virtualenv .venv
     14 $ . .venv/bin/activate
     15 $ python setup.py install -f
     16 
     17 # pass some data to the BMT hasher:
     18 $ python pylibswarm/runnable/bmt.py foo
     19 2387e8e7d8a48c2a9339c97c1dc3461a9a7aa07e994c5cb8b38fd7c1b3e6ea48
     20 
     21 # pass a file to the file hasher:
     22 $ python pylibswarm/runnable/file.py LICENSE
     23 5e503a0bed8176559c87e9e245d4a67fe32410a363c884f9b9ebb8972291ad81
     24 
     25 # output chunks, too
     26 $ python pylibswarm/runnable/file.py -vv -o chunkdir LICENSE
     27 
     28 # other options
     29 $ python pylibswarm/runnable/file.py --help
     30 
     31 # create an soc chunk
     32 $ python pylibswarm/runnable/soc.py --topic-string foo --index-string bar baz
     33 
     34 # create and output an soc chunk
     35 $ python pylibswarm/runnable/soc.py --topic-string foo --index-string bar -o outdir baz
     36 
     37 # generate soc identifier
     38 $ python pylibswarm/runnable/soc.py --topic-string foo --index-string bar --id
     39 
     40 
     41 This project has been sponsered by a [Swarm grant](https://www.ethswarm.org/#section-ecosystem).
     42 
     43 It is licensed under GPLv3.