Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(21)  |  Call(19)  |  Derive(0)  |  Import(2)

src/b/l/bluepass-HEAD/bluepass/frontends/qt/qjsonrpc.py   bluepass(Download)
        self._incoming = collections.deque()
        self._outgoing = collections.deque()
        self._parser = jsonrpc.JsonRpcParser()
        self._read_notifier = None
        self._write_notifier = None

src/g/r/gruvi-HEAD/tests/test_jsonrpc.py   gruvi(Download)
from gruvi import jsonrpc_ffi, jsonrpc
from gruvi.jsonrpc import *
from gruvi.jsonrpc import create_response, create_error, JsonRpcParser
from gruvi.protocols import errno
from gruvi.stream import StreamClient
    def test_simple(self):
        m = b'{ "id": "1", "method": "foo" }'
        parser = JsonRpcParser()
        parser.feed(m)
        msg = parser.pop_message()
    def test_multiple(self):
        m = b'{ "id": "1", "method": "foo" }' \
            b'{ "id": "2", "method": "bar" }'
        parser = JsonRpcParser()
        parser.feed(m)
    def test_whitespace(self):
        m = b'  { "id": "1", "method": "foo" }' \
            b'  { "id": "2", "method": "bar" }'
        parser = JsonRpcParser()
        parser.feed(m)
    def test_incremental(self):
        m = b'{ "id": "1", "method": "foo" }'
        parser = JsonRpcParser()
        for i in range(len(m)-1):
            parser.feed(m[i:i+1])

src/g/r/gruvi-0.9.2/tests/test_jsonrpc.py   gruvi(Download)
from gruvi import jsonrpc_ffi
from gruvi.jsonrpc import *
from gruvi.jsonrpc import create_response, create_error, JsonRpcParser
from gruvi.protocols import errno
from gruvi.stream import StreamClient
    def test_simple(self):
        m = b'{ "id": "1", "method": "foo" }'
        parser = JsonRpcParser()
        parser.feed(m)
        msg = parser.pop_message()
    def test_multiple(self):
        m = b'{ "id": "1", "method": "foo" }' \
            b'{ "id": "2", "method": "bar" }'
        parser = JsonRpcParser()
        parser.feed(m)
    def test_whitespace(self):
        m = b'  { "id": "1", "method": "foo" }' \
            b'  { "id": "2", "method": "bar" }'
        parser = JsonRpcParser()
        parser.feed(m)
    def test_incremental(self):
        m = b'{ "id": "1", "method": "foo" }'
        parser = JsonRpcParser()
        for i in range(len(m)-1):
            parser.feed(m[i:i+1])