Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #85601
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Paul Rubin <no.email@nospam.invalid> |
| Newsgroups | comp.lang.python |
| Subject | Re: Async/Concurrent HTTP Requests |
| Date | Thu, 12 Feb 2015 10:15:21 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 11 |
| Message-ID | <87y4o3f13a.fsf@jester.gateway.pace.com> (permalink) |
| References | <7a6ca7b9-ad3a-4361-88fc-580e41452874@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | mx02.eternal-september.org; posting-host="dd8607e6151ded9c80c2490153fd87aa"; logging-data="25277"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/5vOYRhtuxfyfwdJNXjvV" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
| Cancel-Lock | sha1:rjS82T3b9efYTBtQVARBFPSW5Ao= sha1:fXx04u2PHOOffQ1iarGtZjI8sPM= |
| Xref | csiph.com comp.lang.python:85601 |
Show key headers only | View raw
Ari King <ari.brandeis.king@gmail.com> writes: > I'd like to query two (or more) RESTful APIs concurrently. What is the > pythonic way of doing so? Is it better to use built in functions or > are third-party packages? Thanks. The two basic approaches are event-based asynchronous i/o (there are various packages for that) and threads. There are holy wars over which is better. Event-driven i/o in Python 2.x was generally done with callback-based packages like Twisted Matrix (www.twistedmatrix.com). In Python 3 there are some nicer mechanisms (coroutines) so the new asyncio package may be easier to use than Twisted. I haven't tried it yet.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Async/Concurrent HTTP Requests Ari King <ari.brandeis.king@gmail.com> - 2015-02-12 08:37 -0800
Re: Async/Concurrent HTTP Requests Zachary Ware <zachary.ware+pylist@gmail.com> - 2015-02-12 11:59 -0600
Re: Async/Concurrent HTTP Requests Paul Rubin <no.email@nospam.invalid> - 2015-02-12 10:15 -0800
Re: Async/Concurrent HTTP Requests Marko Rauhamaa <marko@pacujo.net> - 2015-02-12 20:55 +0200
Re: Async/Concurrent HTTP Requests Paul Rubin <no.email@nospam.invalid> - 2015-02-12 10:57 -0800
Re: Async/Concurrent HTTP Requests Marko Rauhamaa <marko@pacujo.net> - 2015-02-12 21:37 +0200
csiph-web