Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101263
| Path | csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Tony van der Hoff <tony@vanderhoff.org> |
| Newsgroups | comp.lang.python |
| Subject | Re: What is the fastest way to do 400 HTTP requests using requests library? |
| Date | Tue, 05 Jan 2016 09:53:40 +0100 |
| Lines | 26 |
| Message-ID | <mailman.13.1451984029.2305.python-list@python.org> (permalink) |
| References | <0e42a90b-b736-4050-a20c-6d387048daf3@googlegroups.com> <568b027c$0$1588$c3e8da3$5496439d@news.astraweb.com> <CALwzid=F7kwMijtc6pmPRkSgqOWeP7sx8366Eo56GuNuY7oD1g@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de Uw+C0aTbFwe/rKSOH0drxAGj/yzCn3oHM/unqnLiZwPQ== |
| Return-Path | <tony@vanderhoff.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'pop': 0.05; 'subject:library': 0.09; 'subject:using': 0.09; 'threads,': 0.09; 'threads.': 0.09; 'thread': 0.10; 'jan': 0.11; 'subject: \n ': 0.15; '2016': 0.16; 'bound,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:fastest': 0.16; 'subject:requests': 0.16; 'threads': 0.16; 'wrote:': 0.16; 'library,': 0.18; '>>>': 0.20; 'library': 0.20; 'am,': 0.23; 'needed.': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'requests': 0.25; 'sort': 0.25; 'module': 0.25; 'header:User- Agent:1': 0.26; 'van': 0.26; 'separate': 0.27; 'fastest': 0.27; 'cpu': 0.29; 'i/o': 0.29; 'queue': 0.29; 'push': 0.30; 'probably': 0.31; "d'aprano": 0.33; 'http': 0.33; 'steven': 0.33; 'tue,': 0.34; 'something': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:localdomain': 0.38; 'someone': 0.38; 'why': 0.39; 'subject:the': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'email addr:gmail.com': 0.62; 'further': 0.62; 'information': 0.63; 'from:addr:tony': 0.84 |
| X-Virus-Scanned | Debian amavisd-new at mail.vanderhoff.org |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
| In-Reply-To | <CALwzid=F7kwMijtc6pmPRkSgqOWeP7sx8366Eo56GuNuY7oD1g@mail.gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:101263 |
Show key headers only | View raw
On 05/01/16 00:51, Ian Kelly wrote: > On Mon, Jan 4, 2016 at 4:38 PM, Steven D'Aprano <steve@pearwood.info> wrote: >> On Tue, 5 Jan 2016 07:50 am, livemsn22@gmail.com wrote: >> >>> So what is the fastest way to make 400 HTTP requests using "requests" >>> library and also using tor proxy? >> >> >> Since this will be I/O bound, not CPU bound, probably use separate threads. >> >> Push the 400 requests into a queue, then create N threads, where N will need >> to be determined by experiment, but will probably be something like 4 or 8, >> and let each thread pop a request from the queue as needed. >> >> Are you experienced with threads? Do you need further information about >> using threads and queues? > > Also see the concurrent.futures module in the standard library, which > makes this sort of setup very simple to implement. > Why would someone want to make 400 HTTP requests in a short time? -- Tony van der Hoff | mailto:tony@vanderhoff.org Ariège, France |
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is the fastest way to do 400 HTTP requests using requests library? livemsn22@gmail.com - 2016-01-04 12:50 -0800
Re: What is the fastest way to do 400 HTTP requests using requests library? Steven D'Aprano <steve@pearwood.info> - 2016-01-05 10:38 +1100
Re: What is the fastest way to do 400 HTTP requests using requests library? Ian Kelly <ian.g.kelly@gmail.com> - 2016-01-04 16:51 -0700
Re: What is the fastest way to do 400 HTTP requests using requests library? Tony van der Hoff <tony@vanderhoff.org> - 2016-01-05 09:53 +0100
Re: What is the fastest way to do 400 HTTP requests using requests library? Steven D'Aprano <steve@pearwood.info> - 2016-01-05 20:38 +1100
Re: What is the fastest way to do 400 HTTP requests using requests library? Tim Chase <python.list@tim.thechases.com> - 2016-01-05 05:43 -0600
Re: What is the fastest way to do 400 HTTP requests using requests library? Paul Rubin <no.email@nospam.invalid> - 2016-01-05 09:02 -0800
Re: What is the fastest way to do 400 HTTP requests using requests library? Ian Kelly <ian.g.kelly@gmail.com> - 2016-01-05 10:32 -0700
csiph-web