a spdy parsing library for python
Python
Latest commit fc5f02a Jun 4, 2014 @colinmarc Update README.md
Permalink
Failed to load latest commit information.
cython
python-spdy make python 3 the default version Jun 20, 2012
test various fixes in test/spdyserver.py May 2, 2012
.gitignore connection class, more refactoring Mar 22, 2012
LICENSE
README.md
requirements.txt changed api Mar 24, 2012
setup.py updated setup.py to include requirements Mar 24, 2012

README.md

python-spdy

note: this was built for spdy/2, and I've since abandoned the project.

python-spdy is a simple spdy parser/(de)muxer for python >= 2.7 (including 3.x).

usage

import spdy, spdy.frames

#with an existing socket or something
context = spdy.Context(side=spdy.SERVER, version=2)

while True:
    data = sock.recv(1024)
    if not data:
        break

    context.incoming(data)

    while True:
        frame = context.get_frame()
        if not frame: 
            break

        if isinstance(frame, spdy.frames.Ping):
            pong = spdy.frames.Ping(frame.ping_id)
            context.put_frame(pong)

    outgoing = context.outgoing()
    if outgoing:
        sock.sendall(outgoing)  

installation

requires:

pip install cython bitarray

then:

python setup.py install