PyInstapaper is a Python wrapper for the full Instapaper API.
Project description
Instapaper is a tool for saving web pages to read later, e.g. offline on a mobile device. PyInstapaper is a Python wrapper for the full Instapaper API.
To use it, in addition to your Instapaper account username and password, you’ll need to request API credentials from Instapaper.
Usage
from pyinstapaper.instapaper import Instapaper, Folder
INSTAPAPER_KEY = 'MY_INSTAPAPER_API_KEY'
INSTAPAPER_SECRET = 'MY_INSTAPAPER_API_SECRET'
INSTAPAPER_LOGIN = 'me@example.com'
INSTAPAPER_PASSWORD = 'p@ssw0rd'
instapaper = Instapaper(INSTAPAPER_KEY, INSTAPAPER_SECRET)
instapaper.login(INSTAPAPER_LOGIN, INSTAPAPER_PASSWORD)
# Get the 10 latest instapaper bookmarks for the given account and do
# something with the article text
bookmarks = instapaper.get_bookmarks('starred')
for bookmark in enumerate(bookmarks):
do_something(bookmark.get_text())
bookmark.archive()
# Create a new folder
folder = Folder(instapaper, title='cool stuff')
result = folder.add()
Installation
To install PyInstapaper, simply:
pip install pyinstapaper
Additional info
Free software: MIT License
Documentation: https://pyinstapaper.readthedocs.org.
Boilerplate courtesy of cookiecutter: https://github.com/audreyr/cookiecutter
Thanks to Ryan Galloway for pointing the way to using the Python oauth2 library for Instapaper’s XAuth implementation, though ideally pyinstapaper would use requests-oauthlib
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for readwise-pyinstapaper-0.2.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9fe6fa8f8b2d7e9a7e9ad777d1363e6284b75f48bb223d627ecbd5e17d95bff |
|
MD5 | a88273d04f22d5f1b9359aa54f078cf0 |
|
BLAKE2b-256 | b8df8d93cd152c5568b6e5f72b2d64602338537936ce776a4d36a74d3d0e0e10 |
Hashes for readwise_pyinstapaper-0.2.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 123b905a5c4338055ed755287c2f1955c919232283fab422aa4e04b22e082b0b |
|
MD5 | ea8ad2be50fe021a1f7ff8506ab2cc9f |
|
BLAKE2b-256 | ccd18157238bb4af8f1ba51ab2caecaae06aecedfb1c179da3e53e228e245538 |