fix requests dependency

This commit is contained in:
Alan Hamlett 2015-02-12 17:59:39 -08:00
parent cc00cca417
commit c8a7bd0729
128 changed files with 0 additions and 9644 deletions

View File

@ -1,24 +0,0 @@
.coverage
MANIFEST
coverage.xml
nosetests.xml
junit-report.xml
pylint.txt
toy.py
tox.ini
violations.pyflakes.txt
cover/
build/
docs/_build
requests.egg-info/
*.pyc
*.swp
*.egg
env/
.workon
t.py
t2.py
dist

View File

@ -1,161 +0,0 @@
Requests is written and maintained by Kenneth Reitz and
various contributors:
Development Lead
````````````````
- Kenneth Reitz <me@kennethreitz.org> `@kennethreitz <https://github.com/kennethreitz>`_
Core Contributors
`````````````````
- Cory Benfield <cory@lukasa.co.uk> `@lukasa <https://github.com/lukasa>`_
- Ian Cordasco <graffatcolmingov@gmail.com> `@sigmavirus24 <https://github.com/sigmavirus24>`_
Urllib3
```````
- Andrey Petrov <andrey.petrov@shazow.net>
Patches and Suggestions
```````````````````````
- Various Pocoo Members
- Chris Adams
- Flavio Percoco Premoli
- Dj Gilcrease
- Justin Murphy
- Rob Madole
- Aram Dulyan
- Johannes Gorset
- 村山めがね (Megane Murayama)
- James Rowe
- Daniel Schauenberg
- Zbigniew Siciarz
- Daniele Tricoli 'Eriol'
- Richard Boulton
- Miguel Olivares <miguel@moliware.com>
- Alberto Paro
- Jérémy Bethmont
- 潘旭 (Xu Pan)
- Tamás Gulácsi
- Rubén Abad
- Peter Manser
- Jeremy Selier
- Jens Diemer
- Alex (`@alopatin <https://github.com/alopatin>`_)
- Tom Hogans <tomhsx@gmail.com>
- Armin Ronacher
- Shrikant Sharat Kandula
- Mikko Ohtamaa
- Den Shabalin
- Daniel Miller <danielm@vs-networks.com>
- Alejandro Giacometti
- Rick Mak
- Johan Bergström
- Josselin Jacquard
- Travis N. Vaught
- Fredrik Möllerstrand
- Daniel Hengeveld
- Dan Head
- Bruno Renié
- David Fischer
- Joseph McCullough
- Juergen Brendel
- Juan Riaza
- Ryan Kelly
- Rolando Espinoza La fuente
- Robert Gieseke
- Idan Gazit
- Ed Summers
- Chris Van Horne
- Christopher Davis
- Ori Livneh
- Jason Emerick
- Bryan Helmig
- Jonas Obrist
- Lucian Ursu
- Tom Moertel
- Frank Kumro Jr
- Chase Sterling
- Marty Alchin
- takluyver
- Ben Toews (`@mastahyeti <https://github.com/mastahyeti>`_)
- David Kemp
- Brendon Crawford
- Denis (`@Telofy <https://github.com/Telofy>`_)
- Matt Giuca
- Adam Tauber
- Honza Javorek
- Brendan Maguire <maguire.brendan@gmail.com>
- Chris Dary
- Danver Braganza <danverbraganza@gmail.com>
- Max Countryman
- Nick Chadwick
- Jonathan Drosdeck
- Jiri Machalek
- Steve Pulec
- Michael Kelly
- Michael Newman <newmaniese@gmail.com>
- Jonty Wareing <jonty@jonty.co.uk>
- Shivaram Lingamneni
- Miguel Turner
- Rohan Jain (`@crodjer <https://github.com/crodjer>`_)
- Justin Barber <barber.justin@gmail.com>
- Roman Haritonov (`@reclosedev <https://github.com/reclosedev>`_)
- Josh Imhoff <joshimhoff13@gmail.com>
- Arup Malakar <amalakar@gmail.com>
- Danilo Bargen (`@dbrgn <https://github.com/dbrgn>`_)
- Torsten Landschoff
- Michael Holler (`@apotheos <https://github.com/apotheos>`_)
- Timnit Gebru
- Sarah Gonzalez
- Victoria Mo
- Leila Muhtasib
- Matthias Rahlf <matthias@webding.de>
- Jakub Roztocil <jakub@roztocil.name>
- Rhys Elsmore
- André Graf (`@dergraf <https://github.com/dergraf>`_)
- Stephen Zhuang (`@everbird <https://github.com/everbird>`_)
- Martijn Pieters
- Jonatan Heyman
- David Bonner <dbonner@gmail.com> (`@rascalking <https://github.com/rascalking>`_)
- Vinod Chandru
- Johnny Goodnow <j.goodnow29@gmail.com>
- Denis Ryzhkov <denisr@denisr.com>
- Wilfred Hughes <me@wilfred.me.uk>
- Dmitry Medvinsky <me@dmedvinsky.name>
- Bryce Boe <bbzbryce@gmail.com> (`@bboe <https://github.com/bboe>`_)
- Colin Dunklau <colin.dunklau@gmail.com> (`@cdunklau <https://github.com/cdunklau>`_)
- Bob Carroll <bob.carroll@alum.rit.edu> (`@rcarz <https://github.com/rcarz>`_)
- Hugo Osvaldo Barrera <hugo@osvaldobarrera.com.ar> (`@hobarrera <https://github.com/hobarrera>`_)
- Łukasz Langa <lukasz@langa.pl>
- Dave Shawley <daveshawley@gmail.com>
- James Clarke (`@jam <https://github.com/jam>`_)
- Kevin Burke <kev@inburke.com>
- Flavio Curella
- David Pursehouse <david.pursehouse@gmail.com> (`@dpursehouse <https://github.com/dpursehouse>`_)
- Jon Parise
- Alexander Karpinsky (`@homm86 <https://twitter.com/homm86>`_)
- Marc Schlaich (`@schlamar <https://github.com/schlamar>`_)
- Park Ilsu <daftonshady@gmail.com> (`@daftshady <https://github.com/daftshady>`_)
- Matt Spitz (`@mattspitz <https://github.com/mattspitz>`_)
- Vikram Oberoi (`@voberoi <https://github.com/voberoi>`_)
- Can Ibanoglu <can.ibanoglu@gmail.com> (`@canibanoglu <https://github.com/canibanoglu>`_)
- Thomas Weißschuh <thomas@t-8ch.de> (`@t-8ch <https://github.com/t-8ch>`_)
- Jayson Vantuyl <jayson@aggressive.ly>
- Pengfei.X <pengphy@gmail.com>
- Kamil Madac <kamil.madac@gmail.com>
- Michael Becker <mike@beckerfuffle.com> (`@beckerfuffle <https://twitter.com/beckerfuffle>`_)
- Erik Wickstrom <erik@erikwickstrom.com> (`@erikwickstrom <https://github.com/erikwickstrom>`_)
- Константин Подшумок (`@podshumok <https://github.com/podshumok>`_)
- Ben Bass (`@codedstructure <https://github.com/codedstructure>`_)
- Jonathan Wong <evolutionace@gmail.com> (`@ContinuousFunction <https://github.com/ContinuousFunction>`_)
- Martin Jul (`@mjul <https://github.com/mjul>`_)
- Joe Alcorn (`@buttscicles <https://github.com/buttscicles>`_)
- Syed Suhail Ahmed <ssuhail.ahmed93@gmail.com> (`@syedsuhail <https://github.com/syedsuhail>`_)
- Scott Sadler (`@ssadler <https://github.com/ssadler>`_)
- Arthur Darcet (`@arthurdarcet <https://github.com/arthurdarcet>`_)

View File

@ -1,904 +0,0 @@
.. :changelog:
Release History
---------------
2.5.1 (2014-12-23)
++++++++++++++++++
**Behavioural Changes**
- Only catch HTTPErrors in raise_for_status (#2382)
**Bugfixes**
- Handle LocationParseError from urllib3 (#2344)
- Handle file-like object filenames that are not strings (#2379)
- Unbreak HTTPDigestAuth handler. Allow new nonces to be negotiated (#2389)
2.5.0 (2014-12-01)
++++++++++++++++++
**Improvements**
- Allow usage of urllib3's Retry object with HTTPAdapters (#2216)
- The ``iter_lines`` method on a response now accepts a delimiter with which
to split the content (#2295)
**Behavioural Changes**
- Add deprecation warnings to functions in requests.utils that will be removed
in 3.0 (#2309)
- Sessions used by the functional API are always closed (#2326)
- Restrict requests to HTTP/1.1 and HTTP/1.0 (stop accepting HTTP/0.9) (#2323)
**Bugfixes**
- Only parse the URL once (#2353)
- Allow Content-Length header to always be overriden (#2332)
- Properly handle files in HTTPDigestAuth (#2333)
- Cap redirect_cache size to prevent memory abuse (#2299)
- Fix HTTPDigestAuth handling of redirects after authenticating successfully
(#2253)
- Fix crash with custom method parameter to Session.request (#2317)
- Fix how Link headers are parsed using the regular expression library (#2271)
**Documentation**
- Add more references for interlinking (#2348)
- Update CSS for theme (#2290)
- Update width of buttons and sidebar (#2289)
- Replace references of Gittip with Gratipay (#2282)
- Add link to changelog in sidebar (#2273)
2.4.3 (2014-10-06)
++++++++++++++++++
**Bugfixes**
- Unicode URL improvements for Python 2.
- Re-order JSON param for backwards compat.
- Automatically defrag authentication schemes from host/pass URIs. (`#2249 <https://github.com/kennethreitz/requests/issues/2249>`_)
2.4.2 (2014-10-05)
++++++++++++++++++
**Improvements**
- FINALLY! Add json parameter for uploads! (`#2258 <https://github.com/kennethreitz/requests/pull/2258>`_)
- Support for bytestring URLs on Python 3.x (`#2238 <https://github.com/kennethreitz/requests/pull/2238>`_)
**Bugfixes**
- Avoid getting stuck in a loop (`#2244 <https://github.com/kennethreitz/requests/pull/2244>`_)
- Multiple calls to iter* fail with unhelpful error. (`#2240 <https://github.com/kennethreitz/requests/issues/2240>`_, `#2241 <https://github.com/kennethreitz/requests/issues/2241>`_)
**Documentation**
- Correct redirection introduction (`#2245 <https://github.com/kennethreitz/requests/pull/2245/>`_)
- Added example of how to send multiple files in one request. (`#2227 <https://github.com/kennethreitz/requests/pull/2227/>`_)
- Clarify how to pass a custom set of CAs (`#2248 <https://github.com/kennethreitz/requests/pull/2248/>`_)
2.4.1 (2014-09-09)
++++++++++++++++++
- Now has a "security" package extras set, ``$ pip install requests[security]``
- Requests will now use Certifi if it is available.
- Capture and re-raise urllib3 ProtocolError
- Bugfix for responses that attempt to redirect to themselves forever (wtf?).
2.4.0 (2014-08-29)
++++++++++++++++++
**Behavioral Changes**
- ``Connection: keep-alive`` header is now sent automatically.
**Improvements**
- Support for connect timeouts! Timeout now accepts a tuple (connect, read) which is used to set individual connect and read timeouts.
- Allow copying of PreparedRequests without headers/cookies.
- Updated bundled urllib3 version.
- Refactored settings loading from environment -- new `Session.merge_environment_settings`.
- Handle socket errors in iter_content.
2.3.0 (2014-05-16)
++++++++++++++++++
**API Changes**
- New ``Response`` property ``is_redirect``, which is true when the
library could have processed this response as a redirection (whether
or not it actually did).
- The ``timeout`` parameter now affects requests with both ``stream=True`` and
``stream=False`` equally.
- The change in v2.0.0 to mandate explicit proxy schemes has been reverted.
Proxy schemes now default to ``http://``.
- The ``CaseInsensitiveDict`` used for HTTP headers now behaves like a normal
dictionary when references as string or viewed in the interpreter.
**Bugfixes**
- No longer expose Authorization or Proxy-Authorization headers on redirect.
Fix CVE-2014-1829 and CVE-2014-1830 respectively.
- Authorization is re-evaluated each redirect.
- On redirect, pass url as native strings.
- Fall-back to autodetected encoding for JSON when Unicode detection fails.
- Headers set to ``None`` on the ``Session`` are now correctly not sent.
- Correctly honor ``decode_unicode`` even if it wasn't used earlier in the same
response.
- Stop advertising ``compress`` as a supported Content-Encoding.
- The ``Response.history`` parameter is now always a list.
- Many, many ``urllib3`` bugfixes.
2.2.1 (2014-01-23)
++++++++++++++++++
**Bugfixes**
- Fixes incorrect parsing of proxy credentials that contain a literal or encoded '#' character.
- Assorted urllib3 fixes.
2.2.0 (2014-01-09)
++++++++++++++++++
**API Changes**
- New exception: ``ContentDecodingError``. Raised instead of ``urllib3``
``DecodeError`` exceptions.
**Bugfixes**
- Avoid many many exceptions from the buggy implementation of ``proxy_bypass`` on OS X in Python 2.6.
- Avoid crashing when attempting to get authentication credentials from ~/.netrc when running as a user without a home directory.
- Use the correct pool size for pools of connections to proxies.
- Fix iteration of ``CookieJar`` objects.
- Ensure that cookies are persisted over redirect.
- Switch back to using chardet, since it has merged with charade.
2.1.0 (2013-12-05)
++++++++++++++++++
- Updated CA Bundle, of course.
- Cookies set on individual Requests through a ``Session`` (e.g. via ``Session.get()``) are no longer persisted to the ``Session``.
- Clean up connections when we hit problems during chunked upload, rather than leaking them.
- Return connections to the pool when a chunked upload is successful, rather than leaking it.
- Match the HTTPbis recommendation for HTTP 301 redirects.
- Prevent hanging when using streaming uploads and Digest Auth when a 401 is received.
- Values of headers set by Requests are now always the native string type.
- Fix previously broken SNI support.
- Fix accessing HTTP proxies using proxy authentication.
- Unencode HTTP Basic usernames and passwords extracted from URLs.
- Support for IP address ranges for no_proxy environment variable
- Parse headers correctly when users override the default ``Host:`` header.
- Avoid munging the URL in case of case-sensitive servers.
- Looser URL handling for non-HTTP/HTTPS urls.
- Accept unicode methods in Python 2.6 and 2.7.
- More resilient cookie handling.
- Make ``Response`` objects pickleable.
- Actually added MD5-sess to Digest Auth instead of pretending to like last time.
- Updated internal urllib3.
- Fixed @Lukasa's lack of taste.
2.0.1 (2013-10-24)
++++++++++++++++++
- Updated included CA Bundle with new mistrusts and automated process for the future
- Added MD5-sess to Digest Auth
- Accept per-file headers in multipart file POST messages.
- Fixed: Don't send the full URL on CONNECT messages.
- Fixed: Correctly lowercase a redirect scheme.
- Fixed: Cookies not persisted when set via functional API.
- Fixed: Translate urllib3 ProxyError into a requests ProxyError derived from ConnectionError.
- Updated internal urllib3 and chardet.
2.0.0 (2013-09-24)
++++++++++++++++++
**API Changes:**
- Keys in the Headers dictionary are now native strings on all Python versions,
i.e. bytestrings on Python 2, unicode on Python 3.
- Proxy URLs now *must* have an explicit scheme. A ``MissingSchema`` exception
will be raised if they don't.
- Timeouts now apply to read time if ``Stream=False``.
- ``RequestException`` is now a subclass of ``IOError``, not ``RuntimeError``.
- Added new method to ``PreparedRequest`` objects: ``PreparedRequest.copy()``.
- Added new method to ``Session`` objects: ``Session.update_request()``. This
method updates a ``Request`` object with the data (e.g. cookies) stored on
the ``Session``.
- Added new method to ``Session`` objects: ``Session.prepare_request()``. This
method updates and prepares a ``Request`` object, and returns the
corresponding ``PreparedRequest`` object.
- Added new method to ``HTTPAdapter`` objects: ``HTTPAdapter.proxy_headers()``.
This should not be called directly, but improves the subclass interface.
- ``httplib.IncompleteRead`` exceptions caused by incorrect chunked encoding
will now raise a Requests ``ChunkedEncodingError`` instead.
- Invalid percent-escape sequences now cause a Requests ``InvalidURL``
exception to be raised.
- HTTP 208 no longer uses reason phrase ``"im_used"``. Correctly uses
``"already_reported"``.
- HTTP 226 reason added (``"im_used"``).
**Bugfixes:**
- Vastly improved proxy support, including the CONNECT verb. Special thanks to
the many contributors who worked towards this improvement.
- Cookies are now properly managed when 401 authentication responses are
received.
- Chunked encoding fixes.
- Support for mixed case schemes.
- Better handling of streaming downloads.
- Retrieve environment proxies from more locations.
- Minor cookies fixes.
- Improved redirect behaviour.
- Improved streaming behaviour, particularly for compressed data.
- Miscellaneous small Python 3 text encoding bugs.
- ``.netrc`` no longer overrides explicit auth.
- Cookies set by hooks are now correctly persisted on Sessions.
- Fix problem with cookies that specify port numbers in their host field.
- ``BytesIO`` can be used to perform streaming uploads.
- More generous parsing of the ``no_proxy`` environment variable.
- Non-string objects can be passed in data values alongside files.
1.2.3 (2013-05-25)
++++++++++++++++++
- Simple packaging fix
1.2.2 (2013-05-23)
++++++++++++++++++
- Simple packaging fix
1.2.1 (2013-05-20)
++++++++++++++++++
- 301 and 302 redirects now change the verb to GET for all verbs, not just
POST, improving browser compatibility.
- Python 3.3.2 compatibility
- Always percent-encode location headers
- Fix connection adapter matching to be most-specific first
- new argument to the default connection adapter for passing a block argument
- prevent a KeyError when there's no link headers
1.2.0 (2013-03-31)
++++++++++++++++++
- Fixed cookies on sessions and on requests
- Significantly change how hooks are dispatched - hooks now receive all the
arguments specified by the user when making a request so hooks can make a
secondary request with the same parameters. This is especially necessary for
authentication handler authors
- certifi support was removed
- Fixed bug where using OAuth 1 with body ``signature_type`` sent no data
- Major proxy work thanks to @Lukasa including parsing of proxy authentication
from the proxy url
- Fix DigestAuth handling too many 401s
- Update vendored urllib3 to include SSL bug fixes
- Allow keyword arguments to be passed to ``json.loads()`` via the
``Response.json()`` method
- Don't send ``Content-Length`` header by default on ``GET`` or ``HEAD``
requests
- Add ``elapsed`` attribute to ``Response`` objects to time how long a request
took.
- Fix ``RequestsCookieJar``
- Sessions and Adapters are now picklable, i.e., can be used with the
multiprocessing library
- Update charade to version 1.0.3
The change in how hooks are dispatched will likely cause a great deal of
issues.
1.1.0 (2013-01-10)
++++++++++++++++++
- CHUNKED REQUESTS
- Support for iterable response bodies
- Assume servers persist redirect params
- Allow explicit content types to be specified for file data
- Make merge_kwargs case-insensitive when looking up keys
1.0.3 (2012-12-18)
++++++++++++++++++
- Fix file upload encoding bug
- Fix cookie behavior
1.0.2 (2012-12-17)
++++++++++++++++++
- Proxy fix for HTTPAdapter.
1.0.1 (2012-12-17)
++++++++++++++++++
- Cert verification exception bug.
- Proxy fix for HTTPAdapter.
1.0.0 (2012-12-17)
++++++++++++++++++
- Massive Refactor and Simplification
- Switch to Apache 2.0 license
- Swappable Connection Adapters
- Mountable Connection Adapters
- Mutable ProcessedRequest chain
- /s/prefetch/stream
- Removal of all configuration
- Standard library logging
- Make Response.json() callable, not property.
- Usage of new charade project, which provides python 2 and 3 simultaneous chardet.
- Removal of all hooks except 'response'
- Removal of all authentication helpers (OAuth, Kerberos)
This is not a backwards compatible change.
0.14.2 (2012-10-27)
+++++++++++++++++++
- Improved mime-compatible JSON handling
- Proxy fixes
- Path hack fixes
- Case-Insensistive Content-Encoding headers
- Support for CJK parameters in form posts
0.14.1 (2012-10-01)
+++++++++++++++++++
- Python 3.3 Compatibility
- Simply default accept-encoding
- Bugfixes
0.14.0 (2012-09-02)
++++++++++++++++++++
- No more iter_content errors if already downloaded.
0.13.9 (2012-08-25)
+++++++++++++++++++
- Fix for OAuth + POSTs
- Remove exception eating from dispatch_hook
- General bugfixes
0.13.8 (2012-08-21)
+++++++++++++++++++
- Incredible Link header support :)
0.13.7 (2012-08-19)
+++++++++++++++++++
- Support for (key, value) lists everywhere.
- Digest Authentication improvements.
- Ensure proxy exclusions work properly.
- Clearer UnicodeError exceptions.
- Automatic casting of URLs to tsrings (fURL and such)
- Bugfixes.
0.13.6 (2012-08-06)
+++++++++++++++++++
- Long awaited fix for hanging connections!
0.13.5 (2012-07-27)
+++++++++++++++++++
- Packaging fix
0.13.4 (2012-07-27)
+++++++++++++++++++
- GSSAPI/Kerberos authentication!
- App Engine 2.7 Fixes!
- Fix leaking connections (from urllib3 update)
- OAuthlib path hack fix
- OAuthlib URL parameters fix.
0.13.3 (2012-07-12)
+++++++++++++++++++
- Use simplejson if available.
- Do not hide SSLErrors behind Timeouts.
- Fixed param handling with urls containing fragments.
- Significantly improved information in User Agent.
- client certificates are ignored when verify=False
0.13.2 (2012-06-28)
+++++++++++++++++++
- Zero dependencies (once again)!
- New: Response.reason
- Sign querystring parameters in OAuth 1.0
- Client certificates no longer ignored when verify=False
- Add openSUSE certificate support
0.13.1 (2012-06-07)
+++++++++++++++++++
- Allow passing a file or file-like object as data.
- Allow hooks to return responses that indicate errors.
- Fix Response.text and Response.json for body-less responses.
0.13.0 (2012-05-29)
+++++++++++++++++++
- Removal of Requests.async in favor of `grequests <https://github.com/kennethreitz/grequests>`_
- Allow disabling of cookie persistiance.
- New implimentation of safe_mode
- cookies.get now supports default argument
- Session cookies not saved when Session.request is called with return_response=False
- Env: no_proxy support.
- RequestsCookieJar improvements.
- Various bug fixes.
0.12.1 (2012-05-08)
+++++++++++++++++++
- New ``Response.json`` property.
- Ability to add string file uploads.
- Fix out-of-range issue with iter_lines.
- Fix iter_content default size.
- Fix POST redirects containing files.
0.12.0 (2012-05-02)
+++++++++++++++++++
- EXPERIMENTAL OAUTH SUPPORT!
- Proper CookieJar-backed cookies interface with awesome dict-like interface.
- Speed fix for non-iterated content chunks.
- Move ``pre_request`` to a more usable place.
- New ``pre_send`` hook.
- Lazily encode data, params, files.
- Load system Certificate Bundle if ``certify`` isn't available.
- Cleanups, fixes.
0.11.2 (2012-04-22)
+++++++++++++++++++
- Attempt to use the OS's certificate bundle if ``certifi`` isn't available.
- Infinite digest auth redirect fix.
- Multi-part file upload improvements.
- Fix decoding of invalid %encodings in URLs.
- If there is no content in a response don't throw an error the second time that content is attempted to be read.
- Upload data on redirects.
0.11.1 (2012-03-30)
+++++++++++++++++++
* POST redirects now break RFC to do what browsers do: Follow up with a GET.
* New ``strict_mode`` configuration to disable new redirect behavior.
0.11.0 (2012-03-14)
+++++++++++++++++++
* Private SSL Certificate support
* Remove select.poll from Gevent monkeypatching
* Remove redundant generator for chunked transfer encoding
* Fix: Response.ok raises Timeout Exception in safe_mode
0.10.8 (2012-03-09)
+++++++++++++++++++
* Generate chunked ValueError fix
* Proxy configuration by environment variables
* Simplification of iter_lines.
* New `trust_env` configuration for disabling system/environment hints.
* Suppress cookie errors.
0.10.7 (2012-03-07)
+++++++++++++++++++
* `encode_uri` = False
0.10.6 (2012-02-25)
+++++++++++++++++++
* Allow '=' in cookies.
0.10.5 (2012-02-25)
+++++++++++++++++++
* Response body with 0 content-length fix.
* New async.imap.
* Don't fail on netrc.
0.10.4 (2012-02-20)
+++++++++++++++++++
* Honor netrc.
0.10.3 (2012-02-20)
+++++++++++++++++++
* HEAD requests don't follow redirects anymore.
* raise_for_status() doesn't raise for 3xx anymore.
* Make Session objects picklable.
* ValueError for invalid schema URLs.
0.10.2 (2012-01-15)
+++++++++++++++++++
* Vastly improved URL quoting.
* Additional allowed cookie key values.
* Attempted fix for "Too many open files" Error
* Replace unicode errors on first pass, no need for second pass.
* Append '/' to bare-domain urls before query insertion.
* Exceptions now inherit from RuntimeError.
* Binary uploads + auth fix.
* Bugfixes.
0.10.1 (2012-01-23)
+++++++++++++++++++
* PYTHON 3 SUPPORT!
* Dropped 2.5 Support. (*Backwards Incompatible*)
0.10.0 (2012-01-21)
+++++++++++++++++++
* ``Response.content`` is now bytes-only. (*Backwards Incompatible*)
* New ``Response.text`` is unicode-only.
* If no ``Response.encoding`` is specified and ``chardet`` is available, ``Respoonse.text`` will guess an encoding.
* Default to ISO-8859-1 (Western) encoding for "text" subtypes.
* Removal of `decode_unicode`. (*Backwards Incompatible*)
* New multiple-hooks system.
* New ``Response.register_hook`` for registering hooks within the pipeline.
* ``Response.url`` is now Unicode.
0.9.3 (2012-01-18)
++++++++++++++++++
* SSL verify=False bugfix (apparent on windows machines).
0.9.2 (2012-01-18)
++++++++++++++++++
* Asynchronous async.send method.
* Support for proper chunk streams with boundaries.
* session argument for Session classes.
* Print entire hook tracebacks, not just exception instance.
* Fix response.iter_lines from pending next line.
* Fix but in HTTP-digest auth w/ URI having query strings.
* Fix in Event Hooks section.
* Urllib3 update.
0.9.1 (2012-01-06)
++++++++++++++++++
* danger_mode for automatic Response.raise_for_status()
* Response.iter_lines refactor
0.9.0 (2011-12-28)
++++++++++++++++++
* verify ssl is default.
0.8.9 (2011-12-28)
++++++++++++++++++
* Packaging fix.
0.8.8 (2011-12-28)
++++++++++++++++++
* SSL CERT VERIFICATION!
* Release of Cerifi: Mozilla's cert list.
* New 'verify' argument for SSL requests.
* Urllib3 update.
0.8.7 (2011-12-24)
++++++++++++++++++
* iter_lines last-line truncation fix
* Force safe_mode for async requests
* Handle safe_mode exceptions more consistently
* Fix iteration on null responses in safe_mode
0.8.6 (2011-12-18)
++++++++++++++++++
* Socket timeout fixes.
* Proxy Authorization support.
0.8.5 (2011-12-14)
++++++++++++++++++
* Response.iter_lines!
0.8.4 (2011-12-11)
++++++++++++++++++
* Prefetch bugfix.
* Added license to installed version.
0.8.3 (2011-11-27)
++++++++++++++++++
* Converted auth system to use simpler callable objects.
* New session parameter to API methods.
* Display full URL while logging.
0.8.2 (2011-11-19)
++++++++++++++++++
* New Unicode decoding system, based on over-ridable `Response.encoding`.
* Proper URL slash-quote handling.
* Cookies with ``[``, ``]``, and ``_`` allowed.
0.8.1 (2011-11-15)
++++++++++++++++++
* URL Request path fix
* Proxy fix.
* Timeouts fix.
0.8.0 (2011-11-13)
++++++++++++++++++
* Keep-alive support!
* Complete removal of Urllib2
* Complete removal of Poster
* Complete removal of CookieJars
* New ConnectionError raising
* Safe_mode for error catching
* prefetch parameter for request methods
* OPTION method
* Async pool size throttling
* File uploads send real names
* Vendored in urllib3
0.7.6 (2011-11-07)
++++++++++++++++++
* Digest authentication bugfix (attach query data to path)
0.7.5 (2011-11-04)
++++++++++++++++++
* Response.content = None if there was an invalid repsonse.
* Redirection auth handling.
0.7.4 (2011-10-26)
++++++++++++++++++
* Session Hooks fix.
0.7.3 (2011-10-23)
++++++++++++++++++
* Digest Auth fix.
0.7.2 (2011-10-23)
++++++++++++++++++
* PATCH Fix.
0.7.1 (2011-10-23)
++++++++++++++++++
* Move away from urllib2 authentication handling.
* Fully Remove AuthManager, AuthObject, &c.
* New tuple-based auth system with handler callbacks.
0.7.0 (2011-10-22)
++++++++++++++++++
* Sessions are now the primary interface.
* Deprecated InvalidMethodException.
* PATCH fix.
* New config system (no more global settings).
0.6.6 (2011-10-19)
++++++++++++++++++
* Session parameter bugfix (params merging).
0.6.5 (2011-10-18)
++++++++++++++++++
* Offline (fast) test suite.
* Session dictionary argument merging.
0.6.4 (2011-10-13)
++++++++++++++++++
* Automatic decoding of unicode, based on HTTP Headers.
* New ``decode_unicode`` setting.
* Removal of ``r.read/close`` methods.
* New ``r.faw`` interface for advanced response usage.*
* Automatic expansion of parameterized headers.
0.6.3 (2011-10-13)
++++++++++++++++++
* Beautiful ``requests.async`` module, for making async requests w/ gevent.
0.6.2 (2011-10-09)
++++++++++++++++++
* GET/HEAD obeys allow_redirects=False.
0.6.1 (2011-08-20)
++++++++++++++++++
* Enhanced status codes experience ``\o/``
* Set a maximum number of redirects (``settings.max_redirects``)
* Full Unicode URL support
* Support for protocol-less redirects.
* Allow for arbitrary request types.
* Bugfixes
0.6.0 (2011-08-17)
++++++++++++++++++
* New callback hook system
* New persistient sessions object and context manager
* Transparent Dict-cookie handling
* Status code reference object
* Removed Response.cached
* Added Response.request
* All args are kwargs
* Relative redirect support
* HTTPError handling improvements
* Improved https testing
* Bugfixes
0.5.1 (2011-07-23)
++++++++++++++++++
* International Domain Name Support!
* Access headers without fetching entire body (``read()``)
* Use lists as dicts for parameters
* Add Forced Basic Authentication
* Forced Basic is default authentication type
* ``python-requests.org`` default User-Agent header
* CaseInsensitiveDict lower-case caching
* Response.history bugfix
0.5.0 (2011-06-21)
++++++++++++++++++
* PATCH Support
* Support for Proxies
* HTTPBin Test Suite
* Redirect Fixes
* settings.verbose stream writing
* Querystrings for all methods
* URLErrors (Connection Refused, Timeout, Invalid URLs) are treated as explicity raised
``r.requests.get('hwe://blah'); r.raise_for_status()``
0.4.1 (2011-05-22)
++++++++++++++++++
* Improved Redirection Handling
* New 'allow_redirects' param for following non-GET/HEAD Redirects
* Settings module refactoring
0.4.0 (2011-05-15)
++++++++++++++++++
* Response.history: list of redirected responses
* Case-Insensitive Header Dictionaries!
* Unicode URLs
0.3.4 (2011-05-14)
++++++++++++++++++
* Urllib2 HTTPAuthentication Recursion fix (Basic/Digest)
* Internal Refactor
* Bytes data upload Bugfix
0.3.3 (2011-05-12)
++++++++++++++++++
* Request timeouts
* Unicode url-encoded data
* Settings context manager and module
0.3.2 (2011-04-15)
++++++++++++++++++
* Automatic Decompression of GZip Encoded Content
* AutoAuth Support for Tupled HTTP Auth
0.3.1 (2011-04-01)
++++++++++++++++++
* Cookie Changes
* Response.read()
* Poster fix
0.3.0 (2011-02-25)
++++++++++++++++++
* Automatic Authentication API Change
* Smarter Query URL Parameterization
* Allow file uploads and POST data together
* New Authentication Manager System
- Simpler Basic HTTP System
- Supports all build-in urllib2 Auths
- Allows for custom Auth Handlers
0.2.4 (2011-02-19)
++++++++++++++++++
* Python 2.5 Support
* PyPy-c v1.4 Support
* Auto-Authentication tests
* Improved Request object constructor
0.2.3 (2011-02-15)
++++++++++++++++++
* New HTTPHandling Methods
- Response.__nonzero__ (false if bad HTTP Status)
- Response.ok (True if expected HTTP Status)
- Response.error (Logged HTTPError if bad HTTP Status)
- Response.raise_for_status() (Raises stored HTTPError)
0.2.2 (2011-02-14)
++++++++++++++++++
* Still handles request in the event of an HTTPError. (Issue #2)
* Eventlet and Gevent Monkeypatch support.
* Cookie Support (Issue #1)
0.2.1 (2011-02-14)
++++++++++++++++++
* Added file attribute to POST and PUT requests for multipart-encode file uploads.
* Added Request.url attribute for context and redirects
0.2.0 (2011-02-14)
++++++++++++++++++
* Birth!
0.0.1 (2011-02-13)
++++++++++++++++++
* Frustration
* Conception

View File

@ -1,13 +0,0 @@
Copyright 2015 Kenneth Reitz
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1 +0,0 @@
include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem

View File

@ -1,39 +0,0 @@
.PHONY: docs
init:
pip install -r requirements.txt
test:
# This runs all of the tests. To run an individual test, run py.test with
# the -k flag, like "py.test -k test_path_is_not_double_encoded"
py.test test_requests.py
coverage:
py.test --verbose --cov-report term --cov=requests test_requests.py
ci: init
py.test --junitxml=junit.xml
certs:
curl http://ci.kennethreitz.org/job/ca-bundle/lastSuccessfulBuild/artifact/cacerts.pem -o requests/cacert.pem
deps: urllib3 chardet
urllib3:
git clone https://github.com/shazow/urllib3.git && rm -fr requests/packages/urllib3 && mv urllib3/urllib3 requests/packages/ && rm -fr urllib3
chardet:
git clone https://github.com/chardet/chardet.git && rm -fr requests/packages/chardet && mv chardet/chardet requests/packages/ && rm -fr chardet
publish:
python setup.py register
python setup.py sdist upload
python setup.py bdist_wheel upload
docs-init:
pip install -r docs/requirements.txt
docs:
cd docs && make html
@echo "\033[95m\n\nBuild successful! View the docs homepage at docs/_build/html/index.html.\n\033[0m"

View File

@ -1,54 +0,0 @@
Requests includes some vendorized python libraries to ease installation.
Urllib3 License
===============
This is the MIT license: http://www.opensource.org/licenses/mit-license.php
Copyright 2008-2011 Andrey Petrov and contributors (see CONTRIBUTORS.txt),
Modifications copyright 2012 Kenneth Reitz.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Chardet License
===============
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
CA Bundle License
=================
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,85 +0,0 @@
Requests: HTTP for Humans
=========================
.. image:: https://badge.fury.io/py/requests.png
:target: http://badge.fury.io/py/requests
.. image:: https://pypip.in/d/requests/badge.png
:target: https://crate.io/packages/requests/
Requests is an Apache2 Licensed HTTP library, written in Python, for human
beings.
Most existing Python modules for sending HTTP requests are extremely
verbose and cumbersome. Python's builtin urllib2 module provides most of
the HTTP capabilities you should need, but the api is thoroughly broken.
It requires an enormous amount of work (even method overrides) to
perform the simplest of tasks.
Things shouldn't be this way. Not in Python.
.. code-block:: python
>>> r = requests.get('https://api.github.com', auth=('user', 'pass'))
>>> r.status_code
204
>>> r.headers['content-type']
'application/json'
>>> r.text
...
See `the same code, without Requests <https://gist.github.com/973705>`_.
Requests allow you to send HTTP/1.1 requests. You can add headers, form data,
multipart files, and parameters with simple Python dictionaries, and access the
response data in the same way. It's powered by httplib and `urllib3
<https://github.com/shazow/urllib3>`_, but it does all the hard work and crazy
hacks for you.
Features
--------
- International Domains and URLs
- Keep-Alive & Connection Pooling
- Sessions with Cookie Persistence
- Browser-style SSL Verification
- Basic/Digest Authentication
- Elegant Key/Value Cookies
- Automatic Decompression
- Unicode Response Bodies
- Multipart File Uploads
- Connection Timeouts
- Thread-safety
- HTTP(S) proxy support
Installation
------------
To install Requests, simply:
.. code-block:: bash
$ pip install requests
Documentation
-------------
Documentation is available at http://docs.python-requests.org/.
Contribute
----------
#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a `Contributor Friendly`_ tag for issues that should be ideal for people who are not very familiar with the codebase yet.
#. If you feel uncomfortable or uncertain about an issue or your changes, feel free to email @sigmavirus24 and he will happily help you via email, Skype, remote pairing or whatever you are comfortable with.
#. Fork `the repository`_ on GitHub to start making your changes to the **master** branch (or branch off of it).
#. Write a test which shows that the bug was fixed or that the feature works as expected.
#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.
.. _`the repository`: http://github.com/kennethreitz/requests
.. _AUTHORS: https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst
.. _Contributor Friendly: https://github.com/kennethreitz/requests/issues?direction=desc&labels=Contributor+Friendly&page=1&sort=updated&state=open

View File

@ -1 +0,0 @@
include HISTORY.rst README.rst LICENSE

View File

@ -1,153 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Requests.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Requests.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Requests"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Requests"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
make -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,52 +0,0 @@
<p class="logo">
<a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/requests-sidebar.png', 1) }}" title="Rezzy the Requests Sea Turtle"/>
</a>
</p>
<p>
<iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&repo=requests&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
<p>
Requests is an elegant and simple HTTP library for Python, built for
human beings.
</p>
<p>
<a href="https://gumroad.com/l/RRZc" class="gumroad-button">Buy Requests Pro</a>
</p>
<h3>Get Updates</h3>
<p>Receive updates on new releases and upcoming projects.</p>
<p><a href="http://tinyletter.com/kennethreitz">Subscribe to Newsletter</a></p>
<h3>Translations</h3>
<ul>
<li><a href="http://docs.python-requests.org/">English</a></li>
<li><a href="http://fr.python-requests.org/">French</a></li>
<li><a href="http://de.python-requests.org/">German</a></li>
<li><a href="http://jp.python-requests.org/">Japanese</a></li>
<li><a href="http://cn.python-requests.org/">Chinese</a></li>
<li><a href="http://pt.python-requests.org/">Portuguese</a></li>
</ul>
<h3>Useful Links</h3>
<ul>
<li><a href="http://certifi.io/en/latest/">Certifi: Best CA Bundle</a></li>
<li><a href="https://github.com/sigmavirus24/requests-toolbelt">Requests-Toolbelt</a></li>
<p></p>
<li><a href="http://github.com/kennethreitz/requests">Requests @ GitHub</a></li>
<li><a href="http://pypi.python.org/pypi/requests">Requests @ PyPI</a></li>
<li><a href="http://github.com/kennethreitz/requests/issues">Issue Tracker</a></li>
<li><a href="http://docs.python-requests.org/en/latest/community/updates/#software-updates">Release History</a></li>
</ul>

View File

@ -1,26 +0,0 @@
<p class="logo">
<a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/requests-sidebar.png', 1) }}" title="Rezzy the Requests Sea Turtle"/>
</a>
</p>
<p>
<iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&repo=requests&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
<p>
Requests is an elegant and simple HTTP library for Python, built for
human beings. You are currently looking at the documentation of the
development release.
</p>
<p>
<a href="https://gumroad.com/l/RRZc" class="gumroad-button">Buy Requests Pro</a>
</p>
<h3>Get Updates</h3>
<p>Receive updates on new releases and upcoming projects.</p>
<p><a href="http://tinyletter.com/kennethreitz">Subscribe to Newsletter</a></p>

View File

@ -1,3 +0,0 @@
*.pyc
*.pyo
.DS_Store

View File

@ -1,45 +0,0 @@
Modifications:
Copyright (c) 2011 Kenneth Reitz.
Original Project:
Copyright (c) 2010 by Armin Ronacher.
Some rights reserved.
Redistribution and use in source and binary forms of the theme, with or
without modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
We kindly ask you to only use these themes in an unmodified manner just
for Flask and Flask-related products, not for unrelated projects. If you
like the visual style and want to use it for your own projects, please
consider making some larger changes to the themes (such as changing
font faces, sizes, colors or margins).
THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,25 +0,0 @@
krTheme Sphinx Style
====================
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:
1. put this folder as _themes into your docs folder. Alternatively
you can also use git submodules to check out the contents there.
2. add this to your conf.py: ::
sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'flask'
The following themes exist:
**kr**
the standard flask documentation theme for large projects
**kr_small**
small one-page theme. Intended to be used by very small addon libraries.

View File

@ -1,86 +0,0 @@
# flasky extensions. flasky pygments style based on tango style
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
class FlaskyStyle(Style):
background_color = "#f8f8f8"
default_style = ""
styles = {
# No corresponding class for the following:
#Text: "", # class: ''
Whitespace: "underline #f8f8f8", # class: 'w'
Error: "#a40000 border:#ef2929", # class: 'err'
Other: "#000000", # class 'x'
Comment: "italic #8f5902", # class: 'c'
Comment.Preproc: "noitalic", # class: 'cp'
Keyword: "bold #004461", # class: 'k'
Keyword.Constant: "bold #004461", # class: 'kc'
Keyword.Declaration: "bold #004461", # class: 'kd'
Keyword.Namespace: "bold #004461", # class: 'kn'
Keyword.Pseudo: "bold #004461", # class: 'kp'
Keyword.Reserved: "bold #004461", # class: 'kr'
Keyword.Type: "bold #004461", # class: 'kt'
Operator: "#582800", # class: 'o'
Operator.Word: "bold #004461", # class: 'ow' - like keywords
Punctuation: "bold #000000", # class: 'p'
# because special names such as Name.Class, Name.Function, etc.
# are not recognized as such later in the parsing, we choose them
# to look the same as ordinary variables.
Name: "#000000", # class: 'n'
Name.Attribute: "#c4a000", # class: 'na' - to be revised
Name.Builtin: "#004461", # class: 'nb'
Name.Builtin.Pseudo: "#3465a4", # class: 'bp'
Name.Class: "#000000", # class: 'nc' - to be revised
Name.Constant: "#000000", # class: 'no' - to be revised
Name.Decorator: "#888", # class: 'nd' - to be revised
Name.Entity: "#ce5c00", # class: 'ni'
Name.Exception: "bold #cc0000", # class: 'ne'
Name.Function: "#000000", # class: 'nf'
Name.Property: "#000000", # class: 'py'
Name.Label: "#f57900", # class: 'nl'
Name.Namespace: "#000000", # class: 'nn' - to be revised
Name.Other: "#000000", # class: 'nx'
Name.Tag: "bold #004461", # class: 'nt' - like a keyword
Name.Variable: "#000000", # class: 'nv' - to be revised
Name.Variable.Class: "#000000", # class: 'vc' - to be revised
Name.Variable.Global: "#000000", # class: 'vg' - to be revised
Name.Variable.Instance: "#000000", # class: 'vi' - to be revised
Number: "#990000", # class: 'm'
Literal: "#000000", # class: 'l'
Literal.Date: "#000000", # class: 'ld'
String: "#4e9a06", # class: 's'
String.Backtick: "#4e9a06", # class: 'sb'
String.Char: "#4e9a06", # class: 'sc'
String.Doc: "italic #8f5902", # class: 'sd' - like a comment
String.Double: "#4e9a06", # class: 's2'
String.Escape: "#4e9a06", # class: 'se'
String.Heredoc: "#4e9a06", # class: 'sh'
String.Interpol: "#4e9a06", # class: 'si'
String.Other: "#4e9a06", # class: 'sx'
String.Regex: "#4e9a06", # class: 'sr'
String.Single: "#4e9a06", # class: 's1'
String.Symbol: "#4e9a06", # class: 'ss'
Generic: "#000000", # class: 'g'
Generic.Deleted: "#a40000", # class: 'gd'
Generic.Emph: "italic #000000", # class: 'ge'
Generic.Error: "#ef2929", # class: 'gr'
Generic.Heading: "bold #000080", # class: 'gh'
Generic.Inserted: "#00A000", # class: 'gi'
Generic.Output: "#888", # class: 'go'
Generic.Prompt: "#745334", # class: 'gp'
Generic.Strong: "bold #000000", # class: 'gs'
Generic.Subheading: "bold #800080", # class: 'gu'
Generic.Traceback: "bold #a40000", # class: 'gt'
}

View File

@ -1,85 +0,0 @@
{%- extends "basic/layout.html" %}
{%- block extrahead %}
{{ super() }}
{% if theme_touch_icon %}
<link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, 1) }}" />
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
<script type="text/javascript" src="https://gumroad.com/js/gumroad.js"></script>
{% endblock %}
{%- block relbar2 %}{% endblock %}
{%- block footer %}
<div class="footer">
&copy; Copyright {{ copyright }}.
</div>
<a href="https://github.com/kennethreitz/requests" class="github">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" class="github"/>
</a>
<script type="text/javascript" src="https://gumroad.com/js/gumroad.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
<script type="text/javascript">
setTimeout(function(){var a=document.createElement("script");
var b=document.getElementsByTagName("script")[0];
a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0013/7219.js?"+Math.floor(new Date().getTime()/3600000);
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
</script>
<script type="text/javascript">
new HelloBar(36402,48802);
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-8742933-11']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id',
'4ddc27f6613f5d186d000007');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
<script type="text/javascript">
(function() {
window._pa = window._pa || {};
_pa.productId = "requests-docs";
var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true;
pa.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + "//tag.perfectaudience.com/serve/5226171f87bc6890da0000a0.js";
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pa, s);
})();
</script>
{%- endblock %}

View File

@ -1,19 +0,0 @@
<h3>Related Topics</h3>
<ul>
<li><a href="{{ pathto(master_doc) }}">Documentation overview</a><ul>
{%- for parent in parents %}
<li><a href="{{ parent.link|e }}">{{ parent.title }}</a><ul>
{%- endfor %}
{%- if prev %}
<li>Previous: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
}}">{{ prev.title }}</a></li>
{%- endif %}
{%- if next %}
<li>Next: <a href="{{ next.link|e }}" title="{{ _('next chapter')
}}">{{ next.title }}</a></li>
{%- endif %}
{%- for parent in parents %}
</ul></li>
{%- endfor %}
</ul></li>
</ul>

View File

@ -1,536 +0,0 @@
/*
* flasky.css_t
* ~~~~~~~~~~~~
*
* :copyright: Copyright 2010 by Armin Ronacher. Modifications by Kenneth Reitz.
* :license: Flask Design License, see LICENSE for details.
*/
{% set page_width = '940px' %}
{% set sidebar_width = '220px' %}
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro';
font-size: 17px;
background-color: white;
color: #000;
margin: 0;
padding: 0;
}
div.document {
width: {{ page_width }};
margin: 30px auto 0 auto;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 {{ sidebar_width }};
}
div.sphinxsidebar {
width: {{ sidebar_width }};
}
hr {
border: 1px solid #B1B4B6;
}
div.body {
background-color: #ffffff;
color: #3E4349;
padding: 0 30px 0 30px;
}
img.floatingflask {
padding: 0 0 10px 10px;
float: right;
}
div.footer {
width: {{ page_width }};
margin: 20px auto 30px auto;
font-size: 14px;
color: #888;
text-align: right;
}
div.footer a {
color: #888;
}
div.related {
display: none;
}
div.sphinxsidebar a {
color: #444;
text-decoration: none;
border-bottom: 1px dotted #999;
}
div.sphinxsidebar a:hover {
border-bottom: 1px solid #999;
}
div.sphinxsidebar {
font-size: 14px;
line-height: 1.5;
}
div.sphinxsidebarwrapper {
padding: 18px 10px;
}
div.sphinxsidebarwrapper p.logo {
padding: 0;
margin: -10px 0 0 -20px;
text-align: center;
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: 'Garamond', 'Georgia', serif;
color: #444;
font-size: 24px;
font-weight: normal;
margin: 0 0 5px 0;
padding: 0;
}
div.sphinxsidebar h4 {
font-size: 20px;
}
div.sphinxsidebar h3 a {
color: #444;
}
div.sphinxsidebar p.logo a,
div.sphinxsidebar h3 a,
div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
border: none;
}
div.sphinxsidebar p {
color: #555;
margin: 10px 0;
}
div.sphinxsidebar ul {
margin: 10px 0;
padding: 0;
color: #000;
}
div.sphinxsidebar input {
border: 1px solid #ccc;
font-family: 'Georgia', serif;
font-size: 1em;
}
/* -- body styles ----------------------------------------------------------- */
a {
color: #004B6B;
text-decoration: underline;
}
a:hover {
color: #6D4100;
text-decoration: underline;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
margin: 30px 0px 10px 0px;
padding: 0;
}
div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
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: #ddd;
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;
}
div.admonition {
background: #fafafa;
margin: 20px -30px;
padding: 10px 30px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
div.admonition tt.xref, div.admonition a tt {
border-bottom: 1px solid #fafafa;
}
dd div.admonition {
margin-left: -60px;
padding-left: 60px;
}
div.admonition p.admonition-title {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
line-height: 1;
}
div.admonition p.last {
margin-bottom: 0;
}
div.highlight {
background-color: white;
}
dt:target, .highlight {
background: #FAF3E8;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre, tt {
font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.9em;
}
img.screenshot {
}
tt.descname, tt.descclassname {
font-size: 0.95em;
}
tt.descname {
padding-right: 0.08em;
}
img.screenshot {
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils {
border: 1px solid #888;
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils td, table.docutils th {
border: 1px solid #888;
padding: 0.25em 0.7em;
}
table.field-list, table.footnote {
border: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
table.footnote {
margin: 15px 0;
width: 100%;
border: 1px solid #eee;
background: #fdfdfd;
font-size: 0.9em;
}
table.footnote + table.footnote {
margin-top: -15px;
border-top: none;
}
table.field-list th {
padding: 0 0.8em 0 0;
}
table.field-list td {
padding: 0;
}
table.footnote td.label {
width: 0px;
padding: 0.3em 0 0.3em 0.5em;
}
table.footnote td {
padding: 0.3em 0.5em;
}
dl {
margin: 0;
padding: 0;
}
dl dd {
margin-left: 30px;
}
blockquote {
margin: 0 0 0 30px;
padding: 0;
}
ul, ol {
margin: 10px 0 10px 30px;
padding: 0;
}
pre {
background: #eee;
padding: 7px 30px;
margin: 15px -30px;
line-height: 1.3em;
}
dl pre, blockquote pre, li pre {
margin-left: -60px;
padding-left: 60px;
}
dl dl pre {
margin-left: -90px;
padding-left: 90px;
}
tt {
background-color: #ecf0f3;
color: #222;
/* padding: 1px 2px; */
}
tt.xref, a tt {
background-color: #FBFBFB;
border-bottom: 1px solid white;
}
a.reference {
text-decoration: none;
border-bottom: 1px dotted #004B6B;
}
a.reference:hover {
border-bottom: 1px solid #6D4100;
}
a.footnote-reference {
text-decoration: none;
font-size: 0.7em;
vertical-align: top;
border-bottom: 1px dotted #004B6B;
}
a.footnote-reference:hover {
border-bottom: 1px solid #6D4100;
}
a:hover tt {
background: #EEE;
}
@media screen and (max-width: 870px) {
div.sphinxsidebar {
display: none;
}
div.document {
width: 100%;
}
div.documentwrapper {
margin-left: 0;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
}
div.bodywrapper {
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
}
ul {
margin-left: 0;
}
.document {
width: auto;
}
.footer {
width: auto;
}
.bodywrapper {
margin: 0;
}
.footer {
width: auto;
}
.github {
display: none;
}
}
@media screen and (max-width: 875px) {
body {
margin: 0;
padding: 20px 30px;
}
div.documentwrapper {
float: none;
background: white;
}
div.sphinxsidebar {
display: block;
float: none;
width: 102.5%;
margin: 50px -30px -20px -30px;
padding: 10px 20px;
background: #333;
color: white;
}
div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
div.sphinxsidebar h3 a {
color: white;
}
div.sphinxsidebar a {
color: #aaa;
}
div.sphinxsidebar p.logo {
display: none;
}
div.document {
width: 100%;
margin: 0;
}
div.related {
display: block;
margin: 0;
padding: 10px 0 20px 0;
}
div.related ul,
div.related ul li {
margin: 0;
padding: 0;
}
div.footer {
display: none;
}
div.bodywrapper {
margin: 0;
}
div.body {
min-height: 0;
padding: 0;
}
.rtd_doc_footer {
display: none;
}
.document {
width: auto;
}
.footer {
width: auto;
}
.footer {
width: auto;
}
.github {
display: none;
}
}
/* misc. */
.revsys-inline {
display: none!important;
}

View File

@ -1,7 +0,0 @@
[theme]
inherit = basic
stylesheet = flasky.css
pygments_style = flask_theme_support.FlaskyStyle
[options]
touch_icon =

View File

@ -1,22 +0,0 @@
{% extends "basic/layout.html" %}
{% block header %}
{{ super() }}
{% if pagename == 'index' %}
<div class=indexwrapper>
{% endif %}
{% endblock %}
{% block footer %}
{% if pagename == 'index' %}
</div>
{% endif %}
{% endblock %}
{# do not display relbars #}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}
{% if theme_github_fork %}
<a href="http://github.com/{{ theme_github_fork }}"><img style="position: fixed; top: 0; right: 0; border: 0;"
src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
{% endif %}
{% endblock %}
{% block sidebar1 %}{% endblock %}
{% block sidebar2 %}{% endblock %}

View File

@ -1,287 +0,0 @@
/*
* flasky.css_t
* ~~~~~~~~~~~~
*
* Sphinx stylesheet -- flasky theme based on nature theme.
*
* :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: 'Georgia', serif;
font-size: 17px;
color: #000;
background: white;
margin: 0;
padding: 0;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 40px auto 0 auto;
width: 700px;
}
hr {
border: 1px solid #B1B4B6;
}
div.body {
background-color: #ffffff;
color: #3E4349;
padding: 0 30px 30px 30px;
}
img.floatingflask {
padding: 0 0 10px 10px;
float: right;
}
div.footer {
text-align: right;
color: #888;
padding: 10px;
font-size: 14px;
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,
div.body h4,
div.body h5,
div.body h6 {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
margin: 30px 0px 10px 0px;
padding: 0;
}
{% if theme_index_logo %}
div.indexwrapper h1 {
text-indent: -999999px;
background: url({{ theme_index_logo }}) no-repeat center center;
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;
}
div.admonition {
background: #fafafa;
margin: 20px -30px;
padding: 10px 30px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
div.admonition p.admonition-title {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
line-height: 1;
}
div.admonition p.last {
margin-bottom: 0;
}
div.highlight{
background-color: white;
}
dt:target, .highlight {
background: #FAF3E8;
}
div.note {
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: ":";
}
pre, tt {
font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.85em;
}
img.screenshot {
}
tt.descname, tt.descclassname {
font-size: 0.95em;
}
tt.descname {
padding-right: 0.08em;
}
img.screenshot {
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils {
border: 1px solid #888;
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils td, table.docutils th {
border: 1px solid #888;
padding: 0.25em 0.7em;
}
table.field-list, table.footnote {
border: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
table.footnote {
margin: 15px 0;
width: 100%;
border: 1px solid #eee;
}
table.field-list th {
padding: 0 0.8em 0 0;
}
table.field-list td {
padding: 0;
}
table.footnote td {
padding: 0.5em;
}
dl {
margin: 0;
padding: 0;
}
dl dd {
margin-left: 30px;
}
pre {
padding: 0;
margin: 15px -30px;
padding: 8px;
line-height: 1.3em;
padding: 7px 30px;
background: #eee;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
}
dl pre {
margin-left: -60px;
padding-left: 60px;
}
tt {
background-color: #ecf0f3;
color: #222;
/* padding: 1px 2px; */
}
tt.xref, a tt {
background-color: #FBFBFB;
}
a:hover tt {
background: #EEE;
}

View File

@ -1,10 +0,0 @@
[theme]
inherit = basic
stylesheet = flasky.css
nosidebar = true
pygments_style = flask_theme_support.FlaskyStyle
[options]
index_logo = ''
index_logo_height = 120px
github_fork = ''

View File

@ -1,265 +0,0 @@
.. _api:
Developer Interface
===================
.. module:: requests
This part of the documentation covers all the interfaces of Requests. For
parts where Requests depends on external libraries, we document the most
important right here and provide links to the canonical documentation.
Main Interface
--------------
All of Requests' functionality can be accessed by these 7 methods.
They all return an instance of the :class:`Response <Response>` object.
.. autofunction:: request
.. autofunction:: head
.. autofunction:: get
.. autofunction:: post
.. autofunction:: put
.. autofunction:: patch
.. autofunction:: delete
Lower-Level Classes
~~~~~~~~~~~~~~~~~~~
.. autoclass:: requests.Request
:inherited-members:
.. autoclass:: Response
:inherited-members:
Request Sessions
----------------
.. autoclass:: Session
:inherited-members:
.. autoclass:: requests.adapters.HTTPAdapter
:inherited-members:
Authentication
--------------
.. autoclass:: requests.auth.AuthBase
.. autoclass:: requests.auth.HTTPBasicAuth
.. autoclass:: requests.auth.HTTPProxyAuth
.. autoclass:: requests.auth.HTTPDigestAuth
Exceptions
~~~~~~~~~~
.. autoexception:: requests.exceptions.RequestException
.. autoexception:: requests.exceptions.ConnectionError
.. autoexception:: requests.exceptions.HTTPError
.. autoexception:: requests.exceptions.URLRequired
.. autoexception:: requests.exceptions.TooManyRedirects
.. autoexception:: requests.exceptions.ConnectTimeout
.. autoexception:: requests.exceptions.ReadTimeout
.. autoexception:: requests.exceptions.Timeout
Status Code Lookup
~~~~~~~~~~~~~~~~~~
.. autofunction:: requests.codes
::
>>> requests.codes['temporary_redirect']
307
>>> requests.codes.teapot
418
>>> requests.codes['\o/']
200
Cookies
~~~~~~~
.. autofunction:: requests.utils.dict_from_cookiejar
.. autofunction:: requests.utils.cookiejar_from_dict
.. autofunction:: requests.utils.add_dict_to_cookiejar
.. autoclass:: requests.cookies.RequestsCookieJar
:inherited-members:
.. autoclass:: requests.cookies.CookieConflictError
:inherited-members:
Encodings
~~~~~~~~~
.. autofunction:: requests.utils.get_encodings_from_content
.. autofunction:: requests.utils.get_encoding_from_headers
.. autofunction:: requests.utils.get_unicode_from_response
Classes
~~~~~~~
.. autoclass:: requests.Response
:inherited-members:
.. autoclass:: requests.Request
:inherited-members:
.. autoclass:: requests.PreparedRequest
:inherited-members:
.. _sessionapi:
.. autoclass:: requests.Session
:inherited-members:
.. autoclass:: requests.adapters.HTTPAdapter
:inherited-members:
Migrating to 1.x
----------------
This section details the main differences between 0.x and 1.x and is meant
to ease the pain of upgrading.
API Changes
~~~~~~~~~~~
* ``Response.json`` is now a callable and not a property of a response.
::
import requests
r = requests.get('https://github.com/timeline.json')
r.json() # This *call* raises an exception if JSON decoding fails
* The ``Session`` API has changed. Sessions objects no longer take parameters.
``Session`` is also now capitalized, but it can still be
instantiated with a lowercase ``session`` for backwards compatibility.
::
s = requests.Session() # formerly, session took parameters
s.auth = auth
s.headers.update(headers)
r = s.get('http://httpbin.org/headers')
* All request hooks have been removed except 'response'.
* Authentication helpers have been broken out into separate modules. See
requests-oauthlib_ and requests-kerberos_.
.. _requests-oauthlib: https://github.com/requests/requests-oauthlib
.. _requests-kerberos: https://github.com/requests/requests-kerberos
* The parameter for streaming requests was changed from ``prefetch`` to
``stream`` and the logic was inverted. In addition, ``stream`` is now
required for raw response reading.
::
# in 0.x, passing prefetch=False would accomplish the same thing
r = requests.get('https://github.com/timeline.json', stream=True)
for chunk in r.iter_content(8192):
...
* The ``config`` parameter to the requests method has been removed. Some of
these options are now configured on a ``Session`` such as keep-alive and
maximum number of redirects. The verbosity option should be handled by
configuring logging.
::
import requests
import logging
# these two lines enable debugging at httplib level (requests->urllib3->httplib)
# you will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA.
# the only thing missing will be the response.body which is not logged.
import httplib
httplib.HTTPConnection.debuglevel = 1
logging.basicConfig() # you need to initialize logging, otherwise you will not see anything from requests
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
requests.get('http://httpbin.org/headers')
Licensing
~~~~~~~~~
One key difference that has nothing to do with the API is a change in the
license from the ISC_ license to the `Apache 2.0`_ license. The Apache 2.0
license ensures that contributions to Requests are also covered by the Apache
2.0 license.
.. _ISC: http://opensource.org/licenses/ISC
.. _Apache 2.0: http://opensource.org/licenses/Apache-2.0
Migrating to 2.x
----------------
Compared with the 1.0 release, there were relatively few backwards
incompatible changes, but there are still a few issues to be aware of with
this major release.
For more details on the changes in this release including new APIs, links
to the relevant GitHub issues and some of the bug fixes, read Cory's blog_
on the subject.
.. _blog: http://lukasa.co.uk/2013/09/Requests_20/
API Changes
~~~~~~~~~~~
* There were a couple changes to how Requests handles exceptions.
``RequestException`` is now a subclass of ``IOError`` rather than
``RuntimeError`` as that more accurately categorizes the type of error.
In addition, an invalid URL escape sequence now raises a subclass of
``RequestException`` rather than a ``ValueError``.
::
requests.get('http://%zz/') # raises requests.exceptions.InvalidURL
Lastly, ``httplib.IncompleteRead`` exceptions caused by incorrect chunked
encoding will now raise a Requests ``ChunkedEncodingError`` instead.
* The proxy API has changed slightly. The scheme for a proxy URL is now
required.
::
proxies = {
"http": "10.10.1.10:3128", # use http://10.10.1.10:3128 instead
}
# In requests 1.x, this was legal, in requests 2.x,
# this raises requests.exceptions.MissingSchema
requests.get("http://example.org", proxies=proxies)
Behavioural Changes
~~~~~~~~~~~~~~~~~~~~~~~
* Keys in the ``headers`` dictionary are now native strings on all Python
versions, i.e. bytestrings on Python 2 and unicode on Python 3. If the
keys are not native strings (unicode on Python2 or bytestrings on Python 3)
they will be converted to the native string type assuming UTF-8 encoding.

View File

@ -1,88 +0,0 @@
.. _faq:
Frequently Asked Questions
==========================
This part of the documentation answers common questions about Requests.
Encoded Data?
-------------
Requests automatically decompresses gzip-encoded responses, and does
its best to decode response content to unicode when possible.
You can get direct access to the raw response (and even the socket),
if needed as well.
Custom User-Agents?
-------------------
Requests allows you to easily override User-Agent strings, along with
any other HTTP Header.
Why not Httplib2?
-----------------
Chris Adams gave an excellent summary on
`Hacker News <http://news.ycombinator.com/item?id=2884406>`_:
httplib2 is part of why you should use requests: it's far more respectable
as a client but not as well documented and it still takes way too much code
for basic operations. I appreciate what httplib2 is trying to do, that
there's a ton of hard low-level annoyances in building a modern HTTP
client, but really, just use requests instead. Kenneth Reitz is very
motivated and he gets the degree to which simple things should be simple
whereas httplib2 feels more like an academic exercise than something
people should use to build production systems[1].
Disclosure: I'm listed in the requests AUTHORS file but can claim credit
for, oh, about 0.0001% of the awesomeness.
1. http://code.google.com/p/httplib2/issues/detail?id=96 is a good example:
an annoying bug which affect many people, there was a fix available for
months, which worked great when I applied it in a fork and pounded a couple
TB of data through it, but it took over a year to make it into trunk and
even longer to make it onto PyPI where any other project which required "
httplib2" would get the working version.
Python 3 Support?
-----------------
Yes! Here's a list of Python platforms that are officially
supported:
* Python 2.6
* Python 2.7
* Python 3.1
* Python 3.2
* Python 3.3
* Python 3.4
* PyPy 1.9
* PyPy 2.2
What are "hostname doesn't match" errors?
-----------------------------------------
These errors occur when :ref:`SSL certificate verification <verification>`
fails to match the certificate the server responds with to the hostname
Requests thinks it's contacting. If you're certain the server's SSL setup is
correct (for example, because you can visit the site with your browser) and
you're using Python 2.6 or 2.7, a possible explanation is that you need
Server-Name-Indication.
`Server-Name-Indication`_, or SNI, is an official extension to SSL where the
client tells the server what hostname it is contacting. This is important
when servers are using `Virtual Hosting`_. When such servers are hosting
more than one SSL site they need to be able to return the appropriate
certificate based on the hostname the client is connecting to.
Python3's SSL module includes native support for SNI. This support has not been
back ported to Python2. For information on using SNI with Requests on Python2
refer to this `Stack Overflow answer`_.
.. _`Server-Name-Indication`: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _`virtual hosting`: https://en.wikipedia.org/wiki/Virtual_hosting
.. _`Stack Overflow answer`: https://stackoverflow.com/questions/18578439/using-requests-with-tls-doesnt-give-sni-support/18579484#18579484

View File

@ -1,32 +0,0 @@
Integrations
============
ScraperWiki
------------
`ScraperWiki <https://scraperwiki.com/>`_ is an excellent service that allows
you to run Python, Ruby, and PHP scraper scripts on the web. Now, Requests
v0.6.1 is available to use in your scrapers!
To give it a try, simply::
import requests
Python for iOS
--------------
Requests is built into the wonderful `Python for iOS <https://itunes.apple.com/us/app/python-2.7-for-ios/id485729872?mt=Python8>`_ runtime!
To give it a try, simply::
import requests
Articles & Talks
================
- `Python for the Web <http://gun.io/blog/python-for-the-web/>`_ teaches how to use Python to interact with the web, using Requests.
- `Daniel Greenfeld's Review of Requests <http://pydanny.blogspot.com/2011/05/python-http-requests-for-humans.html>`_
- `My 'Python for Humans' talk <http://python-for-humans.heroku.com>`_ ( `audio <http://codeconf.s3.amazonaws.com/2011/pycodeconf/talks/PyCodeConf2011%20-%20Kenneth%20Reitz.m4a>`_ )
- `Issac Kelly's 'Consuming Web APIs' talk <http://issackelly.github.com/Consuming-Web-APIs-with-Python-Talk/slides/slides.html>`_
- `Blog post about Requests via Yum <http://arunsag.wordpress.com/2011/08/17/new-package-python-requests-http-for-humans/>`_
- `Russian blog post introducing Requests <http://habrahabr.ru/blogs/python/126262/>`_

View File

@ -1,37 +0,0 @@
.. _support:
Support
=======
If you have questions or issues about Requests, there are several options:
Send a Tweet
------------
If your question is less than 140 characters, feel free to send a tweet to
`@kennethreitz <http://twitter.com/kennethreitz>`_.
File an Issue
-------------
If you notice some unexpected behaviour in Requests, or want to see support
for a new feature,
`file an issue on GitHub <https://github.com/kennethreitz/requests/issues>`_.
E-mail
------
I'm more than happy to answer any personal or in-depth questions about
Requests. Feel free to email
`requests@kennethreitz.com <mailto:requests@kennethreitz.com>`_.
IRC
---
The official Freenode channel for Requests is
`#python-requests <irc://irc.freenode.net/python-requests>`_
I'm also available as **kennethreitz** on Freenode.

View File

@ -1,41 +0,0 @@
.. _updates:
Community Updates
=================
If you'd like to stay up to date on the community and development of Requests,
there are several options:
GitHub
------
The best way to track the development of Requests is through
`the GitHub repo <https://github.com/kennethreitz/requests>`_.
Twitter
-------
I often tweet about new features and releases of Requests.
Follow `@kennethreitz <https://twitter.com/kennethreitz>`_ for updates.
Mailing List
------------
There's a low-volume mailing list for Requests. To subscribe to the
mailing list, send an email to
`requests@librelist.org <mailto:requests@librelist.org>`_.
Software Updates
================
.. include:: ../../HISTORY.rst

View File

@ -1,248 +0,0 @@
# -*- coding: utf-8 -*-
#
# Requests documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 13 23:54:25 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
import requests
from requests import __version__
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Requests'
copyright = u'2015. A <a href="http://kennethreitz.com/pages/open-projects.html">Kenneth Reitz</a> Project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = __version__
# The full version, including alpha/beta/rc tags.
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'flask_theme_support.FlaskyStyle'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
html_sidebars = {
'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],
'**': ['sidebarlogo.html', 'localtoc.html', 'relations.html',
'sourcelink.html', 'searchbox.html']
}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
html_show_sphinx = False
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'Requestsdoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'Requests.tex', u'Requests Documentation',
u'Kenneth Reitz', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'requests', u'Requests Documentation',
[u'Kenneth Reitz'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Requests', u'Requests Documentation', u'Kenneth Reitz',
'Requests', 'One line description of project.', 'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
texinfo_appendices = []
sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'kr'
intersphinx_mapping = {'urllib3': ('http://urllib3.readthedocs.org/en/latest', None)}

View File

@ -1,5 +0,0 @@
Authors
=======
.. include:: ../../AUTHORS.rst

View File

@ -1,43 +0,0 @@
Development Philosophy
======================
Requests is an open but opinionated library, created by an open but opinionated developer.
Management Style
~~~~~~~~~~~~~~~~
`Kenneth Reitz <http://kennethreitz.org>`_ is the BDFL. He has final say in any decision related to the Requests project. Kenneth is responsible for the direction and form of the library. In addition to making decisions based on technical merit, he is responsible for making decisions based on the development philosophy of Requests. Only Kenneth may merge code into Requests.
`Ian Cordasco <http://www.coglib.com/~icordasc/>`_ and `Cory Benfield <https://lukasa.co.uk/about/>`_ are the core contributors. They are responsible for triaging bug reports, reviewing pull requests and ensuring that Kenneth is kept up to speed with developments around the library. The day-to-day managing of the project is done by the core contributors. They are responsible for making judgements about whether or not a feature request is likely to be accepted by Kenneth. They do not have the authority to change code or merge code changes, though they may change documentation. Their word is not final.
Values
~~~~~~
- Simplicity is always better than functionality.
- Listen to everyone, then disregard it.
- The API is all that matters. Everything else is secondary.
- Fit the 90% use-case. Ignore the nay-sayers.
Semantic Versioning
~~~~~~~~~~~~~~~~~~~
For many years, the open source community has been plagued with version number dystonia. Numbers vary so greatly from project to project, they are practically meaningless.
Requests uses `Semantic Versioning <http://semver.org>`_. This specification seeks to put an end to this madness with a small set of practical guidelines for you and your colleagues to use in your next project.
Standard Library?
~~~~~~~~~~~~~~~~~
Requests has no *active* plans to be included in the standard library. This decision has been discussed at length with Guido as well as numerous core developers.
Essentially, the standard library is where a library goes to die. It is appropriate for a module to be included when active development is no longer necessary.
Requests just reached v1.0.0. This huge milestone marks a major step in the right direction.
Linux Distro Packages
~~~~~~~~~~~~~~~~~~~~~
Distributions have been made for many Linux repositories, including: Ubuntu, Debian, RHEL, and Arch.
These distributions are sometimes divergent forks, or are otherwise not kept up-to-date with the latest code and bugfixes. PyPI (and its mirrors) and GitHub are the official distribution sources; alternatives are not supported by the Requests project.

View File

@ -1,59 +0,0 @@
How to Help
===========
Requests is under active development, and contributions are more than welcome!
#. Check for open issues or open a fresh issue to start a discussion around a bug.
There is a Contributor Friendly tag for issues that should be ideal for people who are not very
familiar with the codebase yet.
#. Fork `the repository <https://github.com/kennethreitz/requests>`_ on GitHub and start making your
changes to a new branch.
#. Write a test which shows that the bug was fixed.
#. Send a pull request and bug the maintainer until it gets merged and published. :)
Make sure to add yourself to `AUTHORS <https://github.com/kennethreitz/requests/blob/master/AUTHORS.rst>`_.
Feature Freeze
--------------
As of v1.0.0, Requests has now entered a feature freeze. Requests for new
features and Pull Requests implementing those features will not be accepted.
Development Dependencies
------------------------
You'll need to install py.test in order to run the Requests' test suite::
$ pip install -r requirements.txt
$ py.test
platform darwin -- Python 2.7.3 -- pytest-2.3.4
collected 25 items
test_requests.py .........................
25 passed in 3.50 seconds
Runtime Environments
--------------------
Requests currently supports the following versions of Python:
- Python 2.6
- Python 2.7
- Python 3.1
- Python 3.2
- Python 3.3
- PyPy 1.9
Support for Python 3.1 and 3.2 may be dropped at any time.
Google App Engine will never be officially supported. Pull Requests for compatibility will be accepted, as long as they don't complicate the codebase.
Are you crazy?
--------------
- SPDY support would be awesome. No C extensions.
Downstream Repackaging
----------------------
If you are repackaging Requests, please note that you must also redistribute the ``cacerts.pem`` file in order to get correct SSL functionality.

View File

@ -1,144 +0,0 @@
.. Requests documentation master file, created by
sphinx-quickstart on Sun Feb 13 23:54:25 2011.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Requests: HTTP for Humans
=========================
Release v\ |version|. (:ref:`Installation <install>`)
Requests is an :ref:`Apache2 Licensed <apache2>` HTTP library, written in
Python, for human beings.
Python's standard **urllib2** module provides most of
the HTTP capabilities you need, but the API is thoroughly **broken**.
It was built for a different time — and a different web. It requires an
*enormous* amount of work (even method overrides) to perform the simplest of
tasks.
Things shouldnt be this way. Not in Python.
::
>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
>>> r.status_code
200
>>> r.headers['content-type']
'application/json; charset=utf8'
>>> r.encoding
'utf-8'
>>> r.text
u'{"type":"User"...'
>>> r.json()
{u'private_gists': 419, u'total_private_repos': 77, ...}
See `similar code, without Requests <https://gist.github.com/973705>`_.
Requests takes all of the work out of Python HTTP/1.1 — making your integration
with web services seamless. There's no need to manually add query strings to
your URLs, or to form-encode your POST data. Keep-alive and HTTP connection
pooling are 100% automatic, powered by `urllib3 <https://github.com/shazow/urllib3>`_,
which is embedded within Requests.
Testimonials
------------
Her Majesty's Government, Amazon, Google, Twilio, Runscope, Mozilla, Heroku,
PayPal, NPR, Obama for America, Transifex, Native Instruments, The Washington
Post, Twitter, SoundCloud, Kippt, Readability, Sony, and Federal US Institutions that prefer to be unnamed
use Requests internally. It has been downloaded over 23,000,000 times from PyPI.
**Armin Ronacher**
Requests is the perfect example how beautiful an API can be with the
right level of abstraction.
**Matt DeBoard**
I'm going to get @kennethreitz's Python requests module tattooed
on my body, somehow. The whole thing.
**Daniel Greenfeld**
Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to
@kennethreitz's request library. Today has been AWESOME.
**Kenny Meyers**
Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful,
simple, Pythonic.
Feature Support
---------------
Requests is ready for today's web.
- International Domains and URLs
- Keep-Alive & Connection Pooling
- Sessions with Cookie Persistence
- Browser-style SSL Verification
- Basic/Digest Authentication
- Elegant Key/Value Cookies
- Automatic Decompression
- Unicode Response Bodies
- Multipart File Uploads
- Connection Timeouts
- ``.netrc`` support
- Python 2.6—3.4
- Thread-safe.
User Guide
----------
This part of the documentation, which is mostly prose, begins with some
background information about Requests, then focuses on step-by-step
instructions for getting the most out of Requests.
.. toctree::
:maxdepth: 2
user/intro
user/install
user/quickstart
user/advanced
user/authentication
Community Guide
-----------------
This part of the documentation, which is mostly prose, details the
Requests ecosystem and community.
.. toctree::
:maxdepth: 1
community/faq
community/out-there.rst
community/support
community/updates
API Documentation
-----------------
If you are looking for information on a specific function, class or method,
this part of the documentation is for you.
.. toctree::
:maxdepth: 2
api
Contributor Guide
-----------------
If you want to contribute to the project, this part of the documentation is for
you.
.. toctree::
:maxdepth: 1
dev/philosophy
dev/todo
dev/authors

View File

@ -1,190 +0,0 @@
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Requests.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Requests.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
:end

View File

@ -1 +0,0 @@
Sphinx==1.1.3

View File

@ -1,798 +0,0 @@
.. _advanced:
Advanced Usage
==============
This document covers some of Requests more advanced features.
.. _session-objects:
Session Objects
---------------
The Session object allows you to persist certain parameters across
requests. It also persists cookies across all requests made from the
Session instance.
A Session object has all the methods of the main Requests API.
Let's persist some cookies across requests::
s = requests.Session()
s.get('http://httpbin.org/cookies/set/sessioncookie/123456789')
r = s.get("http://httpbin.org/cookies")
print(r.text)
# '{"cookies": {"sessioncookie": "123456789"}}'
Sessions can also be used to provide default data to the request methods. This
is done by providing data to the properties on a Session object::
s = requests.Session()
s.auth = ('user', 'pass')
s.headers.update({'x-test': 'true'})
# both 'x-test' and 'x-test2' are sent
s.get('http://httpbin.org/headers', headers={'x-test2': 'true'})
Any dictionaries that you pass to a request method will be merged with the
session-level values that are set. The method-level parameters override session
parameters.
.. admonition:: Remove a Value From a Dict Parameter
Sometimes you'll want to omit session-level keys from a dict parameter. To
do this, you simply set that key's value to ``None`` in the method-level
parameter. It will automatically be omitted.
All values that are contained within a session are directly available to you.
See the :ref:`Session API Docs <sessionapi>` to learn more.
.. _request-and-response-objects:
Request and Response Objects
----------------------------
Whenever a call is made to ``requests.get()`` and friends you are doing two
major things. First, you are constructing a ``Request`` object which will be
sent off to a server to request or query some resource. Second, a ``Response``
object is generated once ``requests`` gets a response back from the server.
The Response object contains all of the information returned by the server and
also contains the ``Request`` object you created originally. Here is a simple
request to get some very important information from Wikipedia's servers::
>>> r = requests.get('http://en.wikipedia.org/wiki/Monty_Python')
If we want to access the headers the server sent back to us, we do this::
>>> r.headers
{'content-length': '56170', 'x-content-type-options': 'nosniff', 'x-cache':
'HIT from cp1006.eqiad.wmnet, MISS from cp1010.eqiad.wmnet', 'content-encoding':
'gzip', 'age': '3080', 'content-language': 'en', 'vary': 'Accept-Encoding,Cookie',
'server': 'Apache', 'last-modified': 'Wed, 13 Jun 2012 01:33:50 GMT',
'connection': 'close', 'cache-control': 'private, s-maxage=0, max-age=0,
must-revalidate', 'date': 'Thu, 14 Jun 2012 12:59:39 GMT', 'content-type':
'text/html; charset=UTF-8', 'x-cache-lookup': 'HIT from cp1006.eqiad.wmnet:3128,
MISS from cp1010.eqiad.wmnet:80'}
However, if we want to get the headers we sent the server, we simply access the
request, and then the request's headers::
>>> r.request.headers
{'Accept-Encoding': 'identity, deflate, compress, gzip',
'Accept': '*/*', 'User-Agent': 'python-requests/1.2.0'}
.. _prepared-requests:
Prepared Requests
-----------------
Whenever you receive a :class:`Response <requests.Response>` object
from an API call or a Session call, the ``request`` attribute is actually the
``PreparedRequest`` that was used. In some cases you may wish to do some extra
work to the body or headers (or anything else really) before sending a
request. The simple recipe for this is the following::
from requests import Request, Session
s = Session()
req = Request('GET', url,
data=data,
headers=header
)
prepped = req.prepare()
# do something with prepped.body
# do something with prepped.headers
resp = s.send(prepped,
stream=stream,
verify=verify,
proxies=proxies,
cert=cert,
timeout=timeout
)
print(resp.status_code)
Since you are not doing anything special with the ``Request`` object, you
prepare it immediately and modify the ``PreparedRequest`` object. You then
send that with the other parameters you would have sent to ``requests.*`` or
``Session.*``.
However, the above code will lose some of the advantages of having a Requests
:class:`Session <requests.Session>` object. In particular,
:class:`Session <requests.Session>`-level state such as cookies will
not get applied to your request. To get a
:class:`PreparedRequest <requests.PreparedRequest>` with that state
applied, replace the call to :meth:`Request.prepare()
<requests.Request.prepare>` with a call to
:meth:`Session.prepare_request() <requests.Session.prepare_request>`, like this::
from requests import Request, Session
s = Session()
req = Request('GET', url,
data=data
headers=headers
)
prepped = s.prepare_request(req)
# do something with prepped.body
# do something with prepped.headers
resp = s.send(prepped,
stream=stream,
verify=verify,
proxies=proxies,
cert=cert,
timeout=timeout
)
print(resp.status_code)
.. _verification:
SSL Cert Verification
---------------------
Requests can verify SSL certificates for HTTPS requests, just like a web browser.
To check a host's SSL certificate, you can use the ``verify`` argument::
>>> requests.get('https://kennethreitz.com', verify=True)
requests.exceptions.SSLError: hostname 'kennethreitz.com' doesn't match either of '*.herokuapp.com', 'herokuapp.com'
I don't have SSL setup on this domain, so it fails. Excellent. GitHub does though::
>>> requests.get('https://github.com', verify=True)
<Response [200]>
You can pass ``verify`` the path to a CA_BUNDLE file with certificates of trusted CAs. This list of trusted CAs can also be specified through the ``REQUESTS_CA_BUNDLE`` environment variable.
Requests can also ignore verifying the SSL certificate if you set ``verify`` to False.
::
>>> requests.get('https://kennethreitz.com', verify=False)
<Response [200]>
By default, ``verify`` is set to True. Option ``verify`` only applies to host certs.
You can also specify a local cert to use as client side certificate, as a single
file (containing the private key and the certificate) or as a tuple of both
file's path::
>>> requests.get('https://kennethreitz.com', cert=('/path/server.crt', '/path/key'))
<Response [200]>
If you specify a wrong path or an invalid cert::
>>> requests.get('https://kennethreitz.com', cert='/wrong_path/server.pem')
SSLError: [Errno 336265225] _ssl.c:347: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib
.. _body-content-workflow:
Body Content Workflow
---------------------
By default, when you make a request, the body of the response is downloaded
immediately. You can override this behaviour and defer downloading the response
body until you access the :class:`Response.content <requests.Response.content>`
attribute with the ``stream`` parameter::
tarball_url = 'https://github.com/kennethreitz/requests/tarball/master'
r = requests.get(tarball_url, stream=True)
At this point only the response headers have been downloaded and the connection
remains open, hence allowing us to make content retrieval conditional::
if int(r.headers['content-length']) < TOO_LONG:
content = r.content
...
You can further control the workflow by use of the :class:`Response.iter_content <requests.Response.iter_content>`
and :class:`Response.iter_lines <requests.Response.iter_lines>` methods.
Alternatively, you can read the undecoded body from the underlying
urllib3 :class:`urllib3.HTTPResponse <urllib3.response.HTTPResponse>` at
:class:`Response.raw <requests.Response.raw>`.
If you set ``stream`` to ``True`` when making a request, Requests cannot
release the connection back to the pool unless you consume all the data or call
:class:`Response.close <requests.Response.close>`. This can lead to
inefficiency with connections. If you find yourself partially reading request
bodies (or not reading them at all) while using ``stream=True``, you should
consider using ``contextlib.closing`` (`documented here`_), like this::
from contextlib import closing
with closing(requests.get('http://httpbin.org/get', stream=True)) as r:
# Do things with the response here.
.. _`documented here`: http://docs.python.org/2/library/contextlib.html#contextlib.closing
.. _keep-alive:
Keep-Alive
----------
Excellent news — thanks to urllib3, keep-alive is 100% automatic within a session!
Any requests that you make within a session will automatically reuse the appropriate
connection!
Note that connections are only released back to the pool for reuse once all body
data has been read; be sure to either set ``stream`` to ``False`` or read the
``content`` property of the ``Response`` object.
.. _streaming-uploads:
Streaming Uploads
-----------------
Requests supports streaming uploads, which allow you to send large streams or
files without reading them into memory. To stream and upload, simply provide a
file-like object for your body::
with open('massive-body', 'rb') as f:
requests.post('http://some.url/streamed', data=f)
.. _chunk-encoding:
Chunk-Encoded Requests
----------------------
Requests also supports Chunked transfer encoding for outgoing and incoming requests.
To send a chunk-encoded request, simply provide a generator (or any iterator without
a length) for your body::
def gen():
yield 'hi'
yield 'there'
requests.post('http://some.url/chunked', data=gen())
.. _multipart:
POST Multiple Multipart-Encoded Files
-------------------------------------
You can send multiple files in one request. For example, suppose you want to
upload image files to an HTML form with a multiple file field 'images':
<input type="file" name="images" multiple="true" required="true"/>
To do that, just set files to a list of tuples of (form_field_name, file_info):
>>> url = 'http://httpbin.org/post'
>>> multiple_files = [('images', ('foo.png', open('foo.png', 'rb'), 'image/png')),
('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
>>> r = requests.post(url, files=multiple_files)
>>> r.text
{
...
'files': {'images': 'data:image/png;base64,iVBORw ....'}
'Content-Type': 'multipart/form-data; boundary=3131623adb2043caaeb5538cc7aa0b3a',
...
}
.. _event-hooks:
Event Hooks
-----------
Requests has a hook system that you can use to manipulate portions of
the request process, or signal event handling.
Available hooks:
``response``:
The response generated from a Request.
You can assign a hook function on a per-request basis by passing a
``{hook_name: callback_function}`` dictionary to the ``hooks`` request
parameter::
hooks=dict(response=print_url)
That ``callback_function`` will receive a chunk of data as its first
argument.
::
def print_url(r, *args, **kwargs):
print(r.url)
If an error occurs while executing your callback, a warning is given.
If the callback function returns a value, it is assumed that it is to
replace the data that was passed in. If the function doesn't return
anything, nothing else is effected.
Let's print some request method arguments at runtime::
>>> requests.get('http://httpbin.org', hooks=dict(response=print_url))
http://httpbin.org
<Response [200]>
.. _custom-auth:
Custom Authentication
---------------------
Requests allows you to use specify your own authentication mechanism.
Any callable which is passed as the ``auth`` argument to a request method will
have the opportunity to modify the request before it is dispatched.
Authentication implementations are subclasses of ``requests.auth.AuthBase``,
and are easy to define. Requests provides two common authentication scheme
implementations in ``requests.auth``: ``HTTPBasicAuth`` and ``HTTPDigestAuth``.
Let's pretend that we have a web service that will only respond if the
``X-Pizza`` header is set to a password value. Unlikely, but just go with it.
::
from requests.auth import AuthBase
class PizzaAuth(AuthBase):
"""Attaches HTTP Pizza Authentication to the given Request object."""
def __init__(self, username):
# setup any auth-related data here
self.username = username
def __call__(self, r):
# modify and return the request
r.headers['X-Pizza'] = self.username
return r
Then, we can make a request using our Pizza Auth::
>>> requests.get('http://pizzabin.org/admin', auth=PizzaAuth('kenneth'))
<Response [200]>
.. _streaming-requests:
Streaming Requests
------------------
With :class:`requests.Response.iter_lines()` you can easily
iterate over streaming APIs such as the `Twitter Streaming
API <https://dev.twitter.com/streaming/overview>`_. Simply
set ``stream`` to ``True`` and iterate over the response with
:class:`~requests.Response.iter_lines()`::
import json
import requests
r = requests.get('http://httpbin.org/stream/20', stream=True)
for line in r.iter_lines():
# filter out keep-alive new lines
if line:
print(json.loads(line))
.. _proxies:
Proxies
-------
If you need to use a proxy, you can configure individual requests with the
``proxies`` argument to any request method::
import requests
proxies = {
"http": "http://10.10.1.10:3128",
"https": "http://10.10.1.10:1080",
}
requests.get("http://example.org", proxies=proxies)
You can also configure proxies by setting the environment variables
``HTTP_PROXY`` and ``HTTPS_PROXY``.
::
$ export HTTP_PROXY="http://10.10.1.10:3128"
$ export HTTPS_PROXY="http://10.10.1.10:1080"
$ python
>>> import requests
>>> requests.get("http://example.org")
To use HTTP Basic Auth with your proxy, use the `http://user:password@host/` syntax::
proxies = {
"http": "http://user:pass@10.10.1.10:3128/",
}
Note that proxy URLs must include the scheme.
Compliance
----------
Requests is intended to be compliant with all relevant specifications and
RFCs where that compliance will not cause difficulties for users. This
attention to the specification can lead to some behaviour that may seem
unusual to those not familiar with the relevant specification.
Encodings
^^^^^^^^^
When you receive a response, Requests makes a guess at the encoding to
use for decoding the response when you access the :attr:`Response.text
<requests.Response.text>` attribute. Requests will first check for an
encoding in the HTTP header, and if none is present, will use `chardet
<http://pypi.python.org/pypi/chardet>`_ to attempt to guess the encoding.
The only time Requests will not do this is if no explicit charset
is present in the HTTP headers **and** the ``Content-Type``
header contains ``text``. In this situation, `RFC 2616
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1>`_ specifies
that the default charset must be ``ISO-8859-1``. Requests follows the
specification in this case. If you require a different encoding, you can
manually set the :attr:`Response.encoding <requests.Response.encoding>`
property, or use the raw :attr:`Response.content <requests.Response.content>`.
HTTP Verbs
----------
Requests provides access to almost the full range of HTTP verbs: GET, OPTIONS,
HEAD, POST, PUT, PATCH and DELETE. The following provides detailed examples of
using these various verbs in Requests, using the GitHub API.
We will begin with the verb most commonly used: GET. HTTP GET is an idempotent
method that returns a resource from a given URL. As a result, it is the verb
you ought to use when attempting to retrieve data from a web location. An
example usage would be attempting to get information about a specific commit
from GitHub. Suppose we wanted commit ``a050faf`` on Requests. We would get it
like so::
>>> import requests
>>> r = requests.get('https://api.github.com/repos/kennethreitz/requests/git/commits/a050faf084662f3a352dd1a941f2c7c9f886d4ad')
We should confirm that GitHub responded correctly. If it has, we want to work
out what type of content it is. Do this like so::
>>> if r.status_code == requests.codes.ok:
... print(r.headers['content-type'])
...
application/json; charset=utf-8
So, GitHub returns JSON. That's great, we can use the :meth:`r.json
<requests.Response.json>` method to parse it into Python objects.
::
>>> commit_data = r.json()
>>> print(commit_data.keys())
[u'committer', u'author', u'url', u'tree', u'sha', u'parents', u'message']
>>> print(commit_data[u'committer'])
{u'date': u'2012-05-10T11:10:50-07:00', u'email': u'me@kennethreitz.com', u'name': u'Kenneth Reitz'}
>>> print(commit_data[u'message'])
makin' history
So far, so simple. Well, let's investigate the GitHub API a little bit. Now,
we could look at the documentation, but we might have a little more fun if we
use Requests instead. We can take advantage of the Requests OPTIONS verb to
see what kinds of HTTP methods are supported on the url we just used.
::
>>> verbs = requests.options(r.url)
>>> verbs.status_code
500
Uh, what? That's unhelpful! Turns out GitHub, like many API providers, don't
actually implement the OPTIONS method. This is an annoying oversight, but it's
OK, we can just use the boring documentation. If GitHub had correctly
implemented OPTIONS, however, they should return the allowed methods in the
headers, e.g.
::
>>> verbs = requests.options('http://a-good-website.com/api/cats')
>>> print(verbs.headers['allow'])
GET,HEAD,POST,OPTIONS
Turning to the documentation, we see that the only other method allowed for
commits is POST, which creates a new commit. As we're using the Requests repo,
we should probably avoid making ham-handed POSTS to it. Instead, let's play
with the Issues feature of GitHub.
This documentation was added in response to Issue #482. Given that this issue
already exists, we will use it as an example. Let's start by getting it.
::
>>> r = requests.get('https://api.github.com/repos/kennethreitz/requests/issues/482')
>>> r.status_code
200
>>> issue = json.loads(r.text)
>>> print(issue[u'title'])
Feature any http verb in docs
>>> print(issue[u'comments'])
3
Cool, we have three comments. Let's take a look at the last of them.
::
>>> r = requests.get(r.url + u'/comments')
>>> r.status_code
200
>>> comments = r.json()
>>> print(comments[0].keys())
[u'body', u'url', u'created_at', u'updated_at', u'user', u'id']
>>> print(comments[2][u'body'])
Probably in the "advanced" section
Well, that seems like a silly place. Let's post a comment telling the poster
that he's silly. Who is the poster, anyway?
::
>>> print(comments[2][u'user'][u'login'])
kennethreitz
OK, so let's tell this Kenneth guy that we think this example should go in the
quickstart guide instead. According to the GitHub API doc, the way to do this
is to POST to the thread. Let's do it.
::
>>> body = json.dumps({u"body": u"Sounds great! I'll get right on it!"})
>>> url = u"https://api.github.com/repos/kennethreitz/requests/issues/482/comments"
>>> r = requests.post(url=url, data=body)
>>> r.status_code
404
Huh, that's weird. We probably need to authenticate. That'll be a pain, right?
Wrong. Requests makes it easy to use many forms of authentication, including
the very common Basic Auth.
::
>>> from requests.auth import HTTPBasicAuth
>>> auth = HTTPBasicAuth('fake@example.com', 'not_a_real_password')
>>> r = requests.post(url=url, data=body, auth=auth)
>>> r.status_code
201
>>> content = r.json()
>>> print(content[u'body'])
Sounds great! I'll get right on it.
Brilliant. Oh, wait, no! I meant to add that it would take me a while, because
I had to go feed my cat. If only I could edit this comment! Happily, GitHub
allows us to use another HTTP verb, PATCH, to edit this comment. Let's do
that.
::
>>> print(content[u"id"])
5804413
>>> body = json.dumps({u"body": u"Sounds great! I'll get right on it once I feed my cat."})
>>> url = u"https://api.github.com/repos/kennethreitz/requests/issues/comments/5804413"
>>> r = requests.patch(url=url, data=body, auth=auth)
>>> r.status_code
200
Excellent. Now, just to torture this Kenneth guy, I've decided to let him
sweat and not tell him that I'm working on this. That means I want to delete
this comment. GitHub lets us delete comments using the incredibly aptly named
DELETE method. Let's get rid of it.
::
>>> r = requests.delete(url=url, auth=auth)
>>> r.status_code
204
>>> r.headers['status']
'204 No Content'
Excellent. All gone. The last thing I want to know is how much of my ratelimit
I've used. Let's find out. GitHub sends that information in the headers, so
rather than download the whole page I'll send a HEAD request to get the
headers.
::
>>> r = requests.head(url=url, auth=auth)
>>> print(r.headers)
...
'x-ratelimit-remaining': '4995'
'x-ratelimit-limit': '5000'
...
Excellent. Time to write a Python program that abuses the GitHub API in all
kinds of exciting ways, 4995 more times.
Link Headers
------------
Many HTTP APIs feature Link headers. They make APIs more self describing and
discoverable.
GitHub uses these for `pagination <http://developer.github.com/v3/#pagination>`_
in their API, for example::
>>> url = 'https://api.github.com/users/kennethreitz/repos?page=1&per_page=10'
>>> r = requests.head(url=url)
>>> r.headers['link']
'<https://api.github.com/users/kennethreitz/repos?page=2&per_page=10>; rel="next", <https://api.github.com/users/kennethreitz/repos?page=6&per_page=10>; rel="last"'
Requests will automatically parse these link headers and make them easily consumable::
>>> r.links["next"]
{'url': 'https://api.github.com/users/kennethreitz/repos?page=2&per_page=10', 'rel': 'next'}
>>> r.links["last"]
{'url': 'https://api.github.com/users/kennethreitz/repos?page=7&per_page=10', 'rel': 'last'}
Transport Adapters
------------------
As of v1.0.0, Requests has moved to a modular internal design. Part of the
reason this was done was to implement Transport Adapters, originally
`described here`_. Transport Adapters provide a mechanism to define interaction
methods for an HTTP service. In particular, they allow you to apply per-service
configuration.
Requests ships with a single Transport Adapter, the :class:`HTTPAdapter
<requests.adapters.HTTPAdapter>`. This adapter provides the default Requests
interaction with HTTP and HTTPS using the powerful `urllib3`_ library. Whenever
a Requests :class:`Session <requests.Session>` is initialized, one of these is
attached to the :class:`Session <requests.Session>` object for HTTP, and one
for HTTPS.
Requests enables users to create and use their own Transport Adapters that
provide specific functionality. Once created, a Transport Adapter can be
mounted to a Session object, along with an indication of which web services
it should apply to.
::
>>> s = requests.Session()
>>> s.mount('http://www.github.com', MyAdapter())
The mount call registers a specific instance of a Transport Adapter to a
prefix. Once mounted, any HTTP request made using that session whose URL starts
with the given prefix will use the given Transport Adapter.
Many of the details of implementing a Transport Adapter are beyond the scope of
this documentation, but take a look at the next example for a simple SSL use-
case. For more than that, you might look at subclassing
``requests.adapters.BaseAdapter``.
Example: Specific SSL Version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The Requests team has made a specific choice to use whatever SSL version is
default in the underlying library (`urllib3`_). Normally this is fine, but from
time to time, you might find yourself needing to connect to a service-endpoint
that uses a version that isn't compatible with the default.
You can use Transport Adapters for this by taking most of the existing
implementation of HTTPAdapter, and adding a parameter *ssl_version* that gets
passed-through to `urllib3`. We'll make a TA that instructs the library to use
SSLv3:
::
import ssl
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
class Ssl3HttpAdapter(HTTPAdapter):
""""Transport adapter" that allows us to use SSLv3."""
def init_poolmanager(self, connections, maxsize, block=False):
self.poolmanager = PoolManager(num_pools=connections,
maxsize=maxsize,
block=block,
ssl_version=ssl.PROTOCOL_SSLv3)
.. _`described here`: http://www.kennethreitz.org/essays/the-future-of-python-http
.. _`urllib3`: https://github.com/shazow/urllib3
Blocking Or Non-Blocking?
-------------------------
With the default Transport Adapter in place, Requests does not provide any kind
of non-blocking IO. The :attr:`Response.content <requests.Response.content>`
property will block until the entire response has been downloaded. If
you require more granularity, the streaming features of the library (see
:ref:`streaming-requests`) allow you to retrieve smaller quantities of the
response at a time. However, these calls will still block.
If you are concerned about the use of blocking IO, there are lots of projects
out there that combine Requests with one of Python's asynchronicity frameworks.
Two excellent examples are `grequests`_ and `requests-futures`_.
.. _`grequests`: https://github.com/kennethreitz/grequests
.. _`requests-futures`: https://github.com/ross/requests-futures
Timeouts
--------
Most requests to external servers should have a timeout attached, in case the
server is not responding in a timely manner. Without a timeout, your code may
hang for minutes or more.
The **connect** timeout is the number of seconds Requests will wait for your
client to establish a connection to a remote machine (corresponding to the
`connect()`_) call on the socket. It's a good practice to set connect timeouts
to slightly larger than a multiple of 3, which is the default `TCP packet
retransmission window <http://www.hjp.at/doc/rfc/rfc2988.txt>`_.
Once your client has connected to the server and sent the HTTP request, the
**read** timeout is the number of seconds the client will wait for the server
to send a response. (Specifically, it's the number of seconds that the client
will wait *between* bytes sent from the server. In 99.9% of cases, this is the
time before the server sends the first byte).
If you specify a single value for the timeout, like this::
r = requests.get('https://github.com', timeout=5)
The timeout value will be applied to both the ``connect`` and the ``read``
timeouts. Specify a tuple if you would like to set the values separately::
r = requests.get('https://github.com', timeout=(3.05, 27))
If the remote server is very slow, you can tell Requests to wait forever for
a response, by passing None as a timeout value and then retrieving a cup of
coffee.
.. code-block:: python
r = requests.get('https://github.com', timeout=None)
.. _`connect()`: http://linux.die.net/man/2/connect
CA Certificates
---------------
By default Requests bundles a set of root CAs that it trusts, sourced from the
`Mozilla trust store`_. However, these are only updated once for each Requests
version. This means that if you pin a Requests version your certificates can
become extremely out of date.
From Requests version 2.4.0 onwards, Requests will attempt to use certificates
from `certifi`_ if it is present on the system. This allows for users to update
their trusted certificates without having to change the code that runs on their
system.
For the sake of security we recommend upgrading certifi frequently!
.. _certifi: http://certifi.io/
.. _Mozilla trust store: https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt

View File

@ -1,128 +0,0 @@
.. _authentication:
Authentication
==============
This document discusses using various kinds of authentication with Requests.
Many web services require authentication, and there are many different types.
Below, we outline various forms of authentication available in Requests, from
the simple to the complex.
Basic Authentication
--------------------
Many web services that require authentication accept HTTP Basic Auth. This is
the simplest kind, and Requests supports it straight out of the box.
Making requests with HTTP Basic Auth is very simple::
>>> from requests.auth import HTTPBasicAuth
>>> requests.get('https://api.github.com/user', auth=HTTPBasicAuth('user', 'pass'))
<Response [200]>
In fact, HTTP Basic Auth is so common that Requests provides a handy shorthand
for using it::
>>> requests.get('https://api.github.com/user', auth=('user', 'pass'))
<Response [200]>
Providing the credentials in a tuple like this is exactly the same as the
``HTTPBasicAuth`` example above.
netrc Authentication
~~~~~~~~~~~~~~~~~~~~
If no authentication method is given with the ``auth`` argument, Requests will
attempt to get the authentication credentials for the URL's hostname from the
user's netrc file.
If credentials for the hostname are found, the request is sent with HTTP Basic
Auth.
Digest Authentication
---------------------
Another very popular form of HTTP Authentication is Digest Authentication,
and Requests supports this out of the box as well::
>>> from requests.auth import HTTPDigestAuth
>>> url = 'http://httpbin.org/digest-auth/auth/user/pass'
>>> requests.get(url, auth=HTTPDigestAuth('user', 'pass'))
<Response [200]>
OAuth 1 Authentication
----------------------
A common form of authentication for several web APIs is OAuth. The ``requests-oauthlib``
library allows Requests users to easily make OAuth authenticated requests::
>>> import requests
>>> from requests_oauthlib import OAuth1
>>> url = 'https://api.twitter.com/1.1/account/verify_credentials.json'
>>> auth = OAuth1('YOUR_APP_KEY', 'YOUR_APP_SECRET',
'USER_OAUTH_TOKEN', 'USER_OAUTH_TOKEN_SECRET')
>>> requests.get(url, auth=auth)
<Response [200]>
For more information on how to OAuth flow works, please see the official `OAuth`_ website.
For examples and documentation on requests-oauthlib, please see the `requests_oauthlib`_
repository on GitHub
Other Authentication
--------------------
Requests is designed to allow other forms of authentication to be easily and
quickly plugged in. Members of the open-source community frequently write
authentication handlers for more complicated or less commonly-used forms of
authentication. Some of the best have been brought together under the
`Requests organization`_, including:
- Kerberos_
- NTLM_
If you want to use any of these forms of authentication, go straight to their
GitHub page and follow the instructions.
New Forms of Authentication
---------------------------
If you can't find a good implementation of the form of authentication you
want, you can implement it yourself. Requests makes it easy to add your own
forms of authentication.
To do so, subclass :class:`AuthBase <requests.auth.AuthBase>` and implement the
``__call__()`` method::
>>> import requests
>>> class MyAuth(requests.auth.AuthBase):
... def __call__(self, r):
... # Implement my authentication
... return r
...
>>> url = 'http://httpbin.org/get'
>>> requests.get(url, auth=MyAuth())
<Response [200]>
When an authentication handler is attached to a request,
it is called during request setup. The ``__call__`` method must therefore do
whatever is required to make the authentication work. Some forms of
authentication will additionally add hooks to provide further functionality.
Further examples can be found under the `Requests organization`_ and in the
``auth.py`` file.
.. _OAuth: http://oauth.net/
.. _requests_oauthlib: https://github.com/requests/requests-oauthlib
.. _Kerberos: https://github.com/requests/requests-kerberos
.. _NTLM: https://github.com/requests/requests-ntlm
.. _Requests organization: https://github.com/requests

View File

@ -1,47 +0,0 @@
.. _install:
Installation
============
This part of the documentation covers the installation of Requests.
The first step to using any software package is getting it properly installed.
Distribute & Pip
----------------
Installing Requests is simple with `pip <https://pip.pypa.io>`_, just run
this in your terminal::
$ pip install requests
or, with `easy_install <http://pypi.python.org/pypi/setuptools>`_::
$ easy_install requests
But, you really `shouldn't do that <https://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install>`_.
Get the Code
------------
Requests is actively developed on GitHub, where the code is
`always available <https://github.com/kennethreitz/requests>`_.
You can either clone the public repository::
$ git clone git://github.com/kennethreitz/requests.git
Download the `tarball <https://github.com/kennethreitz/requests/tarball/master>`_::
$ curl -OL https://github.com/kennethreitz/requests/tarball/master
Or, download the `zipball <https://github.com/kennethreitz/requests/zipball/master>`_::
$ curl -OL https://github.com/kennethreitz/requests/zipball/master
Once you have a copy of the source, you can embed it in your Python package,
or install it into your site-packages easily::
$ python setup.py install

View File

@ -1,45 +0,0 @@
.. _introduction:
Introduction
============
Philosophy
----------
Requests was developed with a few :pep:`20` idioms in mind.
#. Beautiful is better than ugly.
#. Explicit is better than implicit.
#. Simple is better than complex.
#. Complex is better than complicated.
#. Readability counts.
All contributions to Requests should keep these important rules in mind.
.. _`apache2`:
Apache2 License
---------------
A large number of open source projects you find today are `GPL Licensed`_.
While the GPL has its time and place, it should most certainly not be your
go-to license for your next open source project.
A project that is released as GPL cannot be used in any commercial product
without the product itself also being offered as open source.
The MIT, BSD, ISC, and Apache2 licenses are great alternatives to the GPL
that allow your open-source software to be used freely in proprietary,
closed-source software.
Requests is released under terms of `Apache2 License`_.
.. _`GPL Licensed`: http://www.opensource.org/licenses/gpl-license.php
.. _`Apache2 License`: http://opensource.org/licenses/Apache-2.0
Requests License
----------------
.. include:: ../../LICENSE

View File

@ -1,455 +0,0 @@
.. _quickstart:
Quickstart
==========
.. module:: requests.models
Eager to get started? This page gives a good introduction in how to get started
with Requests.
First, make sure that:
* Requests is :ref:`installed <install>`
* Requests is :ref:`up-to-date <updates>`
Let's get started with some simple examples.
Make a Request
--------------
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
timeline ::
>>> r = requests.get('https://api.github.com/events')
Now, we have a :class:`Response <requests.Response>` object called ``r``. We can
get all the information we need from this object.
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")
>>> r = requests.options("http://httpbin.org/get")
That's all well and good, but it's also only the start of what Requests can
do.
Passing Parameters In URLs
--------------------------
You often want to send some sort of data in the URL's query string. If
you were constructing the URL by hand, this data would be given as key/value
pairs in the URL after a question mark, e.g. ``httpbin.org/get?key=val``.
Requests allows you to provide these arguments as a dictionary, using the
``params`` keyword argument. As an example, if you wanted to pass
``key1=value1`` and ``key2=value2`` to ``httpbin.org/get``, you would use the
following code::
>>> payload = {'key1': 'value1', 'key2': 'value2'}
>>> r = requests.get("http://httpbin.org/get", params=payload)
You can see that the URL has been correctly encoded by printing the URL::
>>> print(r.url)
http://httpbin.org/get?key2=value2&key1=value1
Note that any dictionary key whose value is ``None`` will not be added to the
URL's query string.
In order to pass a list of items as a value you must mark the key as
referring to a list like string by appending ``[]`` to the key::
>>> payload = {'key1': 'value1', 'key2[]': ['value2', 'value3']}
>>> r = requests.get("http://httpbin.org/get", params=payload)
>>> print(r.url)
http://httpbin.org/get?key1=value1&key2%5B%5D=value2&key2%5B%5D=value3
Response Content
----------------
We can read the content of the server's response. Consider the GitHub timeline
again::
>>> import requests
>>> r = requests.get('https://api.github.com/events')
>>> r.text
u'[{"repository":{"open_issues":0,"url":"https://github.com/...
Requests will automatically decode content from the server. Most unicode
charsets are seamlessly decoded.
When you make a request, Requests makes educated guesses about the encoding of
the response based on the HTTP headers. The text encoding guessed by Requests
is used when you access ``r.text``. You can find out what encoding Requests is
using, and change it, using the ``r.encoding`` property::
>>> r.encoding
'utf-8'
>>> r.encoding = 'ISO-8859-1'
If you change the encoding, Requests will use the new value of ``r.encoding``
whenever you call ``r.text``. You might want to do this in any situation where
you can apply special logic to work out what the encoding of the content will
be. For example, HTTP and XML have the ability to specify their encoding in
their body. In situations like this, you should use ``r.content`` to find the
encoding, and then set ``r.encoding``. This will let you use ``r.text`` with
the correct encoding.
Requests will also use custom encodings in the event that you need them. If
you have created your own encoding and registered it with the ``codecs``
module, you can simply use the codec name as the value of ``r.encoding`` and
Requests will handle the decoding for you.
Binary Response Content
-----------------------
You can also access the response body as bytes, for non-text requests::
>>> r.content
b'[{"repository":{"open_issues":0,"url":"https://github.com/...
The ``gzip`` and ``deflate`` transfer-encodings are automatically decoded for you.
For example, to create an image from binary data returned by a request, you can
use the following code::
>>> from PIL import Image
>>> from StringIO import StringIO
>>> i = Image.open(StringIO(r.content))
JSON Response Content
---------------------
There's also a builtin JSON decoder, in case you're dealing with JSON data::
>>> import requests
>>> r = requests.get('https://api.github.com/events')
>>> r.json()
[{u'repository': {u'open_issues': 0, u'url': 'https://github.com/...
In case the JSON decoding fails, ``r.json`` raises an exception. For example, if
the response gets a 401 (Unauthorized), attempting ``r.json`` raises ``ValueError:
No JSON object could be decoded``
Raw Response Content
--------------------
In the rare case that you'd like to get the raw socket response from the
server, you can access ``r.raw``. If you want to do this, make sure you set
``stream=True`` in your initial request. Once you do, you can do this::
>>> r = requests.get('https://api.github.com/events', stream=True)
>>> r.raw
<requests.packages.urllib3.response.HTTPResponse object at 0x101194810>
>>> r.raw.read(10)
'\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03'
In general, however, you should use a pattern like this to save what is being
streamed to a file::
with open(filename, 'wb') as fd:
for chunk in r.iter_content(chunk_size):
fd.write(chunk)
Using ``Response.iter_content`` will handle a lot of what you would otherwise
have to handle when using ``Response.raw`` directly. When streaming a
download, the above is the preferred and recommended way to retrieve the
content.
Custom Headers
--------------
If you'd like to add HTTP headers to a request, simply pass in a ``dict`` to the
``headers`` parameter.
For example, we didn't specify our content-type in the previous example::
>>> import json
>>> url = 'https://api.github.com/some/endpoint'
>>> payload = {'some': 'data'}
>>> headers = {'content-type': 'application/json'}
>>> r = requests.post(url, data=json.dumps(payload), headers=headers)
More complicated POST requests
------------------------------
Typically, you want to send some form-encoded data — much like an HTML form.
To do this, simply pass a dictionary to the ``data`` argument. Your
dictionary of data will automatically be form-encoded when the request is made::
>>> payload = {'key1': 'value1', 'key2': 'value2'}
>>> r = requests.post("http://httpbin.org/post", data=payload)
>>> print(r.text)
{
...
"form": {
"key2": "value2",
"key1": "value1"
},
...
}
There are many times that you want to send data that is not form-encoded. If
you pass in a ``string`` instead of a ``dict``, that data will be posted directly.
For example, the GitHub API v3 accepts JSON-Encoded POST/PATCH data::
>>> import json
>>> url = 'https://api.github.com/some/endpoint'
>>> payload = {'some': 'data'}
>>> r = requests.post(url, data=json.dumps(payload))
POST a Multipart-Encoded File
-----------------------------
Requests makes it simple to upload Multipart-encoded files::
>>> url = 'http://httpbin.org/post'
>>> files = {'file': open('report.xls', 'rb')}
>>> r = requests.post(url, files=files)
>>> r.text
{
...
"files": {
"file": "<censored...binary...data>"
},
...
}
You can set the filename, content_type and headers explicitly:
>>> url = 'http://httpbin.org/post'
>>> files = {'file': ('report.xls', open('report.xls', 'rb'), 'application/vnd.ms-excel', {'Expires': '0'})}
>>> r = requests.post(url, files=files)
>>> r.text
{
...
"files": {
"file": "<censored...binary...data>"
},
...
}
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')}
>>> r = requests.post(url, files=files)
>>> r.text
{
...
"files": {
"file": "some,data,to,send\\nanother,row,to,send\\n"
},
...
}
In the event you are posting a very large file as a ``multipart/form-data``
request, you may want to stream the request. By default, ``requests`` does not
support this, but there is a separate package which does -
``requests-toolbelt``. You should read `the toolbelt's documentation
<https://toolbelt.readthedocs.org>`_ for more details about how to use it.
For sending multiple files in one request refer to the :ref:`advanced <advanced>`
section.
Response Status Codes
---------------------
We can check the response status code::
>>> r = requests.get('http://httpbin.org/get')
>>> r.status_code
200
Requests also comes with a built-in status code lookup object for easy
reference::
>>> r.status_code == requests.codes.ok
True
If we made a bad request (a 4XX client error or 5XX server error response), we
can raise it with
:meth:`Response.raise_for_status() <requests.Response.raise_for_status>`::
>>> bad_r = requests.get('http://httpbin.org/status/404')
>>> bad_r.status_code
404
>>> bad_r.raise_for_status()
Traceback (most recent call last):
File "requests/models.py", line 832, in raise_for_status
raise http_error
requests.exceptions.HTTPError: 404 Client Error
But, since our ``status_code`` for ``r`` was ``200``, when we call
``raise_for_status()`` we get::
>>> r.raise_for_status()
None
All is well.
Response Headers
----------------
We can view the server's response headers using a Python dictionary::
>>> r.headers
{
'content-encoding': 'gzip',
'transfer-encoding': 'chunked',
'connection': 'close',
'server': 'nginx/1.0.4',
'x-runtime': '148ms',
'etag': '"e1ca502697e5c9317743dc078f67693f"',
'content-type': 'application/json'
}
The dictionary is special, though: it's made just for HTTP headers. According to
`RFC 7230 <http://tools.ietf.org/html/rfc7230#section-3.2>`_, HTTP Header names
are case-insensitive.
So, we can access the headers using any capitalization we want::
>>> r.headers['Content-Type']
'application/json'
>>> r.headers.get('content-type')
'application/json'
Cookies
-------
If a response contains some Cookies, you can quickly access them::
>>> url = 'http://example.com/some/cookie/setting/url'
>>> r = requests.get(url)
>>> r.cookies['example_cookie_name']
'example_cookie_value'
To send your own cookies to the server, you can use the ``cookies``
parameter::
>>> url = 'http://httpbin.org/cookies'
>>> cookies = dict(cookies_are='working')
>>> r = requests.get(url, cookies=cookies)
>>> r.text
'{"cookies": {"cookies_are": "working"}}'
Redirection and History
-----------------------
By default Requests will perform location redirection for all verbs except
HEAD.
We can use the ``history`` property of the Response object to track redirection.
The :meth:`Response.history <requests.Response.history>` list contains the
:class:`Response <requests.Response>` objects that were created in order to
complete the request. The list is sorted from the oldest to the most recent
response.
For example, GitHub redirects all HTTP requests to HTTPS::
>>> r = requests.get('http://github.com')
>>> r.url
'https://github.com/'
>>> r.status_code
200
>>> r.history
[<Response [301]>]
If you're using GET, OPTIONS, POST, PUT, PATCH or DELETE, you can disable
redirection handling with the ``allow_redirects`` parameter::
>>> r = requests.get('http://github.com', allow_redirects=False)
>>> r.status_code
301
>>> r.history
[]
If you're using HEAD, you can enable redirection as well::
>>> r = requests.head('http://github.com', allow_redirects=True)
>>> r.url
'https://github.com/'
>>> r.history
[<Response [301]>]
Timeouts
--------
You can tell Requests to stop waiting for a response after a given number of
seconds with the ``timeout`` parameter::
>>> requests.get('http://github.com', timeout=0.001)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
requests.exceptions.Timeout: HTTPConnectionPool(host='github.com', port=80): Request timed out. (timeout=0.001)
.. admonition:: Note
``timeout`` is not a time limit on the entire response download;
rather, an exception is raised if the server has not issued a
response for ``timeout`` seconds (more precisely, if no bytes have been
received on the underlying socket for ``timeout`` seconds).
Errors and Exceptions
---------------------
In the event of a network problem (e.g. DNS failure, refused connection, etc),
Requests will raise a :class:`~requests.exceptions.ConnectionError` exception.
In the rare event of an invalid HTTP response, Requests will raise an
:class:`~requests.exceptions.HTTPError` exception.
If a request times out, a :class:`~requests.exceptions.Timeout` exception is
raised.
If a request exceeds the configured number of maximum redirections, a
:class:`~requests.exceptions.TooManyRedirects` exception is raised.
All exceptions that Requests explicitly raises inherit from
:class:`requests.exceptions.RequestException`.
-----------------------
Ready for more? Check out the :ref:`advanced <advanced>` section.

File diff suppressed because one or more lines are too long

View File

@ -1,487 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="300px" height="300px"
viewBox="0 0 300 300" enable-background="new 0 0 300 300" xml:space="preserve">
<metadata>
<sfw xmlns="&ns_sfw;">
<slices></slices>
<sliceSourceBounds height="226.344" width="297.902" x="2.418" y="-269.612" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
<g>
<g>
<path fill-rule="evenodd" clip-rule="evenodd" d="M221.263,69.622c-2.289-1.402,1.148-3.191,0.734-5.145
c-1.289,2.596-3.376,3.761-5.145,1.47c9.042-5.844,25.363-2.561,33.81,2.205c-4.146,0.797-8.379-0.11-11.024-2.94
c-2.93,0.5-5.001,1.859-8.82,1.47c-1.225-1.46,0.066-0.935,0-2.94C228.052,66.122,225.694,68.909,221.263,69.622z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M213.912,64.477c0.98,0,1.96,0,2.94,0c-1.225,1.46,0.066,0.935,0,2.94
c-2.126,0.125-3.351,2.999-3.675-0.735c0.595,0.14,0.732,0.737,1.47,0.735C214.076,66.763,213.857,65.757,213.912,64.477z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M235.228,74.767c-1.663-1.522-3.552-2.818-2.94-6.615
c3.021-1.182,9.177-1.451,9.556,2.205c-1.4-0.315-1.847-1.583-3.675-1.47C241.371,73.46,233.52,70.113,235.228,74.767z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M244.782,68.887c2.452-0.002,2.51,2.391,5.146,2.205
c-1.225,1.461,0.066,0.935,0,2.94c-3.429-2.418-2.329-0.397-5.88-2.205C243.736,70.291,244.551,69.881,244.782,68.887z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M229.348,76.237c1.552,0.977,2.172-0.362,4.41,0.735
c0.996,4.658-3.604,1.532-4.41,2.94C227.627,79.724,228.924,76.683,229.348,76.237z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M219.058,78.442c0.73,2.699,1.646,5.213,2.939,7.35
c-4.096-1.83-1.685,0.925-2.939,2.94C217.267,85.036,218.043,81.979,219.058,78.442z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M181.572,85.057c-0.734,0-1.47,0-2.205,0c0.98-1.225-0.268-4.678,2.205-4.41
C181.572,82.117,181.572,83.587,181.572,85.057z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M238.168,88.732c1.606,0.108,1.578,1.852,1.47,3.675
c-1.374,0.586-2.692,1.228-4.41,1.47C234.684,90.639,237.606,90.866,238.168,88.732z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M181.572,89.467c-1.631,7.112-2.808,5.626-8.085,8.82
c1.475-2.201,2.611-4.739,5.88-5.145c-1.267-2.578-3.878-0.97-5.145,1.47C172.591,90.111,177.957,90.473,181.572,89.467z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M228.612,90.937c1.154,0.316,0.628,2.312,2.94,1.47
c-1.774,1.408,1.756,4.525-2.205,4.41C228.957,94.224,227.191,93.53,228.612,90.937z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M183.777,98.287c-1.3-0.661-2.146-1.774-3.675-2.205
C181.095,92.907,183.977,95.932,183.777,98.287z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M179.367,97.552c3.462,1.61,3.844,4.566,2.205,8.085
c-2.554,0.306-2.552-5.721-4.41-3.675C174.883,100.339,178.996,98.954,179.367,97.552z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M169.077,107.842c0.259-2.436,2.202-3.188,3.676-4.41
c-0.021-0.715-0.9-0.57-1.471-0.735c1.246-1.694,1.85-4.03,5.146-3.675C172.769,100.753,174.71,108.085,169.077,107.842z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M175.692,107.842c-0.607,2.078,1.036,1.904,0.735,3.675
c-3.048,0.199-2.864-0.965-5.146,0C171.74,109.28,172.915,107.759,175.692,107.842z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M168.343,109.312c2.133,3.143-2.463,5.845-4.41,7.35
C163.998,112.808,166.995,111.885,168.343,109.312z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M160.992,118.132c-1.385-2.153,1.098-6.717,4.41-6.615
C164.316,114.106,162.506,115.97,160.992,118.132z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M169.813,112.987c4.291,1.292,3.826,3.497,2.205,6.615
c-3.127-0.437-1.422-2.911-5.146-1.47C166.329,114.894,169.252,115.121,169.813,112.987z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M208.032,113.722c1.878,0.082,2.573,1.347,3.675,2.205
c-0.097,2.353-1.666,3.234-4.409,2.94C207.335,115.668,206.194,115.487,208.032,113.722z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M159.522,124.747c4.284,1.078,1.874,8.733-0.735,9.555
C156.646,131.634,159.036,127.229,159.522,124.747z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M91.902,126.217c0.998,0.228,0.61,1.84,0.735,2.94
c-1.318-0.094-1.55,0.899-2.94,0.735C89.35,127.584,91.676,127.95,91.902,126.217z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M89.697,130.627c0.735,0,1.47,0,2.205,0c0.312,1.536-0.503,1.946-0.735,2.94
C89.875,133.39,89.492,132.302,89.697,130.627z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M213.178,137.242c2.258,0.135,1.542,3.958-0.735,3.675
C212.208,139.212,212.561,138.095,213.178,137.242z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M210.237,140.182c-0.26,0.965-1.294,1.156-1.47,2.205
C205.697,141.895,208.426,137.824,210.237,140.182z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M211.707,143.857c1.188-0.207,1.266,0.695,2.205,0.735
c-0.431,1.529-1.544,2.375-2.205,3.675C208.994,147.677,211.098,145.241,211.707,143.857z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M194.067,154.882c-1.406,3.493-4.694,5.106-7.35,7.351
c-0.56-1.156-2.332-1.099-2.205-2.94C186.69,158.008,189.762,155.912,194.067,154.882z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M105.132,129.892c-0.259,0.965-1.294,1.156-1.47,2.205
c3.349-2.139,0.824-3.979,2.94-7.35c0.595,0.14,0.732,0.737,1.47,0.735c-0.205-1.51-1.963-1.467-2.94-2.205
c-2.181,0.513-1.164,3.346-0.735,3.675c-0.572,0.996-3.322-2.019-5.145-2.205c-1.422,1.273-2.098,3.292-3.675,4.41
c-2.716-2.528,2.432-3.406,2.205-5.88c-1.313-0.207-1.508,0.695-0.735,0.735c-1.332,0.627-2.027,1.893-3.675,2.205
c-0.207-1.187,0.694-1.265,0.735-2.205c-3.127,0.672-5.928-1.597-7.35,2.205c-1.828-0.11-0.215-2.489,0-2.94
c-2.025,1.16-1.901,4.468-5.145,4.41c-0.246-2.449-2.129-3.26-1.47-6.615c-1.355,1.585-2.261,3.62-3.675,5.145
c-0.679-1.536-0.178-3.51-1.47-5.88c-0.885,0.83-1.332,2.098-3.675,1.47c-0.311,1.536,0.504,1.946,0.735,2.94
c0.861-0.119,0.62-1.34,0.735-2.205c1.937-0.222,2.412,1.018,2.205,2.94c-1.536-0.311-1.946,0.504-2.94,0.735
c0.311,1.537-0.504,1.946-0.735,2.94c1.293-0.177,1.676-1.265,1.47-2.94c0.855,1.35,4.796-0.386,3.675,2.94
c1.646-2.38,1.878-2.348,2.205-5.145c2.976,0.792-0.225,3.5,0.735,6.615c-4.914-0.43-6.491,0.67-8.82,3.675
c-1.534-2.14-4.863-2.487-6.615-4.41c-0.405,1.629,1.403,1.046,1.47,2.205c0.271,1.25-0.573,1.387-1.47,1.47
c1.102,2.429,1.797-1.527,3.675-0.735c0.83,0.885,2.098,1.332,1.47,3.675c2.081-0.859,3.392-2.488,4.41-4.41
c3.192,2.351,6.123-1.243,11.76-1.47c-1.422,2.636,0.283,2.693,0.735,5.145c-0.629,1.034-4.261,4.201-3.675,0
c-1.059,0.167-0.256,2.194-1.47,2.205c1.967,2.986,0.771,5.375,0,8.82c1.187,0.207,1.266-0.694,2.205-0.735
c-1.272-4.998-1.169-4.912,2.94-8.085c-0.27,1.25,0.573,1.387,1.47,1.47c-0.75,0.966-0.721,2.709-1.47,3.675
c0.595-0.14,0.732-0.737,1.47-0.735c1.991-0.836-0.667-5.659,2.94-6.615c-0.152,2.112,0.186,3.734,1.47,4.41
c1.543-0.205-1.065-1.963,0.735-2.94c-1.671,2.174-2.07-3.811,0.735-3.675c-0.35,3.254,1.011,3.655,0,5.88
c0.965-0.259,1.156-1.294,2.205-1.47c-0.315-1.4-1.583-1.847-1.47-3.675c1.048,2.901,2.51-0.337,0.735-1.47
c-0.882,1.03-0.286,0.063,0-0.735c1.889,0.071,1.051,2.869,2.94,2.94c0.861-0.119,0.62-1.34,0.735-2.205
c-0.89-2.473,1.475,4.867,2.94,0.735c-4.998,6.275-17.181,11.727-25.725,16.905c-0.686-0.785-2.711-0.229-2.205-2.205
c0.654,0.571,1.66,0.79,2.94,0.735c1.607-0.108,1.578-1.852,1.47-3.675c-1.499,0.461-0.207,3.713-2.94,2.94
c0.393-2.843-1.312-3.588-0.735-6.615c0.853-0.617,1.97-0.969,3.675-0.735c0,1.225,0,2.45,0,3.675c2.399-0.76,1.558-1.861,3.675,0
c-1.601-3.604-4.412-3.501-4.41-7.35c-1.078,1.194-3.132,5.628-4.41,2.205c-2.347,1.503,5.125,12.203-5.145,10.29
c0.83-0.885,2.098-1.332,1.47-3.675c-0.994,0.722-1.469,1.961-2.205,2.94c-1.939-1.001-5.012-0.869-7.35-1.47
c-4.346-6.795-2.056-19.485,5.88-20.58c2.167-4.889,7.351-5.015,11.025-8.085c4.302-3.595,6.498-10.399,12.495-13.23
c17.674-27.161,41.896-47.773,74.97-59.535c1.187-0.207,1.266,0.694,2.205,0.735c8.635-8.454,21.879,0.769,30.135,0.735
c2.308,1.858,3.361,4.969,2.94,9.555c2.304-0.508,0.958-1.96,0.734-3.675c6.348,2.802,4.76,15.554,1.471,16.17
c-2.136-3.209-5.993-2.727-5.146,0.735c-0.14,0.834-0.737,0.408-0.735,0c-0.625-0.135-0.693,0.287-0.734,0.735
c-1.435-0.313,1.202-2.1-2.205-1.47c-1.091,0.321,0.29,0.94,0,2.205c-0.654-0.452-1.314-0.888-1.47,0
c-2.832-0.827,2.832-2.849,0-3.675c0.478-1.248,1.689-0.459,1.47,0.735c2.779,0.629,2.601-3.291,1.47-4.41
c-2.063,0.009,1.75,2.005-1.47,1.47c0.021-3.163,3.064-3.306,3.675-5.88c1.293,0.177,1.676,1.265,1.47,2.94
c-2.87-3.025-2.131,1.497-2.205,2.94c3.162-2,4.191-4.506,1.471-7.35c-0.687,0.539-1.114,1.336-1.471,2.205
c-1.046-0.898-1.67-2.805-0.734-3.675c-0.592,0.389-1.193,0.767-2.205,0.735c1.973,2.973-1.039,1.283-2.205,2.205
c4.338,2.115-0.647,1.666,1.47,5.88c-1.889-0.35-2.072,4.546-3.675,6.615c1.061,1.145,2.96,1.45,2.205,4.41
c-1.043-0.063-2.081-0.122-2.205,0.735c-1.309-0.539-0.106-1.336,0-2.205c-1.952,0.253-2.48,1.929-2.94,3.675
c2.514-3.24,0.045,1.961,1.471,4.41c2.166-0.773,2.555-3.325,3.675-5.145c1.678,0.576-2.923,5.305,0.735,5.88
c-1.456,0.995-2.859,2.042-2.205,5.145c0.854,0.12,1.308-0.162,1.47-0.735c1.53,1.72-3.937,3.109-4.41,0.735
c-1.748-1.476,0.817,0.325,1.47,0.735c1.279-3.729-3.189-1.71-2.939-4.41c1.303,0.167,3.681-0.741,2.939,1.47
c2.614-2.189-1.638-3.703-4.409-2.94c-2.379-0.846,1.974-0.832,2.939-0.735c0.507-1.976-1.52-1.42-2.205-2.205
c-0.15,1.46-1.334,2.01-1.47-1.47c0.735,0,1.47,0,2.205,0c0-0.98,0-1.96,0-2.94c-2.796-1.081-0.145,3.285-2.94,2.205
c1.225-1.46-0.066-0.935,0-2.94c3.064,0.369,3.242-2.148,6.615-1.47c-4.934-5.145-12.385,5.58-8.82,12.495
c-0.586,1.913-1.228-2.097-1.47-2.94c-0.596,0.14-0.732,0.738-1.47,0.735c-0.908,2.378,2.378,0.562,1.47,2.94
c-2.304-0.344-2.072,1.848-2.94,2.94c-0.485-4.088,2.15-2.542,0-7.35c4.121-0.981,1.96-5.823,3.676-4.41
c0.535-2.005-1.461-1.479-1.471-2.94c-0.164,1.064-2.053,2.823-2.939,5.145c-2.035,1.313,0.66-2.51,0.734-3.675
c-1.935,0.453-0.96,1.458-2.939,2.94c-0.987-0.185,0.263-3.894-2.205-4.41c-3.403,2.081,0.535,3.419-2.94,5.88
c2.597-0.085,1.178,1.798,2.205,1.47c0.748,1.517-3.451,4.364-5.145,5.88c-1.891,0.395,4.393-2.66,3.675-5.88
c-1.359,0.111-0.451,2.489-1.47,2.94c-0.799-0.182-0.499-1.461-1.47-1.47c-1.661,0.411,0.891,1.146-0.735,2.205
c-1.61,1.757,0.645-1.78-0.735-2.205c-1.054,0.906-1.393,2.527-1.47,4.41c-1.476-0.25-2.3,0.15-2.205,1.47
c-1.771,0.301-1.598-1.342-3.675-0.735c-0.136-0.625,0.286-0.693,0.734-0.735c0-0.49,0-0.98,0-1.47
c0.715,0.02,0.571,0.899,0.735,1.47c1.87-0.089,2.851-1.069,2.94-2.94c-2.971,3.455-4.581-0.72-4.41-3.675
c8.53-7.15,17.914-13.445,25.725-21.315c2.509,0.826-0.231,2.849,1.471,3.675c-0.299,1.416-2.85,0.581-2.205,2.94
c1.593-1.589,1.712-1.057,4.409-2.205c-2.733-3.893-3.063-8.246,3.676-10.29c-3.24,2.513,1.96,0.044,4.409,1.47
c0.631-2.345-1.156-2.273-1.47-3.675c-2.246-0.531-2.679,0.751-4.41,0.735c2.628-7.415-2.069,2.665-4.409,4.41
c-2.036,1.518-5.892,2.234-5.881,4.41c-1.059-0.166-0.256-2.193-1.47-2.205c-0.064-2.514,4.475-0.425,4.41-2.94
c-0.202-2.579-2.738,1.844-2.94-0.735c-1.049,5.431-4.216-5.936,0.735-2.94c0.711-4.173-2.864-0.627-3.675-2.205
c0.546,3.658-0.06,7.504-1.47,11.76c0.166,0.936,2.193,0.963,2.204,0c0.917,0.014-2.027,4.567-2.939,2.94
c-0.119,0.854,0.162,1.308,0.735,1.47c-2.996,1.442-3.296,0.729-4.41,3.675c-3.43-1.062-0.599,0.121-2.94,1.47
c-0.861-0.119-0.62-1.34-0.734-2.205c-1.857,1.39,0.678,2.577-0.735,4.41c-0.843-0.882-1.863-0.287-0.735,0
c-0.081,1.799-2.43,0.156-2.205-0.735c-2.006,0.664,2.236,1.644,0,2.94c-3.391-2.171-1.608-0.146-3.675,1.47
c-0.442-2.944-3.201-7.413-5.88-10.29c-1.689,3.547,6.799,5.9,4.41,10.29c-0.799-0.182-0.499-1.461-1.47-1.47
c-0.134,1.604,0.602,2.338,2.204,2.205c-0.979,4.41-7.415,3.365-7.35,8.82c-5.05-1.6-1.421-3.929-2.205-8.085
c-1.059,0.412-1.793,1.146-2.205,2.205c2.701,3.553-0.494,8.366-2.94,11.025c-0.904-0.321-1.509-0.94-1.47-2.205
c0.049,6.452-14.079,6.938-17.64,14.7c-4.031-1.282-3.27,3.562-5.145,0.735c0.364,1.05-2.512,3.711-4.41,2.205
c0,1.715,0,3.43,0,5.145c4.073-5.424,15.954-11.495,21.315-15.435c0.616,0.365,2.889-2.625,4.41-0.735
c0.839-2.63,5.369-4.042,8.085-8.085c-1.408,0.708,0.074,3.432-1.47,7.35c0.119,0.862,1.34,0.62,2.205,0.735
c-1.146-3.052,0.62-3.602-0.735-7.35c2.9-1.754,4.255-5.056,8.085-5.88c0.322,2.527-0.29,4.12-0.734,5.88
c0.912,3.335,2.137-1.27,3.675,0.735c-2.104,0.17-6.468,8.646-10.29,11.76c-2.046-0.404,1.032-5.932-2.94-4.41
c0.326,0.654,0.646,1.314,1.47,1.47c-0.205,1.737-1.963-0.843-2.94-0.735c0.009,1.46,2.005,0.935,1.47,2.94
c-2.859,1.306-4.711,3.619-8.085,4.41c-1.377-1.399-0.08-1.847,0-3.675c-2.508,0.432-1.813,4.066-3.675,5.145
c2.263,0.547,1.413-2.018,3.675-1.47c-1.159,1.781-2.629,3.25-4.41,4.41c0.441,1.328,3.77-0.57,3.675-2.205
c1.091,0.321-0.29,0.94,0,2.205c3.011-2.271,3.416-2.657,4.41-4.41c2.603,0.082-1.562,2.43,0.735,2.205
c-0.639,1.109-1.101-0.202-2.94,0.735c0.942,1.906,3.499,0.33,3.675,1.47c1.508,1.702-3.734-1.223-5.145,0
c1.96,1.39,5.419,2.093,6.615,2.205c-0.026-0.089-7.406,4.91-8.085,6.615c0.12-0.854-0.163-1.308-0.735-1.47
c0.216-1.532,1.989,1.09,2.205-1.47c-0.394-1.515-3.477-0.175-1.47-2.205c-2.228,1.376-2.064,0.579-4.41,1.47
c0.55,1.388,2.194,0.51,0.735,2.205c1.25,0.27,1.387-0.573,1.47-1.47c0.998,0.228,0.61,1.84,0.735,2.94
c-1.059-0.822-1.793-0.792-2.205,0.735c-0.414-1.596-0.542-1.116-4.41-1.47c0.228,0.998,1.84,0.61,2.94,0.735
c-1.983,2.152-2.853,0.632-5.145,0c0.478,0.748,1.69,0.76,1.47,2.205c-2.622-1.308-3.733,0.313-6.615-0.735
c-5.281,2.179-0.556,5.58-5.145,2.94c0.052,2.062-1.489,0.169-3.675,2.205c-1.996-0.669,0.749-2.576,0.735-3.675
c-2.034,0.092-2.523,1.403-1.47-0.735c-0.735,0-1.47,0-2.205,0c1.05,3.5,1.045,3.487,2.205,6.615c0.98,0,1.96,0,2.94,0
c2.247,1.136-3.188,0.647-4.41,0.735c0.389-0.591,0.767-1.193,0.735-2.205c-2.604,2.202-3.459,3.854-6.615,5.145
C101.729,132.744,103.628,129.698,105.132,129.892z M196.272,68.152c0.639-1.076,1.101-2.33,2.94-2.205
c-0.125,1.84,1.129,2.301,2.205,2.94c-0.536-2.005,1.46-1.479,1.47-2.94c-2.413,1.24-3.241-0.39-5.146-1.47
C197.78,65.825,193.976,66.966,196.272,68.152z M180.838,68.887c-0.301,2.15-2.516,2.385-3.676,3.675
c0.372,1.833,1.391,3.02,2.205,4.41c-0.956-2.902,2.697-1.779,0.735-3.675c2.033-0.091,2.523-1.403,1.47,0.735
c1.84,0.125,2.301-1.129,2.94-2.205C179.934,71.64,182.191,71.764,180.838,68.887z M174.957,72.562
c0.971,1.839-2.905,2.301-0.734,2.94c-0.707-0.002,0.481,2.963,3.675-0.735C176.398,74.551,176.456,72.778,174.957,72.562z
M184.513,71.092c0.436-2.345-1.38-2.273,0-3.675C181.553,66.699,181.553,71.81,184.513,71.092z M150.703,83.587
c3.646,0.031,1.324-2.756,0-3.675C148.651,76.459,152.112,83.266,150.703,83.587z M141.147,90.202
c-0.234,0.9,0.118,4.54,0.735,2.205c-0.402-1.068,0.859-3.799-0.735-3.675c-0.176,0.798-1.21,1.765-1.47,0.735
c0.408,0.002,0.834-0.595,0-0.735C138.316,90.013,139.867,91.563,141.147,90.202z M149.967,96.082
c0.604,2.797-2.454,2.765-0.735,5.145c0.216-1.499,1.989-1.441,2.205-2.94c-0.57-0.165-1.45-0.021-1.47-0.735
C150.709,97.543,150.892,96.264,149.967,96.082z M131.592,115.192c-1.375,0.203,1.547-5.177-0.735-5.88
c-0.155,0.888-0.815,0.452-1.47,0c-0.663,1.715-5.102,1.631-7.35,3.675c0.125,1.1-0.263,2.713,0.735,2.94c0-0.735,0-1.47,0-2.205
c1.88-1.423,4.617,0.982,2.94-1.47c1.012,0.032,1.614-0.346,2.205-0.735c-0.509,1.296-0.812,2.276,0,2.94
c0.356-0.869,0.784-1.667,1.47-2.205c-0.002,0.737,0.595,0.875,0.735,1.47c-1.715,0.41-1.715,2.211,0,0.735
c-1.156,1.538-1.748,2.762-0.735,3.675C129.604,116.633,131.376,116.691,131.592,115.192z M119.833,115.927
c-1.107,1.099-0.22,4.19-2.94,3.675c1.514-2.97-7.9,3.836-8.085-1.47c-0.458,1.993-3.071,1.83-2.94,4.41
c1.483-1.572,6.2-1.275,8.085,0.735c-1.516-0.646-2.784,2.423-1.47,2.205c0.913-1.538,2.138-2.762,3.675-3.675
c-4.265,4.662,5.502-0.267,1.47-1.47c1.611-0.661,4.083-4.677,5.145-1.47c-0.825,0.075-1.144-1.069-1.47,0
c0.924,0.301,1.502,0.948,1.47,2.205c1.878-0.082,2.573-1.347,3.675-2.205C123.449,117.17,123.415,117.041,119.833,115.927z
M178.633,48.307c1.1-0.125,2.712,0.262,2.939-0.735c-1.019-0.291-2.082-4.172-2.939-2.205
C180.527,45.544,177.623,46.631,178.633,48.307z M172.753,54.187c-1.59-0.616-2.508-1.903-5.146-1.47
C167.963,55.016,171.16,56.697,172.753,54.187z M163.933,57.127c-0.57,0.165-1.45,0.02-1.47,0.735
c2.007,2.019,2.93,1.296,4.409,2.94c0.082-1.388,2.431-0.51,2.205-2.205c-2.074,0.793-3.622-3.844-5.88-2.205
C163.646,56.434,164.067,56.502,163.933,57.127z M138.942,69.622c0.87-0.935,2.776-0.312,3.675,0.735
c-1.068,0.402-3.799-0.859-3.675,0.735c2.005-0.535,1.479,1.461,2.94,1.47c1.168-1.501,2.261-5.995,0-4.41
C143.881,69.625,136.646,67.545,138.942,69.622z M139.678,71.827c-0.431,1.529-1.545,2.375-2.205,3.675
c2.125,1.667,4.05-1.55,1.47,0C138.786,73.352,143.09,73.117,139.678,71.827z M146.292,76.237c2.824,1.12,1.403-8.217,0.735-5.88
C147.349,72.884,146.737,74.477,146.292,76.237z M120.567,83.587c-1.049-0.286-1.24-0.882-2.205,0
c-0.347,1.433,1.979,3.759,2.205,2.205c-1.213,0.475,2.511-5.403-0.735-2.94C120.281,82.894,120.703,82.962,120.567,83.587z
M131.592,82.117c-0.688,0.621-1.57,4.685,0,5.145c-0.392-1.059,2.864-1.794,0.735-2.205
C130.582,87.59,133.903,82.247,131.592,82.117z M127.183,96.082c-3.341-0.443-0.694-7.005-2.205-5.88
C123.392,92.253,125.284,97.864,127.183,96.082z M102.192,112.987c-1.499-0.216-1.441-1.989-2.94-2.205
c-0.646,2.361,2.423,1.007,2.205,2.94c-2.754,1.301-1.651,6.64-5.145,8.82c4.625-0.031,2.284-7.026,7.35-6.615
c-0.967-2.181-0.65-3.625,1.47-4.41c0.009,0.971,1.289,0.672,1.47,1.47c-1.516-0.646-2.784,2.423-1.47,2.205
c0.517-2.467,4.225-1.217,4.41-2.205c-0.856-0.124-0.798-1.162-0.735-2.205c-1.309-0.439-3.053,2.154-3.675,0
c0.57-0.165,1.45-0.021,1.47-0.735C104.117,110.011,103.414,111.758,102.192,112.987z M94.842,115.927
c0.042-0.448,0.11-0.87,0.735-0.735c0.165,0.57,0.02,1.45,0.735,1.47c-0.649-2.422,3.599-3.673,1.47-5.145
C98.161,113.905,93.23,114.739,94.842,115.927z M80.877,119.602c3.09-0.095,3.954-2.417,6.615-2.94
C84.711,115.294,83.058,118.278,80.877,119.602z M86.757,121.807c2.345,0.436,2.273-1.379,3.675,0c0.367-2.313-1.603-2.874,0-4.41
C87.913,117.572,88.968,121.323,86.757,121.807z M66.913,142.387c-0.449,0.042-0.87,0.11-0.735,0.735
c1.718-0.227,3.037-1.439,4.41,0c-1.831-1.845-1.914-5.436-3.675-7.35C67.708,138.377,67.816,141.08,66.913,142.387z
M63.237,146.062c1.901-2.899,0.251-5.01,1.47-8.82C63.007,138.465,62.123,142.961,63.237,146.062z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M170.548,84.322c2.603,0.246,1.807,2.022,4.409,0.735
c-1.325,5.079-1.02,2.865-4.409,5.88c0-1.225,0-2.45,0-3.675c0.715,0.02,0.57,0.899,0.734,1.47
c0.596-0.14,0.733-0.737,1.471-0.735c0.093-1.318-0.9-1.55-0.735-2.94c-2.268,1.652-4.007,3.833-6.615,5.145
C162.736,94.102,169.12,84.865,170.548,84.322z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M172.753,90.202c1.125,0.015-0.368,3.467-0.735,4.41
c-0.986-0.483-1.369-1.571-1.47-2.94C171.805,91.704,172.451,91.126,172.753,90.202z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M210.237,68.887c-0.539-0.687-1.336-1.114-2.205-1.47
c-1.469,4.521-1.293-1.97-2.939,1.47c-0.998-0.228-0.61-1.84-0.735-2.94c2.126,2.123,3.351-2.483,3.675,0.735
c0.596-0.14,0.732-0.737,1.471-0.735c-1.067-2.118-4.146-2.225-5.146-4.41c2.46,0.022,4.254,3.056,9.555,2.205
c-1.172,0.542,0.168,3.598-2.205,2.94c-0.207-1.187,0.695-1.266,0.735-2.205c-2.218-0.208-2.085,5.689-1.47,5.88
c-0.088,1.198-3.135-0.701-2.94-2.205C208.624,68.541,209.226,68.919,210.237,68.887z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M230.082,66.682c0.458,1.758,0.228,3.461,0.735,6.615
c-2.193,1.978-4.702-0.186-6.615-0.735C224.827,69.267,226.787,67.307,230.082,66.682z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M235.963,78.442c1.295,0.665,1.214,2.706,2.939,2.94
c1.318,0.094,1.551-0.899,2.94-0.735c-0.623-2.154-2.366,0.439-3.675,0c0.093-1.318-0.9-1.55-0.735-2.94
c4.72,0.203,9.964,2.318,6.615,8.085c2.408-0.286,2.282-3.107,3.675-4.41c-0.613,1.982-0.522,6.032-2.205,7.35
c0.497-0.389-3.614-3.934-1.47,0c-2.24-0.861-5.022,0.625-3.676-2.94c-1.078,2.326-2.949,1.144-2.939-1.47
c-1.423,1.027-4.009,0.891-3.675,3.675c-2.792,1.129-3.468-4.995-3.676,0c-1.075-0.639-2.329-1.101-2.204-2.94
c2.42-0.474,6.061-5.208,7.35-2.205C237.045,81.821,236.524,80.32,235.963,78.442z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M212.442,76.237c0.747,0.478,0.76,1.69,2.205,1.47
c-1.888,2.663-0.785,5.386,0,8.82c-0.687-0.416-1.113-2.043-1.47-0.735C211.199,82.283,214.195,79.971,212.442,76.237z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M256.543,79.912c1.641,3.357,2.67,10.924,0.734,20.58
c-1.971-0.969-1.221-4.659-2.205-6.615c1.861,2.816,2.767-7.364,0-9.555C254.721,82.01,256.119,81.449,256.543,79.912z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M201.418,85.792c1.976-0.203,2.094,5.177,0.734,5.88
c0.539,0.687,1.337,1.114,2.205,1.47c1.912-0.891,1.347-3.425,1.47-3.675c0.01-2.062,2.006,1.75,1.471-1.47
c3.115,1.971-0.72,8.058-0.735,6.615c-0.861,0.119-0.62,1.34-0.735,2.205c1.435-0.229,4.399-4.063,2.94-0.735
c3.793-2.429-0.295-5.48,2.205-9.555c0.798,0.182,0.498,1.461,1.47,1.47c-2.21,5.055-0.619,3.366,0.735,8.82
c-1.223-2.658-2.667-0.107-2.94,2.205c0.605,0.308,3.026,0.941,1.47,2.94c-2.074,0.989-1.842-3.895-2.939-1.47
c-1.309-0.539-0.106-1.337,0-2.205c-0.14-0.595-0.737-0.733-0.735-1.47c-2.062,0.01,1.75,2.005-1.47,1.47
c0.571,0.654,0.79,1.66,0.735,2.94c0.854,0.12,1.308-0.162,1.47-0.735c1.736,0.205-0.843,1.963-0.735,2.94
c-2.296-3.259-2.716-4.097-2.939-8.82c-3.109,1.554,0.032,6.509,1.47,9.555c2.006,0.066,1.479-1.224,2.94,0
c-1.799-2.022,1.098-1.55,0.734,0.735c2.765,0.615,2.602-3.29,4.41-1.47c-0.612-2.328-2.144-3.736-3.675-5.145
c2.071-2.26,3.477,2.361,4.41,3.675c1.46-1.224,0.935,0.066,2.939,0c-1.332-2.616,1.515,1.026,3.675-1.47
c-0.963,3.167,3.5,0.91,2.94,3.675c0.687-0.539,1.113-1.336,1.47-2.205c4.768,1.51,5.927,4.398,11.025,4.41
c0.687-0.539,1.113-1.336,1.47-2.205c-1.25-0.27-1.387,0.573-1.47,1.47c-2.604-0.082,1.562-2.43-0.735-2.205
c-0.641-1.543,3.74,1.065,1.471-0.735c1.627-1.607,0.648,1.393,1.47,2.205c1.537-0.913,2.763-2.137,3.675-3.675
c-0.65-2.014-3.261,1.435-1.47-1.47c-2.217,0.968-6.297,0.074-8.085,1.47c-2.091-0.98,0.566-3.269,0.734-4.41
c3.769-0.073,7.66,3.583,9.556,2.94c1.544,3.973-5.429,4.615-5.88,7.35c-4.734,0.324-7.626-1.194-9.556-3.675
c-2.109,3.28,0.611,11.391-1.47,14.7c-3.381-0.928-1.588-4.182-1.47-7.35c-1.044-0.063-2.082-0.122-2.205,0.735
c1.636-0.632,2.483,3.563-1.471,2.94c1.803-0.979-1.324-2.218,0.735-2.94c-0.182-0.798-1.461-0.499-1.47-1.47
c-0.546,0.071-0.546,2.869,0,2.94c-0.722,1.188-1.961,1.692-2.94,0.735c2.205-0.957,1.339-3.145,0-4.41
c-1.492-0.225,0.15,2.124,0.735,2.205c-2.854,2.326-2.703-4.619-5.88-4.41c2.38,3.048,1.534,3.766,3.675,5.88
c-0.217,1.532-1.989-1.09-2.205,1.47c0.853-0.587-0.962-5.455-2.205-5.145c-1.068-0.326,0.075-0.646,0-1.47
c-2.144-1.081-2.144,3.286,0,2.205c-1.832,1.354-5.572,0.797-6.615,2.94c3.111,0.081,0.013,1.377-0.734,0
c0.32-0.904,0.94-1.509,2.205-1.47c-0.669-2.011-2.576,1.304-3.676-0.735c-0.063,1.043-0.121,2.081,0.735,2.205
c0.225,2.297-2.123-1.868-2.205,0.735c-0.383-0.195,1.037-4.801,1.47-6.615c-3.607-0.668-2.799,3.081-5.88,2.94
c2.114-2.009,5.844-5.637,8.085-5.145C202.495,96.475,201.962,93.26,201.418,85.792z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M227.143,118.867c0.181,5.081-2.342,7.458-4.41,10.29
c-1.114,0.542,3.288-5.311,3.675-8.085c0.125-1.839-1.129-2.301-2.205-2.94C224.924,115.878,226.163,118.977,227.143,118.867z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M251.397,98.287c1.53-1.818-5.091-1.737-7.35-2.205
c3.146-1.916,6.013-4.558,3.675-8.085c2.915,1.98,2.307,4.2,6.615,3.675c0.413,2.863-2.324,2.576-2.94,4.41
c0.664,1.296,1.645,2.276,2.94,2.94c-1.007,1.16-3.481-0.601-5.881,1.47c-2.561-0.216,0.063-1.989-1.47-2.205
c-1.992,0.665,0.619,2.706,1.47,2.94c-1.638,1.827-4.189-1.648-4.409-3.675C246.281,98.013,250.379,96.611,251.397,98.287z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M220.527,95.347c0.925,0.182,0.741,1.461,0,1.47
c1.374,1.076,3.492,1.408,2.94,4.41C222.186,99.674,218.793,97.618,220.527,95.347z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M217.588,93.142c-0.822,1.059-0.793,1.793,0.734,2.205
c-2.169-0.701-1.332,3.871-2.939,0.735c-0.998,0.228-0.61,1.84-0.735,2.94c6.66-0.831-3.216,3.206-0.735-5.145
c1.024-2.366,0.32,3.561,2.205,0.735c0.207-1.187-0.694-1.265-0.734-2.205C216.167,89.905,215.611,94.452,217.588,93.142z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M192.598,91.672c1.71,1.103,1.121,1.797,0.734,3.675
c-1.721-2.255-0.713-0.571-2.204,0.735C190.006,98.108,191.473,92.079,192.598,91.672z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M167.607,101.227c1.772-1.412,2.918-3.452,4.41-5.145
c1.542,2.311-1.77,6.046-4.41,6.615c-0.66-2.151-0.66-2.258,0-4.41c-0.625-0.135-0.693,0.287-0.735,0.735
c-1.99-1.516,1.681-0.643,1.471-1.47C170.178,98.06,166.979,99.513,167.607,101.227z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M163.933,106.372c1.091,0.321-0.29,0.94,0,2.205
c2.444-1.23,1.972-5.378,5.88-5.145c-0.187,3.243-2.987,3.873-3.675,6.615c-1.059-1.626-1.794,0.925-2.205-0.735
c-1.362,1.333-1.827,3.563-3.675,4.41C159.598,111.107,162.779,108.16,163.933,106.372z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M177.162,102.697c-0.049,1.222,1.658,1.974,2.205,4.41
c-1.796,1.808-3.187-0.543-5.88,0C173.194,104.119,176.615,104.845,177.162,102.697z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M200.683,104.167c-1.456-0.933-2.859,0.44-2.205-3.675
c0.861,0.119,0.62,1.34,0.735,2.205c0.861-0.119,0.619-1.34,0.734-2.205c3.201,3.407-0.348,6.558-2.205,7.35
C196.005,109.11,199.516,104.705,200.683,104.167z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M152.173,104.167c1.606,0.108,1.578,1.852,1.47,3.675
c-1.666,0.723-2.671-0.252-2.94,2.94c-1.35-1.1-1.833-3.068-3.675-3.675c0.417-0.686,2.043-1.113,0.735-1.47
c-0.363-0.964,3.647-0.323,2.94,1.47C152.062,106.997,151.153,104.618,152.173,104.167z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M186.718,105.637c1.341,0.571-0.44,0.79-1.471,0.735
c0.021,0.715,0.9,0.57,1.471,0.735c-1.615,3.041-3.447,5.863-5.88,8.085c1.829,1.342,1.746-0.518,2.205,1.47
c-0.178,1.895-1.265-1.009-2.94,0c0.756,2.841,1.937,2.899,0.735,5.145c2.016-0.388,3.072-2.837,3.675,0
c2.201-0.484-0.703-1.571,0-2.94c0.654,0.571,1.659,0.79,2.939,0.735c-0.173-2.031-4.146-0.263-3.675-2.94
c1.84,1.064,2.887,1.78,5.146,0.735c-2.236-1.281,2.006-2.831,0-1.47c0.182,0.798,1.461,0.499,1.47,1.47
c2.299-3.745,5.449-0.806,4.41-7.35c-1.043-0.063-2.082-0.121-2.205,0.735c-0.408-3.128,3.24-0.956,5.88,0
c0.191,2.151-1.662,2.258-1.47,4.41c-4.872-0.175-1.821,2.456-2.205,4.41c-0.625,0.135-0.693-0.287-0.735-0.735
c-0.794,10.327-26.139,2.21-27.93,13.965c-5.521,0.604-6.028,6.222-8.82,9.555c-0.753-3.056,0.68-0.647-0.735-5.88
c-0.625-0.135-0.693,0.287-0.734,0.735c-2.417-1.09,2.181-1.144,2.205-2.205c2.141,1.031-1.304,2.532-0.735,4.41
c1.813-0.434,4.178-4.095,2.94-5.145c0.851-0.322,2.929-0.702,2.939-3.675c3.299,0.604,3.282-2.108,5.146-2.94
c-0.021-0.715-0.9-0.57-1.471-0.735c0.835-2.402,2.459,0.182,2.94-2.94c0.654,0.326,1.314,0.645,1.47,1.47
c1.607-0.108,1.578-1.852,1.471-3.675c0.653,0.326,1.314,0.646,1.47,1.47c3.038-3.467,0.999-3.431,5.88-3.675
c-0.722-2.06-1.961,1.067-2.94-0.735c0.417-0.687,2.044-1.114,0.735-1.47c1.51,0.194,0.623-1.673,2.94-2.205
c0.207-1.187-0.695-1.265-0.735-2.205c0.703-0.936,1.501,1.805,2.205-1.47c-0.411-1.661-1.146,0.891-2.205-0.735
C184.604,110.043,183.415,108.328,186.718,105.637z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M158.053,115.927c1.875-1.998,1.856,4.014-0.735,3.675
c0.776,1.183,2.913-1.197,1.47,2.205c2.148-0.547,1.423-3.968,4.41-3.675c0.852,1.088,0.852,1.853,0,2.94
c1.461-0.009,0.935-2.005,2.94-1.47c0.325,0.654,0.646,1.314,1.47,1.47c1.19,5.533-7.574,5.169-5.145,0.735
c-4.624,2.237-5.797,7.923-7.351,13.23c-3.857-1.697,1.651-8.464-2.939-8.82c0.011-2.684,2.089-3.301,2.939-5.145
c2.254,0.722-0.845,1.961-0.734,2.94C157.269,124.97,157.297,117.272,158.053,115.927z M158.053,122.542
c-0.945,0.829-3.58,3.692-2.205,4.41C155.947,125.279,160.271,124.104,158.053,122.542z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M146.292,118.867c-1.627,2.401,1.289-0.182,1.47,2.94
c1.091-0.321-0.29-0.94,0-2.205c1.293,0.177,1.675,1.265,1.47,2.94c-1.87,0.8-2.85-3.442-2.94,0c-0.654-0.452-1.314-0.888-1.47,0
c-0.834-0.14-0.408-0.737,0-0.735c0.094-1.318-0.899-1.55-0.735-2.94c-0.099,2.661-2.252,2.474-0.735-0.735
C144.006,118.703,145.012,118.922,146.292,118.867z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M147.027,126.217c-2.746,0.786-2.095-1.825-4.41-1.47
c2.307-1.646,2.204,1.484,5.88,0c0.135-0.625-0.287-0.693-0.735-0.735c0.119-0.861,1.34-0.62,2.205-0.735
C149.303,124.573,148.323,125.553,147.027,126.217z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M150.703,124.012c1.047,1.875-0.541,5.018,2.205,5.145
c0.203,3.927-3.142-0.253-2.94,3.675c0.639,2.171,1.1-1.706,2.94-0.735c-1.577,2.097,0.49,7.84-3.675,7.35c0-1.715,0-3.43,0-5.145
c-3.898,2.016,0.009,9.898-6.615,11.76c0.085,2.09,5.114-0.567,2.94-0.735c0.14-0.834,0.737-0.408,0.735,0
c0.625,0.135,0.693-0.287,0.735-0.735c-0.328,3.397-6.316,2.948-7.35,8.085c-1.152-0.26,0.643-1.294-0.735-1.47
c3.993-2.054,2.354-5.377,4.41-8.82c-2.3,2.979-7.474,7.924-5.145,11.025c-0.665,1.295-2.706,1.214-2.94,2.939
c-1.986-1.1,1.273-3.067,2.205-3.675c-1.903-0.945-1.414-2.416-0.735-4.41c-2.21,1.22-1.396,5.463-4.41,5.88
c-0.113,2.697,3.764,2.816,0.735,4.409c-1.543-0.205,1.065-1.963-0.735-2.939c-2.354,1.954-2.1,3.67-3.675,5.145
c0.14,0.835,0.737,0.408,0.735,0c1.309,0.539,0.106,1.337,0,2.205c-0.49,0-0.98,0-1.47,0c2.45-12.494,11.829-18.062,18.375-26.46
c-0.993,0.722-1.469,1.961-2.205,2.94c-0.644-3.111,5.124-6.133,5.88-10.29c-1.686-1.899-3.332,1.904-5.88-0.735
c-1.359,0.111-0.451,2.489-1.47,2.94c-3.668-1-3.68,2.417-10.29,0.735c3.521-2.188,0.104-1.269-0.735-3.675
c-0.692-1.587,2.19,1.703,3.675-0.735c0.093,1.318-0.9,1.55-0.735,2.94c2.874-3.932,10.509-1.78,16.17-3.675
C149.037,125.82,149.037,125.144,150.703,124.012z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M88.228,125.482c4.012,0.636-3.248,6.923,0.735,7.35
c-0.242,1.718-0.883,3.037-1.47,4.41C84.94,132.513,87.434,130.002,88.228,125.482z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M116.893,128.422c0.508,0.983,1.96-0.363,3.675,0.735c0,1.225,0,2.45,0,3.675
c-0.715-0.02-0.57-0.9-0.735-1.47c-0.965,0.882-1.156,0.287-2.205,0c0.26-0.965,1.294-1.156,1.47-2.205
c-1.829-0.114-2.275,1.154-3.675,1.47c-1.769-0.442,2.188-1.137,0.735-3.675C117,127.211,118.021,128.246,116.893,128.422z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M124.978,127.687c2.152,0.661,2.258,0.661,4.41,0
c-1.096-0.157-0.959,4.072,1.47,2.94c1.091,0.321-0.29,0.94,0,2.205c-2.347-2.365-4.171,0.786-7.35-2.205
C123.517,129.167,125.513,129.692,124.978,127.687z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M202.152,136.507c0.275,2.907,3.908-1.138,3.675,2.94
c1.695,0.225,0.816-2.123,2.205-2.205c1.166-1.502-1.186,4.812-4.41,3.675c0.507-1.977-1.519-1.42-2.204-2.205
c1.105-3.549,2.412-6.897,2.939-11.025c2.25,1.826-0.88,4.461,0,7.35c2.643-1.767,3.063-5.757,6.615-6.615
c-0.83,0.885-2.098,1.332-1.47,3.675c-1.499-1.477-1.441,0.325-2.94,0.735c1.749,0.501,2.271,4.078-0.735,3.675
c0.571-0.654,0.791-1.66,0.735-2.94C205.083,136.163,204.159,134.745,202.152,136.507z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M219.058,136.507c1.376-0.704-2.154,5.418-2.94,7.35
C213.548,140.76,217.194,137.612,219.058,136.507z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M197.742,137.242c1.502,2.578-5.185,1.526-2.205,4.41
c1.848,1.377-1.222,0.081-2.205,0c1.78-1.466,0.739-1.16,1.471-3.675C196.643,138.069,197.104,139.38,197.742,137.242z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M154.378,137.977c1.123,1.651-3.711,3.611-4.411,5.88
C144.878,143.354,153.333,142.019,154.378,137.977z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M203.622,146.062c0.235,1.705-0.118,2.822-0.734,3.675
c0.625,0.135,0.693-0.287,0.734-0.735c-0.768,4.558-3.626-5.897-5.145-3.675c-1.759-1.102,1.164-3.678,2.94-3.675
c-0.141-0.595-0.738-0.732-0.735-1.47c-0.752,0.718-1.487,1.453-2.205,2.205c-0.625,0.135-0.693-0.287-0.735-0.735
c0.136-0.625-0.286-0.693-0.734-0.735c0.461-1.499,3.713-0.207,2.939-2.94C203.798,139.573,199.335,145.898,203.622,146.062z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M205.827,149.737c0.515,2.262,0.515,1.413,0,3.675
c1.67-0.536,2.198-2.212,2.94-3.675c0.639,3.084-5.657,9.218-7.35,8.085c0.382,1.087,1.087,1.853,1.47,2.939
c0.965-0.26,1.156-1.294,2.205-1.47c1.034-1.25-2.403,4.648-5.146,4.41c1.156-0.56,1.099-2.332,2.94-2.205
c-0.835-0.705-2.458-4.309-2.94-2.94c0.008-2.459,3.756-7.502,5.88-10.29c-1.441-0.07-1.323-2.201-2.939-5.145
c0.654-0.326,1.314-0.646,1.47-1.47c0.308,0.906,0.941,2.034,2.94,2.94c0.021-1.988,1.634-0.024,2.939-2.94
c0.739,0.315,0.03,5.372-2.939,4.41C208.061,146.757,207.969,149.849,205.827,149.737z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M191.128,144.592c2.271,1.88,3.943-1.985,5.145-1.47
c1.982,2.27-2.469,4.359-3.675,5.88c-2.304-0.508-0.958-1.96-0.735-3.675c-1.694-0.225-0.816,2.123-2.205,2.205
C188.102,149.324,190.522,145.226,191.128,144.592z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M189.657,150.472c-0.362-0.964,3.647-0.323,2.94,1.47
c1.389-0.551,0.51-2.194,2.205-0.735c0.374-0.934,1.395-4.076,4.41-4.41c0.822,4.695-2.131,7.315-4.41,9.555
c-0.017-1.731,1.266-2.164,0.734-4.409c-0.997,0.227-0.609,1.84-0.734,2.939c-1.527-0.411-1.558-1.146-0.735-2.205
c-2.361-0.452-1.007,2.646-2.939,0.735c-2.671,2.188-3.962,4.627-7.351,4.41c0.69-2.981,3.169-5.582,5.88-4.41
C190.85,153.938,190.85,149.946,189.657,150.472z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M197.742,161.497c-1.842,0.127-1.784-1.646-2.939-2.205
c-1.337,0.851-0.664,3.716-3.675,3.675c1.133,1.79,5.077,0.236,5.88-0.734c-0.354,3.983-11.766,2.225-12.495,2.939
c0.118,0.861,1.34,0.62,2.205,0.735c2.378,0.846-1.974,0.832-2.94,0.734c-0.967-3.192-0.65-2.217,1.47-2.939
c0.218-1.933-2.852-0.579-2.204-2.94c1.707,0.498,1.967,2.442,3.675,2.94c5.322-4.528,11.612-5.481,13.965-13.965
c0.625-0.135,0.693,0.287,0.735,0.735c-0.136,0.625,0.286,0.693,0.734,0.735C200.91,153.552,197.779,156.027,197.742,161.497z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M213.912,147.532c3.728-0.668-7.716,10.658-8.085,10.29
c-0.692-0.693,18.229-18.229,2.94-2.94c1.044-1.044,1.567-2.663,2.939-2.939C211.719,149.749,213.618,149.443,213.912,147.532z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M255.072,80.647c-2.489,0.451-5.676,0.204-5.145,3.675
c-1.826-2.835,0.356-7.951,1.47-10.29C254.542,74.317,254.898,77.391,255.072,80.647z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M224.938,77.707c0.69-3.513,2.378,0.297,2.94,2.94
c-0.478,0.748-1.69,0.76-1.471,2.205c-1.319-1.996-9.06-7.74-2.205-8.82C223.266,75.969,224.971,75.586,224.938,77.707z"/>
</g>
</g>
<g>
<path d="M18.655,159.962v39.241c0,1.453,0.049,2.668,0.15,3.645c0.1,0.979,0.275,1.668,0.526,2.068
c0.25,0.351,0.613,0.613,1.09,0.789c0.476,0.176,1.165,0.289,2.067,0.338l3.608,0.15v2.256c-1.955-0.051-3.822-0.102-5.601-0.15
c-1.779-0.051-3.546-0.076-5.3-0.076c-0.501,0-1.015,0-1.541,0s-1.065,0-1.616,0c-1.304,0.05-2.606,0.088-3.909,0.113
c-1.304,0.024-2.657,0.063-4.06,0.113v-2.256l3.608-0.226c0.902,0,1.603-0.087,2.105-0.263c0.5-0.176,0.852-0.438,1.052-0.789
c0.25-0.4,0.425-1.09,0.526-2.068c0.1-0.977,0.15-2.166,0.15-3.57v-33.828c0-1.402-0.05-2.58-0.15-3.533
c-0.101-0.951-0.276-1.627-0.526-2.029c-0.201-0.4-0.552-0.676-1.052-0.826c-0.502-0.15-1.203-0.25-2.105-0.301l-3.082-0.301
v-2.256c0.65,0.051,1.327,0.088,2.029,0.113c0.702,0.025,1.403,0.037,2.105,0.037c1.353,0.051,2.769,0.088,4.248,0.113
c1.478,0.025,2.943,0.037,4.397,0.037c1.503,0,2.981-0.012,4.435-0.037c1.453-0.025,2.906-0.063,4.36-0.113
c0.701,0,1.428-0.012,2.18-0.037c0.752-0.025,1.478-0.037,2.18-0.037c0.1,0,0.212,0,0.338,0c0.125,0,0.237,0,0.338,0
c5.212,0,8.845,1.014,10.9,3.044c2.054,2.03,3.232,4.272,3.533,6.728c0,0.252,0.012,0.502,0.038,0.752
c0.024,0.252,0.037,0.502,0.037,0.752c0,4.059-1.503,7.305-4.51,9.734c-3.007,2.432-6.314,3.998-9.923,4.699
c-0.05,0.05-0.088,0.074-0.113,0.074c-0.025,0-0.063,0-0.112,0l17.064,22.176c0.551,0.803,1.227,1.316,2.029,1.541
c0.801,0.227,1.653,0.39,2.556,0.489v2.181c-0.301,0-0.614-0.014-0.939-0.038c-0.326-0.026-0.639-0.038-0.939-0.038
c-0.602-0.051-1.191-0.088-1.767-0.112c-0.577-0.026-1.165-0.038-1.767-0.038c-0.451,0-0.891,0.012-1.315,0.038
c-0.427,0.024-0.84,0.038-1.24,0.038c-0.15,0-0.289,0.012-0.414,0.037c-0.125,0.024-0.263,0.037-0.413,0.037
c-0.301,0-0.59,0.012-0.865,0.038c-0.276,0.024-0.563,0.038-0.864,0.038c-0.251-0.301-0.501-0.627-0.752-0.979
c-0.251-0.35-0.501-0.676-0.751-0.977c-0.101-0.15-0.201-0.275-0.301-0.376c-0.101-0.1-0.176-0.2-0.226-0.301
c-0.201-0.25-0.389-0.488-0.564-0.714c-0.176-0.226-0.338-0.438-0.488-0.639l-13.832-18.643c-0.351-0.451-0.727-0.902-1.127-1.354
c-0.402-0.451-0.802-0.902-1.203-1.354c-0.251-0.35-0.514-0.676-0.789-0.977c-0.276-0.301-0.539-0.602-0.79-0.902l0.451-0.978
c0.35,0.101,0.701,0.15,1.053,0.15c0.35,0,0.701,0,1.052,0c0.5,0,1.002-0.012,1.503-0.038c0.5-0.024,1.002-0.062,1.503-0.112
c0.25-0.05,0.5-0.087,0.752-0.112c0.25-0.025,0.5-0.063,0.751-0.113c2.656-0.451,4.949-1.628,6.878-3.533
c1.929-1.904,2.894-4.234,2.894-6.99c0-3.959-1.191-6.665-3.571-8.119c-2.381-1.453-4.999-2.205-7.855-2.256
c-0.101,0-0.188,0-0.263,0s-0.139,0-0.188,0c-1.704,0-3.146,0.088-4.322,0.264c-1.178,0.176-2.293,0.389-3.345,0.639V159.962z"/>
<path d="M72.028,172.967c4.108,0.051,7.518,1.305,10.224,3.759c2.706,2.456,4.06,5.814,4.06,10.073c0,0.502,0,1.015,0,1.541
s-0.051,1.065-0.15,1.616c-1.104,0.2-2.23,0.364-3.383,0.489c-1.153,0.125-2.281,0.238-3.383,0.338
c-1.153,0.051-2.293,0.102-3.421,0.15c-1.127,0.051-2.268,0.075-3.42,0.075H61.579c0,4.438,1.115,8.015,3.346,10.733
c2.229,2.718,5.649,4.075,10.261,4.075c1.754,0,3.346-0.35,4.773-1.052c1.429-0.701,2.819-1.453,4.172-2.256
c0.101-0.049,0.176-0.087,0.226-0.112c0.05-0.024,0.101-0.063,0.15-0.112l0.978,0.676l-1.504,2.557
c-0.101,0.25-0.45,0.551-1.052,0.901s-1.329,0.752-2.181,1.202c-0.853,0.352-1.792,0.689-2.818,1.016
c-1.028,0.325-2.067,0.588-3.12,0.789c-0.501,0.1-0.99,0.176-1.466,0.226c-0.477,0.05-0.939,0.075-1.391,0.075
c-5.664,0-9.974-1.616-12.93-4.849c-2.958-3.232-4.436-7.379-4.436-12.44c0-3.658,0.477-6.627,1.429-8.908
c0.951-2.28,2.28-4.098,3.984-5.451c0.701-0.551,1.453-1.102,2.255-1.653c0.801-0.551,1.604-1.002,2.405-1.353
c0.701-0.351,1.391-0.65,2.067-0.902c0.677-0.25,1.341-0.476,1.992-0.677c0.551-0.15,1.09-0.263,1.616-0.339
c0.526-0.074,1.09-0.112,1.691-0.112V172.967z M71.652,175.447c-2.757,0.051-5.111,1.053-7.066,3.008
c-1.954,1.954-2.906,4.836-2.856,8.645c0,0.15,0,0.301,0,0.451s0,0.301,0,0.451c1.654,0.201,3.308,0.326,4.962,0.375
c1.653,0.051,3.257,0.076,4.811,0.076c1.453,0,2.856-0.025,4.21-0.076c1.354-0.049,2.655-0.1,3.909-0.15
c0-3.507-0.652-6.502-1.955-8.982c-1.304-2.48-3.308-3.721-6.014-3.721V175.447z"/>
<path d="M118.183,203.262l-7.818,4.961c-0.401,0.301-0.89,0.514-1.466,0.64c-0.576,0.124-1.141,0.212-1.691,0.263
c-0.101,0-0.2,0-0.301,0s-0.2,0-0.3,0c-0.051,0-0.113,0-0.188,0s-0.163,0-0.263,0c-5.213-0.302-8.921-1.908-11.126-4.821
c-2.206-2.913-3.434-6.103-3.684-9.567c-0.051-0.251-0.075-0.514-0.075-0.791c0-0.276,0-0.565,0-0.866
c0-3.817,0.701-6.905,2.105-9.267c1.402-2.36,3.131-4.193,5.187-5.499l6.314-4.144c0.551-0.25,1.303-0.5,2.255-0.752
c0.952-0.25,1.929-0.4,2.932-0.451c0.101,0,0.188,0,0.264,0s0.138,0,0.188,0c1.854,0,3.671,0.214,5.45,0.639
c1.778,0.427,3.496,1.041,5.149,1.842l3.684-2.405l1.429,0.827c-0.402,0.809-0.715,1.703-0.94,2.688s-0.389,1.981-0.488,2.992
c-0.101,0.857-0.176,1.703-0.226,2.535c-0.051,0.834-0.075,1.604-0.075,2.31v37.06c0,1.002,0.024,1.88,0.075,2.631
c0.05,0.752,0.15,1.328,0.301,1.729c0.15,0.351,0.425,0.602,0.827,0.752c0.4,0.15,0.927,0.25,1.578,0.301l3.458,0.226v2.255
c-0.451,0-0.915-0.013-1.391-0.038c-0.477-0.025-0.966-0.037-1.466-0.037c-0.952-0.051-1.968-0.088-3.045-0.113
c-1.078-0.025-2.243-0.037-3.495-0.037c-0.952,0-1.879,0.012-2.781,0.037s-1.805,0.038-2.706,0.038
c-0.201,0-0.414,0.012-0.64,0.038c-0.226,0.024-0.464,0.037-0.714,0.037c-0.552,0-1.116,0.012-1.691,0.037
c-0.576,0.025-1.165,0.038-1.767,0.038v-2.255l4.36-0.226c0.65-0.051,1.177-0.15,1.578-0.301c0.4-0.15,0.677-0.401,0.827-0.752
c0.15-0.401,0.25-0.978,0.301-1.729c0.05-0.751,0.075-1.629,0.075-2.631V203.262z M118.183,199.188v-19.672
c-1.003-0.904-2.131-1.582-3.383-2.035c-1.253-0.451-2.507-0.729-3.759-0.83c-0.401-0.049-0.802-0.087-1.202-0.113
c-0.402-0.023-0.803-0.037-1.203-0.037c-0.401,0-0.815,0.025-1.24,0.075c-0.427,0.051-0.84,0.126-1.24,0.228
c-2.105,0.502-4.022,1.721-5.751,3.654c-1.729,1.936-2.594,4.861-2.594,8.781c0,0.252,0,0.516,0,0.792s0.024,0.539,0.075,0.79
c0.15,3.518,1.09,6.747,2.819,9.686c1.729,2.94,4.647,4.41,8.758,4.41c0.25,0,0.525-0.012,0.826-0.038
c0.301-0.024,0.576-0.088,0.827-0.188c1.053-0.251,2.079-0.666,3.082-1.243c1.002-0.578,1.829-1.193,2.48-1.847
c0.451-0.401,0.814-0.816,1.091-1.244c0.274-0.428,0.413-0.791,0.413-1.094V199.188z"/>
<path d="M168.549,200.545c0,1.055,0.025,1.959,0.074,2.713c0.051,0.754,0.15,1.331,0.301,1.732c0.15,0.352,0.426,0.602,0.828,0.752
c0.4,0.15,0.926,0.252,1.578,0.301l3.082,0.15v2.256c-0.301,0-0.613-0.014-0.939-0.038c-0.326-0.026-0.664-0.038-1.016-0.038
c-0.5-0.051-0.99-0.088-1.465-0.112c-0.477-0.026-0.965-0.038-1.467-0.038c-0.201,0-0.412,0-0.639,0c-0.225,0-0.439,0-0.639,0
c-0.703,0-1.416,0.012-2.143,0.038c-0.727,0.024-1.441,0.062-2.143,0.112c-0.352,0-0.689,0.012-1.014,0.038
c-0.328,0.024-0.666,0.038-1.016,0.038c0-0.102,0-0.188,0-0.264s0.025-0.162,0.074-0.264c0.051-0.951,0.102-1.928,0.15-2.932
c0.051-1.002,0.076-2.129,0.076-3.383l-5.037,4.586c-1.053,1.004-2.268,1.742-3.645,2.218c-1.381,0.476-2.97,0.714-4.775,0.714
c-4.811,0-7.769-1.152-8.87-3.457c-1.103-2.305-1.68-4.861-1.729-7.668c0-0.25,0-0.514,0-0.789s0-0.564,0-0.865v-12.704
c0-1.152-0.038-2.13-0.113-2.932s-0.214-1.353-0.413-1.653c-0.201-0.301-0.515-0.514-0.939-0.64
c-0.427-0.124-1.041-0.188-1.842-0.188h-2.781v-2.254c0.1,0.05,0.199,0.063,0.3,0.037s0.176-0.037,0.226-0.037
c1.754-0.2,3.445-0.514,5.074-0.94c1.628-0.425,3.094-0.89,4.398-1.391c0.3-0.1,0.601-0.212,0.901-0.339
c0.301-0.124,0.576-0.236,0.827-0.338l0.677,0.226v22.229c0,3.014,0.5,5.299,1.503,6.857c1.002,1.557,3.232,2.336,6.691,2.336
c1.904,0,3.684-0.639,5.338-1.918c1.652-1.277,2.855-2.668,3.607-4.172c0.199-0.451,0.35-0.889,0.451-1.314
c0.1-0.426,0.15-0.84,0.15-1.241v-12.328c0-1.152-0.037-2.13-0.113-2.932c-0.074-0.802-0.213-1.353-0.412-1.653
c-0.201-0.301-0.516-0.514-0.941-0.64c-0.426-0.124-1.039-0.188-1.842-0.188h-2.781v-2.254c0.1,0.05,0.201,0.063,0.301,0.037
s0.176-0.037,0.227-0.037c1.754-0.2,3.445-0.514,5.074-0.94c1.627-0.425,3.094-0.89,4.396-1.391c0.301-0.1,0.602-0.212,0.902-0.339
c0.301-0.124,0.576-0.236,0.828-0.338l0.676,0.226V200.545z"/>
<path d="M195.461,172.967c4.107,0.051,7.518,1.305,10.223,3.759c2.707,2.456,4.061,5.814,4.061,10.073c0,0.502,0,1.015,0,1.541
s-0.051,1.065-0.15,1.616c-1.104,0.2-2.23,0.364-3.383,0.489c-1.154,0.125-2.281,0.238-3.383,0.338
c-1.154,0.051-2.293,0.102-3.422,0.15c-1.127,0.051-2.268,0.075-3.42,0.075h-10.975c0,4.438,1.115,8.015,3.346,10.733
c2.229,2.718,5.648,4.075,10.26,4.075c1.754,0,3.346-0.35,4.773-1.052c1.43-0.701,2.82-1.453,4.172-2.256
c0.102-0.049,0.176-0.087,0.227-0.112c0.049-0.024,0.1-0.063,0.15-0.112l0.977,0.676l-1.504,2.557
c-0.1,0.25-0.449,0.551-1.051,0.901s-1.33,0.752-2.182,1.202c-0.852,0.352-1.791,0.689-2.818,1.016
c-1.027,0.325-2.066,0.588-3.119,0.789c-0.502,0.1-0.99,0.176-1.467,0.226s-0.939,0.075-1.391,0.075
c-5.664,0-9.973-1.616-12.93-4.849s-4.436-7.379-4.436-12.44c0-3.658,0.477-6.627,1.43-8.908c0.951-2.28,2.279-4.098,3.984-5.451
c0.701-0.551,1.453-1.102,2.254-1.653c0.801-0.551,1.604-1.002,2.406-1.353c0.701-0.351,1.391-0.65,2.066-0.902
c0.678-0.25,1.342-0.476,1.992-0.677c0.551-0.15,1.09-0.263,1.617-0.339c0.525-0.074,1.09-0.112,1.691-0.112V172.967z
M195.084,175.447c-2.756,0.051-5.111,1.053-7.066,3.008c-1.953,1.954-2.906,4.836-2.855,8.645c0,0.15,0,0.301,0,0.451
s0,0.301,0,0.451c1.654,0.201,3.307,0.326,4.961,0.375c1.654,0.051,3.258,0.076,4.811,0.076c1.453,0,2.857-0.025,4.211-0.076
c1.354-0.049,2.654-0.1,3.908-0.15c0-3.507-0.652-6.502-1.955-8.982s-3.307-3.721-6.014-3.721V175.447z"/>
<path d="M215.154,197.474h2.256v3.082c0,2.005,0.789,3.509,2.367,4.511c1.58,1.002,3.32,1.604,5.225,1.804
c0.35,0.05,0.701,0.088,1.053,0.112c0.35,0.026,0.701,0.038,1.053,0.038c2.355,0,4.41-0.64,6.164-1.921
c1.754-1.279,2.631-2.926,2.631-4.936c0-1.205-0.313-2.258-0.939-3.162c-0.627-0.905-1.516-1.508-2.668-1.81
c-1.004-0.251-2.08-0.515-3.232-0.79c-1.154-0.276-2.307-0.565-3.459-0.867c-0.752-0.201-1.492-0.414-2.217-0.641
c-0.727-0.225-1.441-0.465-2.143-0.717c-1.805-0.701-3.32-1.668-4.549-2.899s-1.842-3.001-1.842-5.312
c0-4.068,1.479-6.918,4.436-8.551s6.189-2.449,9.697-2.449c1.754,0,3.445,0.176,5.074,0.526s3.17,0.802,4.623,1.353
c-0.102,1.354-0.176,2.732-0.225,4.135c-0.051,1.404-0.102,2.857-0.15,4.36l-2.105-0.075v-1.729c0-1.854-0.865-3.309-2.594-4.36
s-3.621-1.628-5.676-1.729c-0.1,0-0.188,0-0.262,0c-0.076,0-0.139,0-0.189,0c-2.506,0-4.271,0.453-5.299,1.357
s-1.666,1.908-1.916,3.013c-0.051,0.302-0.09,0.591-0.113,0.866c-0.025,0.277-0.037,0.565-0.037,0.866
c0,1.608,0.65,2.876,1.953,3.806c1.303,0.929,3.383,1.645,6.24,2.146c4.459,0.754,7.768,1.81,9.922,3.164
c2.154,1.355,3.232,3.516,3.232,6.479c0,4.118-1.729,7.245-5.186,9.38c-3.459,2.133-7.268,3.201-11.428,3.201
c-0.801,0-1.604-0.025-2.404-0.075c-0.803-0.05-1.58-0.15-2.33-0.301c-0.953-0.101-1.906-0.276-2.857-0.526
c-0.953-0.251-1.93-0.525-2.932-0.826c0.301-1.303,0.5-2.656,0.602-4.06c0.1-1.403,0.174-2.831,0.225-4.285
c0-0.351,0-0.701,0-1.052s0-0.701,0-1.053V197.474z"/>
<path d="M245.6,179.808v-1.579l5.863-2.631v-5.262c0-0.951-0.025-1.917-0.074-2.895c-0.051-0.977-0.127-1.966-0.227-2.969
c0.701-0.199,1.365-0.426,1.992-0.677c0.627-0.25,1.215-0.501,1.768-0.751c0.551-0.251,1.051-0.501,1.502-0.752
c0.451-0.25,0.828-0.477,1.129-0.678l0.902,0.752c-0.102,0.803-0.201,1.629-0.301,2.48c-0.102,0.854-0.178,1.705-0.227,2.557
c-0.102,1.003-0.176,1.992-0.225,2.969c-0.051,0.978-0.076,1.893-0.076,2.744v2.781l10.299-0.451l-0.676,4.061h-9.623v19.695
c0,1.754,0.301,3.07,0.902,3.945c0.602,0.878,1.678,1.316,3.232,1.316c0.752,0,1.439-0.1,2.066-0.301
c0.627-0.199,1.166-0.451,1.617-0.752c0.15-0.049,0.287-0.113,0.414-0.188c0.123-0.076,0.236-0.138,0.338-0.188l0.977,1.202
l-3.607,3.984c-0.201,0.25-0.59,0.438-1.166,0.564c-0.576,0.125-1.191,0.213-1.842,0.263c-0.301,0.05-0.613,0.075-0.939,0.075
s-0.639,0-0.939,0c-2.006,0-3.734-0.552-5.188-1.654c-1.453-1.102-2.18-3.182-2.18-6.238v-21.725L245.6,179.808z"/>
<path d="M271.533,197.474h2.256v3.082c0,2.005,0.789,3.509,2.367,4.511c1.58,1.002,3.32,1.604,5.225,1.804
c0.35,0.05,0.701,0.088,1.053,0.112c0.35,0.026,0.701,0.038,1.053,0.038c2.355,0,4.41-0.64,6.164-1.921
c1.754-1.279,2.631-2.926,2.631-4.936c0-1.205-0.313-2.258-0.939-3.162c-0.627-0.905-1.516-1.508-2.668-1.81
c-1.004-0.251-2.08-0.515-3.232-0.79c-1.154-0.276-2.307-0.565-3.459-0.867c-0.752-0.201-1.492-0.414-2.217-0.641
c-0.727-0.225-1.441-0.465-2.143-0.717c-1.805-0.701-3.32-1.668-4.549-2.899s-1.842-3.001-1.842-5.312
c0-4.068,1.479-6.918,4.436-8.551s6.189-2.449,9.697-2.449c1.754,0,3.445,0.176,5.074,0.526s3.17,0.802,4.623,1.353
c-0.102,1.354-0.176,2.732-0.225,4.135c-0.051,1.404-0.102,2.857-0.15,4.36l-2.105-0.075v-1.729c0-1.854-0.865-3.309-2.594-4.36
s-3.621-1.628-5.676-1.729c-0.1,0-0.188,0-0.262,0c-0.076,0-0.139,0-0.189,0c-2.506,0-4.271,0.453-5.299,1.357
s-1.666,1.908-1.916,3.013c-0.051,0.302-0.09,0.591-0.113,0.866c-0.025,0.277-0.037,0.565-0.037,0.866
c0,1.608,0.65,2.876,1.953,3.806c1.303,0.929,3.383,1.645,6.24,2.146c4.459,0.754,7.768,1.81,9.922,3.164
c2.154,1.355,3.232,3.516,3.232,6.479c0,4.118-1.729,7.245-5.186,9.38c-3.459,2.133-7.268,3.201-11.428,3.201
c-0.801,0-1.604-0.025-2.404-0.075c-0.803-0.05-1.58-0.15-2.33-0.301c-0.953-0.101-1.906-0.276-2.857-0.526
c-0.953-0.251-1.93-0.525-2.932-0.826c0.301-1.303,0.5-2.656,0.602-4.06c0.1-1.403,0.174-2.831,0.225-4.285
c0-0.351,0-0.701,0-1.052s0-0.701,0-1.053V197.474z"/>
</g>
<g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 49 KiB

Some files were not shown because too many files have changed in this diff Show More