I want to stream data to a backend from a server that uses websockets i.e. I would like the backend to behave like a websocket client.
I tried the websocket package but that uses a whole load of App Engine non-whitelisted functions.
AppEngine does not currently support WebSockets. The closest equivalent is the Channel API, but that is still more limited than WebSockets.
Edit: The new experimental Sockets API is even closer than the Channel API, but still doesn't allow listening sockets, which is a core requirement to implement WebSockets.
The new VM-Based backends are a good fit for this kind of scenario. They allow you to run non-whitelisted code on Compute Engine virtual machines as part of your App Engine application. The program is currently in Early Access, see this post for information on signing up: https://groups.google.com/d/msg/google-appengine/gRZNqlQPKys/BbOHxcgYt2IJ