skip to navigation
skip to content

pinboard 0.2

A Python wrapper for

Package Documentation

Latest Version: 0.5.10 is an easy-to-use and fully-functional Python wrapper for the API.

Installation is available for download through the Python Package Index (PyPi). You can install it right away using pip or easy_install.

pip install pinboard


To get started, you’re going to need to get your Pinboard API token from the password page on the Pinboard website. Once you’ve got that, you’re ready to go.

>>> import pinboard
>>> pb = pinboard.Pinboard(api_token)

Once you’ve done this, you can now use the pb object to make calls to the Pinboard API. Here are some examples:

# Retrieve all bookmarks
>>> pb.posts.all()

# Retrieve a single bookmark
>>> bookmark = pb.posts.all(results=1)[0]
<Bookmark title="Of Princesses and Dragons — Medium" url="">

>>> bookmark.time
datetime.datetime(2014, 7, 21, 11, 11, 59)

# Make a change to a bookmark and save it
>>> bookmark.title = "Of Princesses and Dragons"
>>> bookmark.tags = ["blogs", "interesting"]
{u'result_code': u'done'}

# You can also save a bookmark without a bookmark object
>>> pb.posts.add(url="", description="A Great Search Engine", tags=["search", "tools"])
{u'result_code': u'done'}

# If you want to update the bookmark creation date as well, you'll need to pass in `update_time=True` to the save method
>>> import datetime
>>> bookmark.time = - datetime.timedelta(days=5)

# Retrieve all tags
>>> pb.tags.get()

# By default, the Pinboard object will return parsed JSON objects. If you'd like the raw response object, just pass in `parse_response=False`
>>> response = pb.tags.get(parse_response=False)
>>> response
<addinfourl at 4396047680 whose fp = <socket._fileobject object at 0x105f79850>>
... your tags ... maps 1-1 to the Pinboard API (e.g., will send a request to “”). For more information on other methods and usage, please read the Pinboard API documentation.


Apache License, Version 2.0. See LICENSE for details.

File Type Py Version Uploaded on Size
pinboard-0.2.tar.gz (md5, pgp) Source 2014-07-24 3KB
  • Downloads (All Versions):
  • 71 downloads in the last day
  • 272 downloads in the last week
  • 1259 downloads in the last month