About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

linux default iconextprot Publisher's description

Compact, efficient, extensible binary serialization format

extprot is a compact, extensible and efficient binary serialization format.

This is a python implementation of the 'extprot' serialization scheme, the details of which are descripted in detail at:


Similar to Google's Protocol Buffers and Apache Thrift, extprot allows the definition of structured data "messages". Messages are essentially a set of typed key-value pairs that can be efficiently serialized to/from a compact binary format, and are defined in a language-neutral "protocol" file. Here's a simple example of an extprot message:

message person = {
id: int;
name: string;
emails: [ string ]

Here the 'person' message contains three fields: 'id' is an integer, 'name' is a string, and 'emails' is a list of strings. Such protocol descriptions are compiled into a set of Python classes that can be manipulated using standard syntax and idioms. If the above protocol is recorded in the file "person.proto", here's a simple example of how it might be used:

>>> extprot.import_protocol("person.proto",globals())
>>> p1 = person(1,"Guido")
>>> print p1.emails # fields use a sensible default if possible
>>> p1.emails.append("guido@python.org")
>>> p1.emails.append(7) # all fields are dynamically typechecked
Traceback (mosts recent call last):
ValueError: not a valid String: 7
>>> print repr(p1.to_string())
>>> print person.from_string(p1.to_string()).name

Extprot compares favourably to related serialization technologies:

* powerful type system; strongly-typed tuples and lists, tagged disjoint unions, parametric polymorphism.
* self-delimitng data; all serialized messages indicate their length, allowing easy streaming and skipping of messages.
* self-describing data; the 'skeleton' of a message can be reconstructed without having the protocol definition.
* compact binary format; comparable to protocol-buffers/thrift, but with some overhead due to self-delimiting nature.

These features combine to make extprot strongly extensible, often allowing messages to maintain backward *and* forward compatibility across protocol extensions that include: adding fields to a message, adding elements to a tuple, adding cases to a disjoint union, and promoting a primitive type into a tuple, list or union.


System Requirements:

В· Python
Program Release Status:
Program Install Support: Install and Uninstall

Is extprot your software?

Manage your software

Most Popular

linux default icon GDB 7.4
GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it... Read more
linux default icon Coral 0.9.1
Coral is a tool and a development platform to create and transform models and modeling languages.
linux default icon Forum Paid Plus Script 6.1
Forum Paid Pay Per Post Exchange is targeted at forum owners who wish to...
linux default icon sdo 0.6.5
Converts oracle SDO_GEOMETRY objects to WKT and GeoJSON.
linux default icon Get Paid Plus Script 6.1
Get Paid Plus Script

Related Category

» Other (877)
» Tools & Editors (359)
» Web Development (146)