gevent

Websockets in Flask

Websockets in Flask Question: I’m currently researching websocket support in Python and am a bit confused with the offerings. On one hand it’s possible to use Flask + gevent. On the other hand, uwsgi has socket support and at last there is an extension that bundles both uwsgi and gevent. What’s the problem with implementing …

Total answers: 1

Dynamically changing log level without restarting the application

Dynamically changing log level without restarting the application Question: Is it possible to change the log level using fileConfig in python without restarting the application. If it cannot be achieved through fileConfig is there some other way to get the same result? Update: This was for an application running on a server, I wanted sys …

Total answers: 8

Can Gevent be used in combination with real threads in CPython?

Can Gevent be used in combination with real threads in CPython? Question: just wondering whether gevent coro-thread can work with real threading? perhaps I can write a program with multiple threads and each thread has some coroutines in them? edited both gevent.Threading and CPython threading have their down side. coroutines cannot utilize multiple CPUs, while …

Total answers: 1

In what way is grequests asynchronous?

In what way is grequests asynchronous? Question: I’ve been using the python requests library for some time, and recently had a need to make a request asynchronously, meaning I would like to send off the HTTP request, have my main thread continue to execute, and have a callback called when the request returns. Naturally, I …

Total answers: 3

Greenlet Vs. Threads

Greenlet Vs. Threads Question: I am new to gevents and greenlets. I found some good documentation on how to work with them, but none gave me justification on how and when I should use greenlets! What are they really good at? Is it a good idea to use them in a proxy server or not? …

Total answers: 4

When to use Tornado, when to use Twisted / Cyclone / GEvent / other

When to use Tornado, when to use Twisted / Cyclone / GEvent / other Question: Which of these frameworks / libraries would be the best choise for building modern multiuser web application? I would love to have an asynchronous webserver which will allow me to scale easly. What solution will give the best performance / …

Total answers: 4

Using Celery on processes and gevent in tasks at the same time

Using Celery on processes and gevent in tasks at the same time Question: I’d like to use Celery as a queue for my tasks so my web app could enqueue a task, return a response and the task will be processed meanwhile / someday / … I build a kind of API, so I don’t …

Total answers: 4

KeyError in module 'threading' after a successful py.test run

KeyError in module 'threading' after a successful py.test run Question: I’m running a set of tests with py.test. They pass. Yippie! But I’m getting this message: Exception KeyError: KeyError(4427427920,) in <module ‘threading’ from ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.pyc’> ignored How should I go about tracking down the source of that? (I’m not using threading directly, but am using gevent.) …

Total answers: 3

How can I install the Python library 'gevent' on Mac OS X Lion

How can I install the Python library 'gevent' on Mac OS X Lion Question: Python library gevent, version 0.13.6 (the current version on PyPI) will not pip install on OS X Lion, Python 2.7 (and probably others.) It works fine on Snow Leopard. How can I get this library installed? Bonus points if it can …

Total answers: 10

Byte Array in Python

Byte Array in Python Question: How can I represent a byte array (like in Java with byte[]) in Python? I’ll need to send it over the wire with gevent. byte key[] = {0x13, 0x00, 0x00, 0x00, 0x08, 0x00}; Asked By: d0ctor || Source Answers: In Python 3, we use the bytes object, also known as …

Total answers: 4