Skip to main content

PyInstapaper is a Python wrapper for the full Instapaper API.

Project description

============
PyInstapaper
============


.. image:: https://img.shields.io/pypi/v/pyinstapaper.svg
:target: https://pypi.python.org/pypi/pyinstapaper

.. image:: https://img.shields.io/travis/mdorn/pyinstapaper.svg
:target: https://travis-ci.org/mdorn/pyinstapaper

.. image:: https://readthedocs.org/projects/pyinstapaper/badge/?version=latest
:target: https://pyinstapaper.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

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`_.

.. _Instapaper: https://www.instapaper.com
.. _full Instapaper API: https://www.instapaper.com/api

To use it, in addition to your Instapaper account username and password,
you'll need to request API credentials from Instapaper.

Usage
=====

.. code-block:: python

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:

.. code-block:: bash

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`_

.. _Ryan Galloway: https://github.com/rsgalloway/instapaper
.. _requests-oauthlib: https://requests-oauthlib.readthedocs.org/en/latest/


=======
History
=======

0.1.0 (2015-09-26)
------------------

* First release on PyPI.

0.2.0 (2018-05-02)
------------------

* Python 3 compatibility
* Added 'have' param to get_bookmarks


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyinstapaper, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size pyinstapaper-0.2.2-py2.py3-none-any.whl (5.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pyinstapaper-0.2.2.tar.gz (12.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page