Another damn http client
Hello pythonistas and pyramideers. My day job has had a need for http
client functionality similar to what
requests<http://docs.python-requests.org/en/latest/>provides
but also works on appengine. As a result, I wrote
webobtoolkit<https://github.com/Batterii/webobtoolkit>
And we get a lot of use out of it as a way to communicate with various web
services. And as a very specialized test client.
from webobtoolkit.client import Clientclient = Client()print
client.get("http://google.com")>>> 301 Moved PermanentlyLocation:
http://www.google.com/Content-Type: text/html; charset=UTF-8Date: Sun, 17 Mar
2013 18:52:33 GMTExpires: Tue, 16 Apr 2013 18:52:33 GMTCache-Control: public,
max-age=2592000Server: gwsContent-Length: 219X-XSS-Protection: 1;
mode=blockX-Frame-Options: SAMEORIGIN
<HTML><HEAD><meta http-equiv="content-type"
content="text/html;charset=utf-8"><TITLE>301 Moved</TITLE></HEAD><BODY><H1>301
Moved</H1>The document has moved<A
HREF="http://www.google.com/">here</A>.</BODY></HTML>
There were 3 motivations for writing this.
1. requests at the time did not work with appengine
2. I couldnt figure out how to get webtest to show me the response when
assertion errors happened.
3. our team is familiar with webob and didnt want to learn yet another
way to represent http requests and responses.
The result is a client based on webob that has
1. cookie support
2. gzip encoding support
3. extendable by writing wsgi middleware that is client centric.
4. 100% test coverage
<https://gist.github.com/twillis/5183100#what-im-asking-for>What I'm asking
for
if there's interest, I would like some strong opinions from people smarter
than I about how the api and the docs could be improved. Though this has
been on pypi for about a year or so, I haven't made any formal
announcements about it. I'm hoping maybe I can do that soon after the
sprints.
So, for any of you reading this who may be interested, I'll be at the
sprint planning this afternoon and at the sprints on Monday and Tuesday.
I'm the dork with the blue hair.
Thanks for your time.
https://gist.github.com/twillis/5183100
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.