Avatar ·

Asynchronous HTTP calls grequests

📁 asynchrony, Advanced Python Topics, Help, example, requests

I've always used the requests library. But if my memory serves me right, you can only send requests to 1 http url at a time, and then to another one, sequentially. Grequests, as it's written, can send requests to up to 10 URLs simultaneously, meaning asynchronously. But I don't know how to do it, I've already tried. The file has about 150 URLs. Code:

import grequestssimplesite = 'http://shost-craft.su'with open(""C:\\\\cruelnetwork\\\\cruel.need\\\\wolfs.txt"") as werewolves:        array = [row.strip()+simplesite for row in werewolves]params = {'a'                    
Avatar ·

As far as I understand, you need to use form inheritance from models. By using proper form inheritance from a model, you can automatically fill the form with data from an existing object:

form = ProfileForm(instance=user)

Log in to leave an answer

Blogs