Study of create adpater to use the super clean API of requests to send a WSGI request over a faster trasport like rabbitmq+celery or zeromq - this first POC implements a adapter and a celery task.
this is simple example, of course you need to have a celery configurated and rabbit running
import request
from requests_adapters.adapters import CeleryAdapter
celery = Celery()
class Config:
CELERY_ENABLE_UTC = True
BROKER_URL = 'amqp://guest:guest@localhost:5672//'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
celery.config_from_object(Config)
s = requests.Session()
s.mount('celery://', CeleryAdapter())
s.post('celery://myservice.com/resource')