pinnaculum / py-multiformats-cid

Self-describing content-addressed identifiers for distributed systems implementation in Python (fork of the deprecated ipld/py-cid)
MIT License
6 stars 1 forks source link

pure python support for dag-cbor, dag-json or dag-pb codecs? #6

Closed monperrus closed 10 months ago

monperrus commented 1 year ago

Thanks a lot for the great repo.

I'm looking for a pure python implementation of codecs dag-cbor, dag-json or dag-pb.

To my surprise, I don't find any. The closest I found is @odesenfans'https://github.com/aleph-im/py-ipfs-cid, which is great. However, it is not pure-python, it depends on Rust and a rust toolchain on the target machine.

Have you ever seen a pure python implementation of dag-json anywhere?

Thanks!

pinnaculum commented 1 year ago

Hi @monperrus,

Thank you, although the original author deserves all the credit :)

I've found this python package that implements the dag-cbor codec, it seems to be pure python. dag-json is pretty easy to write on your own, for dag-pb you have to use the protobuf library to do the encoding/decoding, i haven't found a library that does that. I haven't yet come across a pure python package that implements all these dag formats.

monperrus commented 1 year ago

Thanks a lot @pinnaculum for the link to the library supporting dab-cbor, it's super useful.