Commits

Anonymous committed 6a55696

regen doc

  • Participants
  • Parent commits e3b5634

Comments (0)

Files changed (14)

File docs/_build/doctrees/environment.pickle

Binary file modified.

File docs/_build/doctrees/resource.doctree

Binary file modified.

File docs/_build/doctrees/transports.doctree

Binary file modified.

File docs/_build/doctrees/whatsnew.doctree

Binary file modified.

File docs/_build/html/_sources/resource.txt

     .. automethod:: restclient.rest.RestClient.put
 
     .. automethod:: restclient.rest.RestClient.request
-
-ResourceResult class
---------------------
-
-.. autoclass:: restclient.rest.ResourceResult
  
 Exceptions
 ----------

File docs/_build/html/_sources/transports.txt

 .. autofunction:: restclient.transport.getDefaultHTTPTransport
 .. autofunction:: restclient.transport.setDefaultHTTPTransport
 
-Clients:
+Response
+--------
+
+.. autoclass:: restclient.transport.HTTPResponse
+
+Transports:
 --------
 .. autoclass:: restclient.transport.HTTPTransportBase
 

File docs/_build/html/_sources/whatsnew.txt

 
 
 ***************************************
-What's New in python-restclient 1.1
+What's New in python-restclient 1.2
 ***************************************
 
 
-Transports changes
-------------------
+Encoding:
+---------
 
-* :mod:`restclient.http` have been renamed to :mod:`restclient.transport`. In the same time all "clients" are now called "transports".
+- unicode urls are now managed
+- data get from response is now in unicode if it's not a binary
 
-* urllib2 transport have been removed, Now httplib2 is used when pycurl
-  isn't installed. This change was needed to simplify the code. And
-  there was no need to rewrite another httplib2 transport but based on
-  urllib2.
+Fixes:
+------
 
-.. seealso::
-        
-          :ref:`reftransports`
+- curl client have been fixed
+- new response object that act now as a real dict. You could get all
+  headers of the response like this :
+ 
+.. code-block:: python   
 
-Support of File objects as body
--------------------------------
-
-Now a body could be a File object. If you use httplib2 all the content
-will be read before sending. Pycurl will send it as it read.
-
-
-Url encoding
-------------
-
-By default all urls are utf8 encoded. But you could change default charset, safe characters and
-decide that keys don't need to be encoded.
+    >>> from restclient import Resource
+    >>> res = Resource('http://e-engura.org')
+    >>> from restclient import Resource
+    >>> res = Resource('http://e-engura.org')
+    >>> page = res.get()
+    >>> res.status
+    200
+    >>> res.response
+    <HTTPResponse status 200 for http://e-engura.org>
+    >>> res.response.__dict__
+    {'status': 200, 'final_url': 'http://e-engura.org'}
+    >>> for i in res.response.items():
+    ...     print i
+    ... 
+    ('status', 200)
+    ('content-length', '5448')
+    ('final_url', 'http://e-engura.org')
+    ('accept-ranges', 'bytes')
+    ('server', 'nginx/0.6.31')
+    ('last-modified', 'Sun, 28 Dec 2008 23:15:27 GMT')
+    ('connection', 'keep-alive')
+    ('date', 'Wed, 04 Feb 2009 21:52:14 GMT')
+    ('content-type', 'text/html')
 
 
 .. seealso::

File docs/_build/html/genindex.html

     <dt><a href="resource.html#restclient.rest.RestClient.head">(restclient.rest.RestClient method)</a></dt>
   </dl></dd>
 <dt><a href="transports.html#restclient.transport.HTTPLib2Transport">HTTPLib2Transport (class in restclient.transport)</a></dt></dl></td><td width="33%" valign="top"><dl>
+<dt><a href="transports.html#restclient.transport.HTTPResponse">HTTPResponse (class in restclient.transport)</a></dt>
 <dt><a href="transports.html#restclient.transport.HTTPTransportBase">HTTPTransportBase (class in restclient.transport)</a></dt>
 </dl></td></tr></table>
 
 <dt><a href="resource.html#restclient.rest.RequestFailed">RequestFailed</a></dt>
 <dt><a href="resource.html#restclient.rest.Resource">Resource (class in restclient.rest)</a></dt></dl></td><td width="33%" valign="top"><dl>
 <dt><a href="resource.html#restclient.rest.ResourceNotFound">ResourceNotFound</a></dt>
-<dt><a href="resource.html#restclient.rest.ResourceResult">ResourceResult (class in restclient.rest)</a></dt>
 <dt><a href="resource.html#restclient.rest.RestClient">RestClient (class in restclient.rest)</a></dt>
 <dt><a href="resource.html#module-restclient">restclient (module)</a></dt>
 <dt><a href="transports.html#module-restclient.transport">restclient.transport (module)</a></dt>

File docs/_build/html/index.html

 </li>
 </ul>
 <ul>
-<li class="toctree-l1"><a class="reference external" href="whatsnew.html">What&#8217;s New in python-restclient 1.1</a><ul>
-<li class="toctree-l2"><a class="reference external" href="whatsnew.html#transports-changes">Transports changes</a></li>
-<li class="toctree-l2"><a class="reference external" href="whatsnew.html#support-of-file-objects-as-body">Support of File objects as body</a></li>
-<li class="toctree-l2"><a class="reference external" href="whatsnew.html#url-encoding">Url encoding</a></li>
+<li class="toctree-l1"><a class="reference external" href="whatsnew.html">What&#8217;s New in python-restclient 1.2</a><ul>
+<li class="toctree-l2"><a class="reference external" href="whatsnew.html#encoding">Encoding:</a></li>
+<li class="toctree-l2"><a class="reference external" href="whatsnew.html#fixes">Fixes:</a></li>
 </ul>
 </li>
 </ul>
 <li class="toctree-l1"><a class="reference external" href="resource.html">Resource</a><ul>
 <li class="toctree-l2"><a class="reference external" href="resource.html#resource-class">Resource class</a></li>
 <li class="toctree-l2"><a class="reference external" href="resource.html#restclient-class">RestClient class</a></li>
-<li class="toctree-l2"><a class="reference external" href="resource.html#resourceresult-class">ResourceResult class</a></li>
 <li class="toctree-l2"><a class="reference external" href="resource.html#exceptions">Exceptions</a></li>
 </ul>
 </li>
 <ul>
 <li class="toctree-l1"><a class="reference external" href="transports.html">HTTP Transports</a><ul>
 <li class="toctree-l2"><a class="reference external" href="transports.html#functions">Functions</a></li>
-<li class="toctree-l2"><a class="reference external" href="transports.html#clients">Clients:</a></li>
+<li class="toctree-l2"><a class="reference external" href="transports.html#response">Response</a></li>
+<li class="toctree-l2"><a class="reference external" href="transports.html#transports">Transports:</a></li>
 </ul>
 </li>
 </ul>

File docs/_build/html/objects.inv

 restclient.rest.Resource.get method resource.html
 restclient.rest.Resource.request method resource.html
 restclient.rest.Resource class resource.html
-restclient.rest.ResourceResult class resource.html
 restclient.RestClient.transport attribute resource.html
 restclient.transport.setDefaultHTTPTransport function transports.html
+restclient.transport.HTTPResponse class transports.html
 restclient.rest.RestClient.get method resource.html
 restclient.rest.Resource.clone method resource.html
 restclient.Resource.transport attribute resource.html
 restclient.rest.RestClient.post method resource.html
-restclient.rest.RestClient class resource.html
+restclient.transport.CurlTransport.__init__ method transports.html
 restclient.transport.HTTPTransportBase.add_credentials method transports.html
 restclient.rest.RestClient.delete method resource.html
 restclient.transport.HTTPLib2Transport.__init__ method transports.html
 restclient.transport.HTTPTransportBase class transports.html
 restclient.rest.Unauthorized exception resource.html
 restclient.transport.HTTPLib2Transport class transports.html
-restclient.rest.Resource.update_uri method resource.html
+restclient.rest.RequestFailed exception resource.html
 restclient.rest.ResourceNotFound exception resource.html
 restclient.rest.Resource.__call__ method resource.html
 restclient.rest.Resource.post method resource.html
 restclient.transport.CurlTransport class transports.html
 restclient.Resource.uri attribute resource.html
 restclient.rest.RequestError exception resource.html
-restclient.transport.CurlTransport.__init__ method transports.html
+restclient.rest.RestClient class resource.html
 restclient.rest.RestClient.head method resource.html
 restclient.transport.HTTPLib2Transport.add_credentials method transports.html
 restclient.transport.HTTPTransportBase.request method transports.html
-restclient.rest.RequestFailed exception resource.html
+restclient.rest.Resource.update_uri method resource.html
 restclient.transport.getDefaultHTTPTransport function transports.html
 restclient.transport.HTTPTransportBase.__init__ method transports.html

File docs/_build/html/resource.html

     <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="py-restclient v1.1 documentation" href="index.html" />
     <link rel="next" title="HTTP Transports" href="transports.html" />
-    <link rel="prev" title="What&#8217;s New in python-restclient 1.1" href="whatsnew.html" /> 
+    <link rel="prev" title="What&#8217;s New in python-restclient 1.2" href="whatsnew.html" /> 
   </head>
   <body>
     <div class="related">
           <a href="transports.html" title="HTTP Transports"
              accesskey="N">next</a> |</li>
         <li class="right" >
-          <a href="whatsnew.html" title="What&#8217;s New in python-restclient 1.1"
+          <a href="whatsnew.html" title="What&#8217;s New in python-restclient 1.2"
              accesskey="P">previous</a> |</li>
         <li><a href="index.html">py-restclient v1.1 documentation</a> &raquo;</li> 
       </ul>
 <span class="gp">&gt;&gt;&gt; </span><span class="n">xml</span> <span class="o">=</span> <span class="n">res</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;http://pypaste.com/about&#39;</span><span class="p">)</span>
 <span class="gp">&gt;&gt;&gt; </span><span class="n">json</span> <span class="o">=</span> <span class="n">res</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;http://pypaste.com/3XDqQ8G83LlzVWgCeWdwru&#39;</span><span class="p">,</span> <span class="n">headers</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;accept&#39;</span><span class="p">:</span> <span class="s">&#39;application/json&#39;</span><span class="p">})</span>
 <span class="gp">&gt;&gt;&gt; </span><span class="n">json</span>
-<span class="go">&#39;{&quot;snippet&quot;: &quot;testing API.&quot;, &quot;title&quot;: &quot;&quot;, &quot;id&quot;: &quot;3XDqQ8G83LlzVWgCeWdwru&quot;, &quot;language&quot;: &quot;text&quot;, &quot;revision&quot;: &quot;363934613139&quot;}&#39;</span>
+<span class="go">u&#39;{&quot;snippet&quot;: &quot;testing API.&quot;, &quot;title&quot;: &quot;&quot;, &quot;id&quot;: &quot;3XDqQ8G83LlzVWgCeWdwru&quot;, &quot;language&quot;: &quot;text&quot;, &quot;revision&quot;: &quot;363934613139&quot;}&#39;</span>
 </pre></div>
 </div>
 <p><strong>Properties</strong></p>
 </dd></dl>
 
 </div>
-<div class="section" id="resourceresult-class">
-<h2>ResourceResult class<a class="headerlink" href="#resourceresult-class" title="Permalink to this headline">¶</a></h2>
-<dl class="class">
-<dt id="restclient.rest.ResourceResult">
-<!--[restclient.rest.ResourceResult]-->class <tt class="descclassname">restclient.rest.</tt><tt class="descname">ResourceResult</tt><a class="headerlink" href="#restclient.rest.ResourceResult" title="Permalink to this definition">¶</a></dt>
-<dd><p>result returned by <cite>restclient.rest.RestClient</cite>.</p>
-<p>you can get result like as string and  status code by result.http_code, 
-or see anything about the response via result.response. For example, the entire 
-result body is result.response.body.</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">restclient</span> <span class="kn">import</span> <span class="n">RestClient</span>
-<span class="n">client</span> <span class="o">=</span> <span class="n">RestClient</span><span class="p">()</span>
-<span class="n">page</span> <span class="o">=</span> <span class="n">resource</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&#39;GET&#39;</span><span class="p">,</span> <span class="s">&#39;http://friendpaste.com&#39;</span><span class="p">)</span>
-<span class="k">print</span> <span class="n">page</span>
-<span class="k">print</span> <span class="s">&quot;http code </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">page</span><span class="o">.</span><span class="n">http_code</span>
-</pre></div>
-</div>
-</dd></dl>
-
-</div>
 <div class="section" id="exceptions">
 <h2>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h2>
 <dl class="exception">
 <li><a class="reference external" href="">Resource</a><ul>
 <li><a class="reference external" href="#resource-class">Resource class</a></li>
 <li><a class="reference external" href="#restclient-class">RestClient class</a></li>
-<li><a class="reference external" href="#resourceresult-class">ResourceResult class</a></li>
 <li><a class="reference external" href="#exceptions">Exceptions</a></li>
 </ul>
 </li>
 </ul>
 
             <h4>Previous topic</h4>
-            <p class="topless"><a href="whatsnew.html" title="previous chapter">What&#8217;s New in python-restclient 1.1</a></p>
+            <p class="topless"><a href="whatsnew.html" title="previous chapter">What&#8217;s New in python-restclient 1.2</a></p>
             <h4>Next topic</h4>
             <p class="topless"><a href="transports.html" title="next chapter">HTTP Transports</a></p>
             <h3>This Page</h3>
           <a href="transports.html" title="HTTP Transports"
              accesskey="N">next</a> |</li>
         <li class="right" >
-          <a href="whatsnew.html" title="What&#8217;s New in python-restclient 1.1"
+          <a href="whatsnew.html" title="What&#8217;s New in python-restclient 1.2"
              accesskey="P">previous</a> |</li>
         <li><a href="index.html">py-restclient v1.1 documentation</a> &raquo;</li> 
       </ul>

File docs/_build/html/searchindex.js

-Search.setIndex({desctypes:{"0":"method","1":"function","2":"class","3":"attribute","4":"exception"},terms:{all:[5,4],code:[0,4,5],friedpast:[],follow:3,make_request:0,decid:[3,4,5],depend:4,send:[5,1],program:1,sourc:[3,2],string:[1,4],httptransport:6,brows:3,list:4,direct:3,proxy_password:6,past:[0,4,1],pass:4,port:1,index:3,what:[3,5],pypast:4,access:[6,4],delet:[3,4,6],version:[1,2],"new":[3,4,5],requesterror:4,"public":3,full:[1,4],unauthor:4,here:6,bodi:[3,4,6,5],proxy_us:6,path:[2,4],method:[1,4,6],valu:1,optionn:[6,4],search:3,later:2,user_timelin:1,action:[3,4],chang:[3,4,5],via:[2,4,6],modul:[0,4,3],prefer:6,releas:2,api:[0,4],encode_kei:4,instal:[5,0,4,2,3],from:[6,0,4,2,1],call:[5,0,4,6,3],type:1,indic:3,cheeseshop:2,recommand:6,cach:6,none:[6,4],pycurl:[5,4,6],setup:2,dev:2,can:[2,4,6,3],dec:3,root:3,overrid:4,malform:4,quickstart:3,createhttptransport:6,sudo:2,accept:[0,4,1],want:[0,4,6],alwai:2,anoth:5,charset:[5,4],snippet:[1,4],subdirectori:2,simpl:[3,4],tutorial:0,restcli:1,resourc:[5,0,4,6,3],proxy_info:6,clone:[2,4],befor:5,mai:4,authentif:[6,4],data:4,attempt:4,perform:[0,1,4,6,3],allow:1,help:1,over:4,through:[0,3],mainli:0,paramet:[6,4],style:3,"return":[6,4],python:[5,0,2,3],safe:[5,4],httplib2:[2,4,6,5],now:5,restclient:[0,1,2,3,4,5,6],benoitc:[1,2],authent:4,timeout:6,found:4,mean:4,pthon:2,connect:6,our:[3,2],extract:4,rev:1,content:[5,1],rewrit:5,adapt:3,print:[0,4],proxi:[1,4,6],given:4,like:[3,4,1],base:[5,4,6],byth:3,put:[6,4],org:2,friendpast:[0,4,1],could:[2,4,5],isn:5,oper:6,headput:3,number:1,least:3,payload:4,alternatli:2,messag:[1,4],mercuri:2,master:3,curltransport:6,consol:[3,1],option:[1,4],copi:2,setuptool:2,specifi:[3,4],than:4,serv:4,notfound:4,provid:4,remov:5,charact:[5,4],project:3,str:[6,4],update_uri:4,anywher:2,packag:2,have:[0,6,5],tabl:3,need:[5,2,1,4,3],unexpect:4,sinatra:3,client:[0,1,3,4,5,6],which:[6,4],command:[1,2],simplifi:5,though:6,usernam:1,setdefaulthttptransport:6,object:[3,4,6,5],most:2,"class":[3,4],don:[5,4],url:[5,3,4,6,1],doc:0,camp:3,request:[0,4,6,1],uri:[1,4],multimedia:3,show:1,text:[1,4],actuib:6,xml:4,absolut:4,onli:4,should:[3,6],dict:[6,4],"__call__":4,get:[0,1,2,3,4,6],report:3,requir:[2,4,3],patch:6,remot:4,stuff:1,common:4,contain:3,set:[6,4],transportthat:6,httplib2transport:[6,4],see:[5,4,6],result:[1,4],respons:[6,4],fail:4,statu:[1,4],simplecouchdb:2,charat:4,someth:6,urllib:6,"import":[0,4,6],altern:2,kei:[5,0,4,1],engura:2,fisrt:3,proxy_port:6,entir:4,last:2,wed:3,instanc:[6,4],com:[0,4,1],instanti:4,inspir:3,header:[0,4,6,1],resr2:4,been:[5,6],json:[0,4,1],basic:[6,4],ani:[1,4,6],resourceresult:[3,4],requestfail:4,"case":6,properti:4,defin:4,error:4,site:2,getdefaulthttptransport:6,revis:4,"__init__":6,develop:[3,2],welcom:[3,6],author:4,receiv:4,make:[2,4,3],same:5,html:4,resourcenotfound:4,document:[0,3],complet:3,status:1,http:[0,1,2,3,4,5,6],utf8:[5,4],rais:4,user:6,implement:6,recent:2,exampl:[0,1,4,6,3],add_credenti:6,thi:[0,1,2,3,4,5,6],choos:6,everyth:3,http_code:[0,4],pollen:1,rest:[0,4,3],yet:0,languag:[1,4],httptransportbas:[6,4],"1po5toc012qefyos3b3raa":1,expos:0,proxy_host:6,except:[3,4],param:[6,4],add:4,tring:4,input:1,applic:[0,4,1],read:[0,1,5],know:3,password:[6,1],name:1,specif:6,success:4,filenam:1,anyth:4,server:4,output:1,page:[0,4,3],twitter:1,some:6,back:1,enki:3,toctre:3,transport:[3,4,6,5],tmp:1,subclass:4,tracker:3,exit:1,refer:3,"3xdqq8g83llzvwgcewdwru":4,htpp:6,usag:[0,1,4,3],symlink:2,step:3,repositori:2,post:[3,4,6,1],about:[3,4],manag:6,microframework:3,constructor:6,own:[1,4],additionn:4,pythonpath:2,encod:[3,4,5],easy_instal:2,your:[2,1,4,3],support:[5,0,4,6,3],fast:6,avail:[1,2],start:[0,3],interfac:[6,4],includ:4,httpclient:[6,4],"function":[3,6],head:[6,4],form:1,renam:5,line:1,"true":[1,4],bug:3,info:6,also:[5,2,6],made:3,utf:4,"default":[5,4,6],xxxxxxx:[6,1],"5roqe9xtz7lcclgzoqs4ip":[0,4],featur:[0,3],creat:[3,1,6],"int":6,repres:[6,4],file:[5,3,4,1],curl:6,probabl:4,titl:[1,4],when:[5,4,6],other:4,librari:0,test:[1,4,6],you:[0,1,2,3,4,5,6],urllib2:[5,4,6],bitbucket:[3,2],sphinx:3,directori:2,descript:[0,4],depth:0,time:[5,1],parameterss:4},titles:["Getting Started","Console client","Installation","Welcome to python-restclient&#8217;s documentation!","Resource","What&#8217;s New in python-restclient 1.1","HTTP Transports"],modules:{restclient:4,"restclient.transport":6},descrefs:{"restclient.RestClient":{transport:[4,3]},"restclient.transport.CurlTransport":{add_credentials:[6,0],"__init__":[6,0]},"restclient.transport.HTTPLib2Transport":{add_credentials:[6,0],"__init__":[6,0]},"restclient.Resource":{uri:[4,3],transport:[4,3]},"restclient.rest.Resource":{head:[4,0],get:[4,0],clone:[4,0],request:[4,0],"__call__":[4,0],put:[4,0],post:[4,0],update_uri:[4,0],"delete":[4,0]},"restclient.rest.RestClient":{head:[4,0],get:[4,0],request:[4,0],put:[4,0],post:[4,0],"delete":[4,0]},"restclient.transport.HTTPTransportBase":{add_credentials:[6,0],request:[6,0],"__init__":[6,0]},"restclient.rest":{Resource:[4,2],RestClient:[4,2],Unauthorized:[4,4],ResourceResult:[4,2],ResourceNotFound:[4,4],RequestError:[4,4],RequestFailed:[4,4]},"restclient.transport":{createHTTPTransport:[6,1],setDefaultHTTPTransport:[6,1],HTTPLib2Transport:[6,2],getDefaultHTTPTransport:[6,1],CurlTransport:[6,2],HTTPTransportBase:[6,2]}},filenames:["gettingstarted","console","installation","index","resource","whatsnew","transports"]})
+Search.setIndex({desctypes:{"0":"method","1":"function","2":"class","3":"attribute","4":"exception"},terms:{all:[5,1],code:[0,1],friedpast:[],follow:3,make_request:0,decid:[3,1],depend:1,send:4,program:4,sourc:[3,2],string:[1,4],httptransport:6,brows:3,list:1,item:5,librari:0,direct:3,proxy_password:6,past:[1,0,4],pass:1,port:4,index:3,what:[3,5],sun:5,pypast:1,access:[6,1],delet:[3,1,6],version:[2,4],"new":[3,1,5],requesterror:1,method:[1,4,6],full:[1,4],unauthor:1,here:6,bodi:[6,1],proxy_us:6,path:[1,2],modifi:5,valu:4,optionn:[6,1],search:3,user_timelin:4,action:[3,1],chang:1,via:[1,2,6],modul:[0,1,3],prefer:6,put:[6,1],api:[0,1],encode_kei:1,instal:[1,0,2,3],feb:5,call:[0,1,6,3],type:[5,4,6],more:6,accept:[1,0,4,5],cheeseshop:2,recommand:6,cach:6,none:[6,1],pycurl:[6,1],setup:2,dev:2,can:[1,3,2,6],dec:[3,5],root:3,aliv:5,overrid:1,malform:1,quickstart:3,createhttptransport:6,sudo:2,indic:3,want:[0,1,6],alwai:2,anoth:[],charset:1,snippet:[1,4],subdirectori:2,simpl:[3,1],restcli:4,resourc:[5,0,1,6,3],proxy_info:6,clone:[1,2],constructor:6,befor:[],date:5,authentif:[6,1],data:[5,1],final_url:5,attempt:1,receiv:1,allow:4,help:4,over:1,through:[0,3],mainli:0,paramet:[6,1],style:3,fix:[3,5],"return":[6,1],python:[5,0,2,3],safe:1,httplib2:[1,2,6],now:5,httplib:6,name:4,benoitc:[2,4],authent:1,timeout:6,found:1,unicod:5,mean:1,pthon:2,connect:[5,6],our:[3,2],extract:1,rev:4,content:[5,4,6],rewrit:[],adapt:3,print:[0,5],proxi:[1,4,6],given:1,base:[6,1],byth:3,releas:2,org:[5,2,6],"byte":5,friendpast:[1,0,4],could:[1,2,5],success:1,keep:5,length:5,isn:[],oper:6,rang:5,headput:3,number:4,mai:1,least:3,payload:1,alternatli:2,start:[0,3],messag:[1,4,6],mercuri:2,master:3,curltransport:6,consol:[3,4],option:[1,4],"public":3,copi:2,setuptool:2,specifi:[3,1],than:[6,1],serv:1,notfound:1,remot:1,remov:[],charact:1,project:3,str:[6,1],update_uri:1,anywher:2,packag:2,have:[0,6,5],tabl:3,need:[1,2,4,3],featur:[0,3],unexpect:1,sinatra:3,client:[0,1,3,4,5,6],which:[6,1],command:[2,4],simplifi:[],though:6,usernam:4,setdefaulthttptransport:6,object:[5,1,6],most:2,"class":[3,1],don:1,url:[1,4,6,5],doc:0,camp:3,request:[1,0,4,6],uri:[1,4],multimedia:3,show:4,text:[1,4,6,5],actuib:6,xml:1,absolut:1,onli:1,should:[3,6],dict:[5,1,6],"__call__":1,get:[0,1,2,3,4,5,6],report:3,requir:[1,3,2],patch:6,provid:1,stuff:4,common:1,contain:3,set:[6,1],transportthat:6,httplib2transport:[6,1],see:[5,1,6],result:[1,4],respons:[3,1,6,5],fail:1,statu:[1,4,6,5],simplecouchdb:2,charat:1,someth:6,urllib:6,"import":[0,1,6,5],email:6,altern:2,kei:[1,0,4],engura:[5,2,6],fisrt:3,proxy_port:6,entir:1,last:[5,2],proxy_host:6,instanc:[6,1],com:[1,0,4],instanti:1,inspir:3,header:[1,0,4,6,5],resr2:1,been:[5,6],json:[1,0,4],basic:[6,1],imag:6,ani:[1,4,6],resourceresult:[],requestfail:1,"case":6,properti:1,defin:1,error:1,site:2,getdefaulthttptransport:6,revis:1,"__init__":6,develop:[3,2],welcom:[3,6],author:1,perform:[1,0,4,6,3],make:[1,3,2],same:[],binari:5,html:[5,1,6],resourcenotfound:1,document:[0,3],complet:3,status:4,http:[0,1,2,3,4,5,6],utf8:1,rais:1,user:6,implement:6,recent:2,exampl:[1,0,4,6,3],add_credenti:6,thi:[0,1,2,3,4,5,6],choos:6,everyth:3,http_code:[0,1],pollen:4,rest:[0,1,3],"__dict__":5,yet:0,languag:[1,4],httptransportbas:[6,1],"1po5toc012qefyos3b3raa":4,expos:0,wed:[3,5],except:[3,1],param:[6,1],add:1,tring:1,input:4,gmt:5,real:5,applic:[1,0,4],read:[0,4],nginx:5,know:3,httprespons:[5,6],restclient:[0,1,2,3,4,5,6],like:[3,4,6,5],specif:6,filenam:4,anyth:1,server:[5,1],output:4,page:[5,0,1,6,3],twitter:4,some:6,back:4,enki:3,toctre:3,transport:[3,1,6],tmp:4,subclass:1,tracker:3,exit:4,refer:3,"3xdqq8g83llzvwgcewdwru":1,htpp:6,usag:[1,0,4,3],symlink:2,step:3,repositori:2,from:[0,1,2,5,4,6],post:[1,3,4,6],about:[3,1],manag:[5,6],microframework:3,act:5,own:[1,4],additionn:1,pythonpath:2,encod:[3,1,5],easy_instal:2,your:[1,2,4,3],support:[0,1,6,3],fast:6,avail:[2,4],gif:6,interfac:[6,1],includ:1,httpclient:[6,1],"function":[3,6],head:[6,1],form:4,renam:[],line:4,"true":[1,4],bug:3,info:6,also:[5,2,6],made:3,utf:1,"default":[6,1],xxxxxxx:[6,4],"5roqe9xtz7lcclgzoqs4ip":[0,1],later:2,creat:[3,4,6],"int":6,repres:[6,1],file:[1,3,4],logo:6,curl:[5,6],probabl:1,password:[6,4],titl:[1,4],when:[6,1],other:1,tutorial:0,test:[1,4,6],you:[0,1,2,3,4,5,6],urllib2:[6,1],bitbucket:[3,2],sphinx:3,directori:2,descript:[0,1],depth:0,time:4,parameterss:1},titles:["Getting Started","Resource","Installation","Welcome to python-restclient&#8217;s documentation!","Console client","What&#8217;s New in python-restclient 1.2","HTTP Transports"],modules:{restclient:1,"restclient.transport":6},descrefs:{"restclient.RestClient":{transport:[1,3]},"restclient.transport.CurlTransport":{add_credentials:[6,0],"__init__":[6,0]},"restclient.transport.HTTPLib2Transport":{add_credentials:[6,0],"__init__":[6,0]},"restclient.Resource":{uri:[1,3],transport:[1,3]},"restclient.rest.Resource":{head:[1,0],get:[1,0],clone:[1,0],request:[1,0],"__call__":[1,0],put:[1,0],post:[1,0],update_uri:[1,0],"delete":[1,0]},"restclient.rest.RestClient":{head:[1,0],get:[1,0],request:[1,0],put:[1,0],post:[1,0],"delete":[1,0]},"restclient.transport.HTTPTransportBase":{add_credentials:[6,0],request:[6,0],"__init__":[6,0]},"restclient.rest":{Resource:[1,2],RestClient:[1,2],Unauthorized:[1,4],ResourceNotFound:[1,4],RequestError:[1,4],RequestFailed:[1,4]},"restclient.transport":{createHTTPTransport:[6,1],setDefaultHTTPTransport:[6,1],HTTPLib2Transport:[6,2],getDefaultHTTPTransport:[6,1],HTTPResponse:[6,2],CurlTransport:[6,2],HTTPTransportBase:[6,2]}},filenames:["gettingstarted","resource","installation","index","console","whatsnew","transports"]})

File docs/_build/html/transports.html

 :param http: RestClient</dd></dl>
 
 </div>
-<div class="section" id="clients">
-<h2>Clients:<a class="headerlink" href="#clients" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="response">
+<h2>Response<a class="headerlink" href="#response" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="restclient.transport.HTTPResponse">
+<!--[restclient.transport.HTTPResponse]-->class <tt class="descclassname">restclient.transport.</tt><tt class="descname">HTTPResponse</tt><big>(</big><em>info</em><big>)</big><a class="headerlink" href="#restclient.transport.HTTPResponse" title="Permalink to this definition">¶</a></dt>
+<dd><p>An object more like email.Message than httplib.HTTPResponse.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">restclient</span> <span class="kn">import</span> <span class="n">Resource</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span> <span class="o">=</span> <span class="n">Resource</span><span class="p">(</span><span class="s">&#39;http://e-engura.org&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">restclient</span> <span class="kn">import</span> <span class="n">Resource</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span> <span class="o">=</span> <span class="n">Resource</span><span class="p">(</span><span class="s">&#39;http://e-engura.org&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">page</span> <span class="o">=</span> <span class="n">res</span><span class="o">.</span><span class="n">get</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">status</span>
+<span class="go">200</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">response</span><span class="p">[</span><span class="s">&#39;content-type&#39;</span><span class="p">]</span>
+<span class="go">&#39;text/html&#39;</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">logo</span> <span class="o">=</span> <span class="n">res</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;/images/logo.gif&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">response</span><span class="p">[</span><span class="s">&#39;content-type&#39;</span><span class="p">]</span>
+<span class="go">&#39;image/gif&#39;</span>
+</pre></div>
+</div>
+</dd></dl>
+
+</div>
+<div class="section" id="transports">
+<h2>Transports:<a class="headerlink" href="#transports" title="Permalink to this headline">¶</a></h2>
 <dl class="class">
 <dt id="restclient.transport.HTTPTransportBase">
 <!--[restclient.transport.HTTPTransportBase]-->class <tt class="descclassname">restclient.transport.</tt><tt class="descname">HTTPTransportBase</tt><big>(</big><em>proxy_infos=None</em><big>)</big><a class="headerlink" href="#restclient.transport.HTTPTransportBase" title="Permalink to this definition">¶</a></dt>
             <ul>
 <li><a class="reference external" href="">HTTP Transports</a><ul>
 <li><a class="reference external" href="#functions">Functions</a></li>
-<li><a class="reference external" href="#clients">Clients:</a></li>
+<li><a class="reference external" href="#response">Response</a></li>
+<li><a class="reference external" href="#transports">Transports:</a></li>
 </ul>
 </li>
 </ul>

File docs/_build/html/whatsnew.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>What&#8217;s New in python-restclient 1.1 &mdash; py-restclient v1.1 documentation</title>
+    <title>What&#8217;s New in python-restclient 1.2 &mdash; py-restclient v1.1 documentation</title>
     <link rel="stylesheet" href="_static/default.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <script type="text/javascript">
           <div class="body">
             
   
-  <div class="section" id="what-s-new-in-python-restclient-1-1">
-<span id="whatsnew"></span><h1>What&#8217;s New in python-restclient 1.1<a class="headerlink" href="#what-s-new-in-python-restclient-1-1" title="Permalink to this headline">¶</a></h1>
-<div class="section" id="transports-changes">
-<h2>Transports changes<a class="headerlink" href="#transports-changes" title="Permalink to this headline">¶</a></h2>
+  <div class="section" id="what-s-new-in-python-restclient-1-2">
+<span id="whatsnew"></span><h1>What&#8217;s New in python-restclient 1.2<a class="headerlink" href="#what-s-new-in-python-restclient-1-2" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="encoding">
+<h2>Encoding:<a class="headerlink" href="#encoding" title="Permalink to this headline">¶</a></h2>
 <ul class="simple">
-<li><tt class="xref docutils literal"><span class="pre">restclient.http</span></tt> have been renamed to <a title="" class="reference external" href="transports.html#module-restclient.transport"><tt class="xref docutils literal"><span class="pre">restclient.transport</span></tt></a>. In the same time all &#8220;clients&#8221; are now called &#8220;transports&#8221;.</li>
-<li>urllib2 transport have been removed, Now httplib2 is used when pycurl
-isn&#8217;t installed. This change was needed to simplify the code. And
-there was no need to rewrite another httplib2 transport but based on
-urllib2.</li>
+<li>unicode urls are now managed</li>
+<li>data get from response is now in unicode if it&#8217;s not a binary</li>
 </ul>
-<div class="admonition-see-also admonition seealso">
-<p class="first admonition-title">See also</p>
-<p class="last"><a class="reference external" href="transports.html#reftransports"><em>HTTP Transports</em></a></p>
 </div>
+<div class="section" id="fixes">
+<h2>Fixes:<a class="headerlink" href="#fixes" title="Permalink to this headline">¶</a></h2>
+<ul class="simple">
+<li>curl client have been fixed</li>
+<li>new response object that act now as a real dict. You could get all
+headers of the response like this :</li>
+</ul>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">restclient</span> <span class="kn">import</span> <span class="n">Resource</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span> <span class="o">=</span> <span class="n">Resource</span><span class="p">(</span><span class="s">&#39;http://e-engura.org&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">restclient</span> <span class="kn">import</span> <span class="n">Resource</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span> <span class="o">=</span> <span class="n">Resource</span><span class="p">(</span><span class="s">&#39;http://e-engura.org&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">page</span> <span class="o">=</span> <span class="n">res</span><span class="o">.</span><span class="n">get</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">status</span>
+<span class="go">200</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">response</span>
+<span class="go">&lt;HTTPResponse status 200 for http://e-engura.org&gt;</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">response</span><span class="o">.</span><span class="n">__dict__</span>
+<span class="go">{&#39;status&#39;: 200, &#39;final_url&#39;: &#39;http://e-engura.org&#39;}</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">res</span><span class="o">.</span><span class="n">response</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+<span class="gp">... </span>    <span class="k">print</span> <span class="n">i</span>
+<span class="gp">...</span>
+<span class="go">(&#39;status&#39;, 200)</span>
+<span class="go">(&#39;content-length&#39;, &#39;5448&#39;)</span>
+<span class="go">(&#39;final_url&#39;, &#39;http://e-engura.org&#39;)</span>
+<span class="go">(&#39;accept-ranges&#39;, &#39;bytes&#39;)</span>
+<span class="go">(&#39;server&#39;, &#39;nginx/0.6.31&#39;)</span>
+<span class="go">(&#39;last-modified&#39;, &#39;Sun, 28 Dec 2008 23:15:27 GMT&#39;)</span>
+<span class="go">(&#39;connection&#39;, &#39;keep-alive&#39;)</span>
+<span class="go">(&#39;date&#39;, &#39;Wed, 04 Feb 2009 21:52:14 GMT&#39;)</span>
+<span class="go">(&#39;content-type&#39;, &#39;text/html&#39;)</span>
+</pre></div>
 </div>
-<div class="section" id="support-of-file-objects-as-body">
-<h2>Support of File objects as body<a class="headerlink" href="#support-of-file-objects-as-body" title="Permalink to this headline">¶</a></h2>
-<p>Now a body could be a File object. If you use httplib2 all the content
-will be read before sending. Pycurl will send it as it read.</p>
-</div>
-<div class="section" id="url-encoding">
-<h2>Url encoding<a class="headerlink" href="#url-encoding" title="Permalink to this headline">¶</a></h2>
-<p>By default all urls are utf8 encoded. But you could change default charset, safe characters and
-decide that keys don&#8217;t need to be encoded.</p>
 <div class="admonition-see-also admonition seealso">
 <p class="first admonition-title">See also</p>
 <p class="last"><a class="reference external" href="resource.html#resource-ref"><em>Resource</em></a></p>
         <div class="sphinxsidebarwrapper">
             <h3><a href="index.html">Table Of Contents</a></h3>
             <ul>
-<li><a class="reference external" href="">What&#8217;s New in python-restclient 1.1</a><ul>
-<li><a class="reference external" href="#transports-changes">Transports changes</a></li>
-<li><a class="reference external" href="#support-of-file-objects-as-body">Support of File objects as body</a></li>
-<li><a class="reference external" href="#url-encoding">Url encoding</a></li>
+<li><a class="reference external" href="">What&#8217;s New in python-restclient 1.2</a><ul>
+<li><a class="reference external" href="#encoding">Encoding:</a></li>
+<li><a class="reference external" href="#fixes">Fixes:</a></li>
 </ul>
 </li>
 </ul>