Skip to content
Advertisement

Tag: httprequest

Calling a view from a management command

So I have added a command to manage.py in my django app that basically takes the results from a view and emails them out to specific users. This command will run on a cron schedule – basically this is done as an automated, emailed report. I’ve figured out how to add in the command but I want to call the

Asynchronous Requests with Python requests

I tried the sample provided within the documentation of the requests library for python. With async.map(rs), I get the response codes, but I want to get the content of each page requested. This, for example, does not work: Answer Note The below answer is not applicable to requests v0.13.0+. The asynchronous functionality was moved to grequests after this question was

Proxies with Python ‘Requests’ module

Just a short, simple one about the excellent Requests module for Python. I can’t seem to find in the documentation what the variable ‘proxies’ should contain. When I send it a dict with a standard “IP:PORT” value it rejected it asking for 2 values. So, I guess (because this doesn’t seem to be covered in the docs) that the first

Advertisement