Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/willcrichton/protojit

Protobuf autogenerator for Python
https://github.com/willcrichton/protojit

Last synced: 23 days ago
JSON representation

Protobuf autogenerator for Python

Awesome Lists containing this project

README

        

# protojit

Protojit is a small library for automatic serialization and deserialization (akin to `pickle`, `marshal`, and `json`) of Python data objects. It uses Protobuf to dynamically JIT compile a serializer for a given kind of data. Essentially, it typechecks an example of what your data looks like and generates the appropriate serializer for that type.

While this proof of concept works correctly, upon benchmarking, this library was not any faster during serialization or deserialization than `marshal`, so it did not succeed in the goal of being the fastest serializer. It does, however, generate files that are on average 2-4x smaller than the aforementioned comparison libraries (try running `bench.py`).