Skip to main content

An IPLD implementation in Python

Project description

https://img.shields.io/pypi/v/ipld.svg https://img.shields.io/travis/bigchaindb/py-ipld.svg https://img.shields.io/codecov/c/github/bigchaindb/py-ipld/master.svg

py-ipld

Python implementation of the IPLD specification.

Status

For TODOs, see: #1 <https://github.com/bigchaindb/py-ipld/issues/1>

Installation

$ pip install ipld

Usage

In the Python REPL:

>>> from ipld import marshal, multihash, unmarshal
>>>
>>> file = {
... 'name': 'hello.txt',
... 'size': 11
... }
>>>
>>> marshalled = marshal(file)
>>>
>>> multihash(marshalled)
'QmQtX5JVbRa25LmQ1LHFChkXWW5GaWrp7JpymN4oPuBSmL'
>>>
>>> unmarshal(marshal(file)) == file
True

That’s it. No readthedocs, no private methods :boom:.

Tests

Only relevant, if you want to help developing.

$ pip install -e .[dev]
$ py.test -v

Acknowledgements

Thanks to the contributors over at BigchainDB for letting me take their setup structure.

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

planetmint-ipld-0.0.3.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file planetmint-ipld-0.0.3.tar.gz.

File metadata

  • Download URL: planetmint-ipld-0.0.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for planetmint-ipld-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6effc20e671e01366cb579663809759c6c4ea1ec8e6bcb9278768cd3f7f64243
MD5 10d7652273650b81aad8ca5b9d4b6836
BLAKE2b-256 148190fc4f86c8c0b7a52a2ca796082434eacaaddc83607b43a9ac5871fe86fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page