Skip to main content

an implementation for hessian2

Project description

pyhessian2 is implemented for serialize and deserialize data in hessian2 protocol.

Usage

>>> # encoding
>>> from pyhessian2 import HessianObject, Encoder
>>> attrs = {
        "name": "xx",
        "age": 20,
    }
>>> obj = HessianObject("com.xx.person", attrs)
>>> data = Encoder().encode(obj)
>>> print "%r" % data
>>> # decoding
>>> from pyhessian2 import Decoder
>>> data = ...  # a hessian bytes data
>>> obj = Decoder().decoder(data)  # get a Hessianobject instance
>>> print obj  # print json serialized data

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

pyhessian2-1.1.3.tar.gz (7.1 kB view hashes)

Uploaded Source

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