A Python module to access Pinboard.in via its API. This is a fork/modification of mudge/python-delicious
Python
Pull request Compare This branch is 50 commits ahead of mudge:master.
Latest commit f36826b Dec 22, 2014 @mgan59 Merge pull request #15 from jmhobbs/patch-1
Add tag deletion method.
Permalink
Failed to load latest commit information.
doc
tests
.editorconfig
.gitignore
LICENSE
README.markdown updating docs and cleanup Mar 21, 2014
added_features.markdown additional doc changes Jan 27, 2011
pinboard.py
setup.py updating docs and cleanup Mar 21, 2014

README.markdown

Python-Pinboard

Python module to access Pinboard via its API. This project is a fork from the original work by Paul Mucur on the Python-Delicious API.

Installation

To install using easy-install:

    python setup.py install

Or (if you have pip installed)

    pip install -e git://github.com/mgan59/python-pinboard.git@v1.1#egg=python-pinboard

Usage

To get started you must first open a connection to pinboard.in, there are authentication methods

Standard method using username/password

import pinboard

# create pinboard connection (using username/password)
pinboard_conn = pinboard.open('username', 'password')

A method using your api token from the pinboard.in settings

# an alternative method using an api token
pinboard_conn = pinboard.open(token='username:23asdfjlkj')

Now how to actual add and delete bookmarks

# Example of adding a bookmark
# .add('url', 'title', 'description', ('tags', 'as', 'a', 'tuple'))
p.add('https://github.com/mgan59/python-pinboard/',
    'Python-Pinboard',
    'A Python module to access the contents of a Pinboard account via the Pinboard API.',
    ('computing', 'python'))

# .add without a description but using a kwarg tags to specify the tuple
p.add('https://github.com/mgan59/python-pinboard',
    'Python-Pinboard',
    tags=('computing', 'python', 'projects'))

# .delete uses the bookmark url since they are unique
p.delete('https://github.com/mgan59/python-pinboard')

Contributors

Bitdeli Badge