You want warmcat/libwebsockets. Forked libwebsockets library to facilitate the creation of a set of python bindings.