Unofficial full Instapaper API Python wrapper.
The easiest way to install is with pip:
$ pip install -U instapaperOr from source
$ git clone https://github.com/rsgalloway/instapaper.git
$ cd instapaper
$ pip install .See the envstack and distman sections for more installation and config options.
Logging in:
>>> from instapaper import Instapaper as ipaper
>>> i = ipaper(INSTAPAPER_KEY, INSTAPAPER_SECRET)
>>> i.login(email_address, password)Getting bookmarks:
>>> marks = i.bookmarks()Get the html:
>>> marks[0].htmlOr the raw text:
>>> marks[0].textFolders:
>>> folders = i.folders()
>>> for f in folders:
... print f.folder_id, f.titleMove bookmark:
>>> marks[0].move(f.folder_id)Have a long commute home from work? Have your Instapaper bookmarks read back to you using "utter" (pip install utter). You can even have them read back to you in a differnet language, for example Italian: ::
>>> import utter
>>> for m in marks:
... utter.play(m.text, target="it")Environment variables can optionally be managed in the instapaper.env files using envstack:
$ pip install -U envstack
$ envstack instapaper -- python
>>> import instapaper
>>> instapaper._API_VERSION_
'api/1.2'If installing from source you can use distman
to install instapaper using the provided dist.json file:
$ pip install -U distman
$ dist [-d]Using distman will deploy the targets defined in the dist.json file to the
root folder defined by $DEPLOY_ROOT, which can either be added to the
instapaper.env file or a default.env file.