-include HISTORY.rst README.rst LICENSE
\ No newline at end of file
+include HISTORY.rst README.rst LICENSE
\ No newline at end of file
-Modifications:
+Modifications:
Copyright (c) 2011 Kenneth Reitz.
-Original Project:
+Original Project:
Copyright (c) 2010 by Armin Ronacher.
krTheme Sphinx Style
====================
-This repository contains sphinx styles Kenneth Reitz uses in most of
+This repository contains sphinx styles Kenneth Reitz uses in most of
his projects. It is a derivative of Mitsuhiko's themes for Flask and Flask related
projects. To use this style in your Sphinx documentation, follow
this guide:
pygments_style = flask_theme_support.FlaskyStyle
[options]
-touch_icon =
+touch_icon =
* :license: BSD, see LICENSE for details.
*
*/
-
+
@import url("basic.css");
-
+
/* -- page layout ----------------------------------------------------------- */
-
+
body {
font-family: 'Georgia', serif;
font-size: 17px;
hr {
border: 1px solid #B1B4B6;
}
-
+
div.body {
background-color: #ffffff;
color: #3E4349;
padding: 0 0 10px 10px;
float: right;
}
-
+
div.footer {
text-align: right;
color: #888;
width: 650px;
margin: 0 auto 40px auto;
}
-
+
div.footer a {
color: #888;
text-decoration: underline;
}
-
+
div.related {
line-height: 32px;
color: #888;
div.related ul {
padding: 0 0 0 10px;
}
-
+
div.related a {
color: #444;
}
-
+
/* -- body styles ----------------------------------------------------------- */
-
+
a {
color: #004B6B;
text-decoration: underline;
}
-
+
a:hover {
color: #6D4100;
text-decoration: underline;
div.body {
padding-bottom: 40px; /* saved for footer */
}
-
+
div.body h1,
div.body h2,
div.body h3,
height: {{ theme_index_logo_height }};
}
{% endif %}
-
+
div.body h2 { font-size: 180%; }
div.body h3 { font-size: 150%; }
div.body h4 { font-size: 130%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }
-
+
a.headerlink {
color: white;
padding: 0 4px;
text-decoration: none;
}
-
+
a.headerlink:hover {
color: #444;
background: #eaeaea;
}
-
+
div.body p, div.body dd, div.body li {
line-height: 1.4em;
}
background-color: #eee;
border: 1px solid #ccc;
}
-
+
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
-
+
div.topic {
background-color: #eee;
}
-
+
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
-
+
p.admonition-title {
display: inline;
}
-
+
p.admonition-title:after {
content: ":";
}
dl dd {
margin-left: 30px;
}
-
+
pre {
padding: 0;
margin: 15px -30px;
Making a request with Requests is very simple.
Begin by importing the Requests module::
-
+
>>> import requests
Now, let's try to get a webpage. For this example, let's get GitHub's public
Requests' simple API means that all forms of HTTP request are as obvious. For
example, this is how you make an HTTP POST request::
-
+
>>> r = requests.post("http://httpbin.org/post")
Nice, right? What about the other HTTP request types: PUT, DELETE, HEAD and
OPTIONS? These are all just as simple::
-
+
>>> r = requests.put("http://httpbin.org/put")
>>> r = requests.delete("http://httpbin.org/delete")
>>> r = requests.head("http://httpbin.org/get")
>>> print r.url
u'http://httpbin.org/get?key2=value2&key1=value1'
-
+
Response Content
----------------
If you want, you can send strings to be received as files::
>>> url = 'http://httpbin.org/post'
- >>> files = {'file': ('report.csv', 'some,data,to,send\nanother,row,to,send\n')}
+ >>> files = {'file': ('report.csv', 'some,data,to,send\nanother,row,to,send\n')}
>>> r = requests.post(url, files=files)
>>> r.text