Go ahead!

Memoization for Everything

Released MessagePack RPC Python 0.2.0

| Comments

Source package is here.

The main feature is MessagePack RPC Server support.
Example is below:

1
2
3
4
5
6
7
8
9
import msgpackrpc

class SumServer:
  def sum(x, y):
    return x + y

server = msgpackrpc.Server(SumServer())
server.listen(msgpackrpc.Address("localhost", 10000))
server.start()

You can use Client to access this server:

1
2
client = msgpackrpc.Client(msgpackrpc.Address("localhost", 10000))
client.call("sum", 1, 2) # => 3

Other improvements

  • Support Python 3 (tested with Python 3.2.2)
  • Add notify request to Client
  • Add (un)pack_encoding option for MessagePack (de)serializer

TODO

Current implementaion lacks some features compared to Ruby implementaion. I will add new features, e.g. advanced return, async return, etc. In addition, I will refactor the internal architecture.

Comments