Paul's Programming Notes
PostsRSSGithub

Downloading Files With Python's Requests Module

19 Jan 2015

http://docs.python-requests.org/en/latest/user/quickstart/#binary-response-content

From the example:

>>> from PIL import Image
>>> from StringIO import StringIO
>>> i = Image.open(StringIO(r.content))
python

Related posts

  • Python - setuptools Skips a Package Named scripts 29 Aug 2026
  • Switching from pre-commit to prek 27 Jun 2026
  • Python - Inline Script Dependencies With PEP 723 28 Mar 2026
© 2026. All rights reserved.