Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'example:': 0.03; 'subject:Python': 0.06; 'json': 0.07; 'http': 0.09; 'api': 0.11; 'python': 0.11; 'bit.': 0.16; 'burak': 0.16; 'dictionaries': 0.16; 'from:addr:arskom.com.tr': 0.16; 'from:addr:burak.arslan': 0.16; 'from:name:burak arslan': 0.16; 'json,': 0.16; 'message- id:@arskom.com.tr': 0.16; 'received:arskomhosting.com': 0.16; 'subject:object': 0.16; 'subject:security': 0.16; 'well-known': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'mon,': 0.24; "i've": 0.25; '15,': 0.26; 'possibly': 0.26; 'post': 0.26; 'header :In-Reply-To:1': 0.27; 'chris': 0.29; 'on,': 0.29; 'document.': 0.30; 'strongly': 0.30; 'then.': 0.30; 'especially': 0.30; 'module.': 0.36; 'hi,': 0.36; 'project': 0.37; 'implement': 0.38; 'system,': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'structure': 0.39; 'to:addr:python.org': 0.39; 'numbers': 0.61; 'choose': 0.64; 'more': 0.64; 'services.': 0.70; 'jul': 0.74; 'transfer': 0.82; 'compact,': 0.84; 'url:true': 0.84; '2013': 0.98 Date: Mon, 15 Jul 2013 13:50:10 +0100 From: Burak Arslan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130711 Thunderbird/17.0.7 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python - remote object protocols and security References: <142271145.8401649.1373891187398.JavaMail.root@sequans.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1373892986 news.xs4all.nl 15921 [2001:888:2000:d::a6]:47583 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50680 Hi, On 07/15/13 13:30, Chris Angelico wrote: > On Mon, Jul 15, 2013 at 10:26 PM, Jean-Michel Pichavant > wrote: >> Basically, I need to transfer numbers (int). Possibly dictionaries like {string: int} in order to structure things a little bit. > I strongly recommend JSON, then. It's a well-known system, it's > compact, it's secure, and Python comes with a json module. > Especially for numbers, MessagePack is more efficient. Its API is identical to Json, so it's almost a drop-in replacement. A project that I've been working on, Spyne, is designed to implement public RPC services. It supports both Json and MessagePack. Here's the json example: http://spyne.io/#inprot=JsonDocument&outprot=JsonDocument&s=rpc&tpt=WsgiApplication&validator=true If you choose to use MessagePack, you must HTTP POST the MessagePack document the same way you'd POST the json document. Best regards, Burak