pinboard


Namepinboard JSON
Version 2.0.3 PyPI version JSON
download
home_pagehttp://github.com/lionheart/pinboard.py
SummaryA Python wrapper for Pinboard.in
upload_time2017-08-12 23:35:10
maintainer
docs_urlhttp://pythonhosted.org/pinboard/
authorDan Loewenherz
requires_python
licenseApache 2.0
keywords pinboard
VCS
bugtrack_url http://github.com/lionheart/pinboard.py/issues
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            Pinboard.py
===========

.. https://circleci.com/gh/lionheart/pinboard.py/tree/master.png?circle-token=d50700e1c75836063a7951f80ab1913cf6447acf

|ci|_ |version|_

.. |ci| image:: http://img.shields.io/travis/lionheart/pinboard.py.svg?style=flat
.. _ci: https://travis-ci.org/lionheart/pinboard.py

.. |version| image:: http://img.shields.io/pypi/v/pinboard.svg?style=flat
.. _version: https://pypi.python.org/pypi/pinboard

Pinboard.py is an easy-to-use and fully-functional Python wrapper and `command-line utility <https://github.com/lionheart/pinboard.py#command-line>`_ for the Pinboard.in API.

Installation
------------

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

If you're using Python 3 or above:

.. code:: bash

   pip install "pinboard>=2.0"

For Python 2.7:

.. code:: bash

   pip install "pinboard>=1.0,<2.0"

Usage
-----

To get started, you're going to need to get your Pinboard API token from the `password page <https://pinboard.in/settings/password>`_ on the Pinboard website. Once you've got that, you're ready to go.

.. code:: pycon

   >>> 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:

Update
''''''

Returns the most recent time a bookmark was added, updated or deleted.

.. code:: pycon

   >>> pb.posts.update()
   datetime.datetime(2014, 7, 27, 18, 11, 29)


Posts
'''''

Add a bookmark:

.. code:: pycon

   >>> pb.posts.add(url="http://google.com/", description="A Great Search Engine", \
           extended="This is a description!", tags=["search", "tools"], shared=True, \
           toread=False)
   True


Update a bookmark:

.. code:: pycon

   # First, retrieve the bookmark you'd like to edit
   >>> bookmark = pb.posts.get(url='http://google.com/')['posts'][0]
   >>> bookmark
   <Bookmark description="A Great Search Engine" url="google.com">

   # You can now change description, extended, shared, toread, tags, or time directly with the bookmark object.
   >>> bookmark.description = "Google is pretty awesome"
   >>> bookmark.tags = ["search", "searching"]
   >>> bookmark.save()
   True

   # 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.datetime.now() - datetime.timedelta(days=5)
   >>> bookmark.save(update_time=True)


Delete a bookmark:

.. code:: pycon

   >>> pb.posts.delete(url="http://google.com/")
   True


Get one or more posts on a single day matching the parameters:

.. code:: pycon

   >>> pb.posts.get(url="http://google.com/")
   {u'date': datetime.datetime(2014, 7, 25, 16, 35, 25),
    u'posts': [<Bookmark description="A Great Search Engine" url="google.com">],
    u'user': u'dlo'}

   >>> import datetime
   >>> pb.posts.get(dt=datetime.date.today())
   {u'date': datetime.datetime(2014, 7, 25, 16, 35, 25),
    u'posts': [<Bookmark description="A Great Search Engine" url="google.com">,
     <Bookmark description="Smooth Scrolling | CSS-Tricks" url="css-tricks.com">,
     <Bookmark description="Apple "Frustrated" that "People Don't Want to Pay Anything" on Mobile, Says 'The Banner Saga' Developer | Touch Arcade" url="toucharcade.com">],
    u'user': u'dlo'}


Return all recent bookmarks (optionally filtering by tag):

.. code:: pycon

   >>> pb.posts.recent(tag=["programming", "python"])
   {u'date': datetime.datetime(2014, 4, 28, 2, 7, 58),
    u'posts': [<Bookmark description="itunesfs 1.0.0.7 : Python Package Index" url="pypi.python.org">,
     <Bookmark description="mincss "Clears the junk out of your CSS" - Peterbe.com" url="www.peterbe.com">,
     <Bookmark description="Braintree Test Credit Card Account Numbers" url="www.braintreepayments.com">,
     <Bookmark description="Valued Lessons: Monads in Python (with nice syntax!)" url="www.valuedlessons.com">,
     <Bookmark description="Paste #EGY1XPQxQ2UPuT91SH83 at spacepaste" url="bpaste.net">,
     <Bookmark description="40 Random Letters and Numbers" url="gist.github.com">,
     <Bookmark description="PEP 3156 -- Asynchronous IO Support Rebooted" url="www.python.org">,
     <Bookmark description="Brython" url="www.brython.info">,
     <Bookmark description="Django REST framework" url="django-rest-framework.org">,
     <Bookmark description="mypy - A New Python Variant with Dynamic and Static Typing" url="www.mypy-lang.org">,
     <Bookmark description="Julython 2012" url="www.julython.org">,
     <Bookmark description="Stripe Blog: Exploring Python Using GDB" url="stripe.com">,
     <Bookmark description="Python FAQ: Descriptors - fuzzy notepad" url="me.veekun.com">,
     <Bookmark description="A Guide to Python's Magic Methods « rafekettler.com" url="www.rafekettler.com">,
     <Bookmark description="Melopy" url="prezjordan.github.com">,
     <Bookmark description="litl/rauth" url="github.com">],
    u'user': u'dlo'}


Return a list of dates with the number of posts at each date:

.. code:: pycon

   >>> pb.posts.dates(tag=["programming", "python"])
   {u'dates': {datetime.date(2008, 12, 5): 1,
     datetime.date(2008, 12, 6): 1,
     ...
     datetime.date(2014, 7, 24): 6,
     datetime.date(2014, 7, 25): 4},
    u'tag': u'programming+python',
    u'user': u'dlo'}


Get all bookmarks in your account:

.. code:: pycon

   >>> pb.posts.all()
   [<Bookmark description="Of Princesses and Dragons" url="medium.com">
    <Bookmark description="A Great Search Engine" url="google.com">,
    ...
    <Bookmark description="Runner Econ 101 - StimHa" url="stimhack.com">,
    <Bookmark description="서인국, 탄탄 근육+ 태평양 어깨…어부바 부른다 : 네이" url="news.naver.com">]


You can also filter by tag, start, results, fromdt, or todt.

.. code:: pycon

   >>> import datetime
   >>> five_days_ago = datetime.datetime.now() - datetime.timedelta(days=5)
   >>> pb.posts.all(tag=["programming"], start=10, results=100, fromdt=five_days_ago)
   [<Bookmark description="Of Princesses and Dragons" url="medium.com">
    <Bookmark description="A Great Search Engine" url="google.com">,
    ...
    <Bookmark description="Runner Econ 101 - StimHa" url="stimhack.com">,
    <Bookmark description="서인국, 탄탄 근육+ 태평양 어깨…어부바 부른다 : 네이" url="news.naver.com">]


Tags
''''

Suggest tags for a given URL:

.. code:: pycon

   >>> pb.posts.suggest(url="https://pinboard.in")
   [{u'popular': [u'pinboard']},
    {u'recommended': [u'bookmark',
      u'bookmarks',
      u'\uc815\ubcf4\ud1b5\uc2e0',
      u'pinboard',
      u'Unread',
      u'webservice']}]


Return all tags in your account along with the number of times they were used:

.. code:: pycon

   >>> pb.tags.get()
   [<Tag name="absurd" count=1>,
    <Tag name="accessibility" count=2>,
    <Tag name="accounting" count=3>,
    <Tag name="zen" count=1>,
    <Tag name="zsh" count=1>,
    <Tag name="zynga" count=1>]


Delete a tag:

.. code:: pycon

   >>> pb.tags.delete(tag="zynga")
   True


Rename a tag:

.. code:: pycon

   >>> pb.tags.rename(old='ppython', new='python')
   True


Miscellaneous
'''''''''''''

By default, pinboard.py will return parsed JSON objects. If you'd like the raw response object for a request, just pass in `parse_response=False`.

.. code:: pycon

   >>> response = pb.tags.get(parse_response=False)
   >>> response
   <addinfourl at 4396047680 whose fp = <socket._fileobject object at 0x105f79850>>
   >>> response.read()
   ... your tags ...


Pinboard.py maps 1-1 to the Pinboard API (e.g., pb.one.two.three() will send a request to "https://api.pinboard.in/v1/one/two/three"). For more information on other methods and usage, please read the `Pinboard API documentation <https://pinboard.in/api/>`_.

One more note--you might have noticed that there is no "title" attribute for bookmarks. This has been done since the Pinboard API calls titles "descriptions" and descriptions "extended" (and this was done to stay consistent with the Delicious API, way back in the day). In order to keep things minimally confusing, this library sticks to how Pinboard names these fields. Just remember--"description" means "title" and "extended" means "description".

Command Line
------------

In addition to providing full Python-level support for the Pinboard API, pinboard.py also comes bundled with a handy command-line utility called "pinboard". Just type "pinboard -h" for a full list of supported commands. To get started, type "pinboard login" and have your API token ready.

All of the commands pre-process and indent the JSON output. If you would like to shoot the raw response data to stdout, just pass "--raw" before the subcommand (e.g., "pinboard --raw bookmarks").

Examples:

.. code:: sh

   $ pinboard login
   Enter your Pinboard API token: username:XXXXX
   Saved Pinboard credentials to ~/.pinboardrc
   $ pinboard suggest-tags --url http://pymotw.com/2/argparse/
   [
       {
           "popular": [
               "python"
           ]
       },
       {
           "recommended": [
               "python",
               "argument",
               "parsing"
           ]
       }
   ]
   $ pinboard get --date 7-13-2014
   {
       "date": "2014-07-13T03:03:58Z",
       "posts": [
           {
               "extended": "",
               "hash": "e2311835eb0de6bff2595a9b1525bb98",
               "description": "Python 2.7.x and Python 3.x key differences",
               "tags": "python",
               "href": "http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html",
               "meta": "561d1f53791a8c50109393411f0301fc",
               "time": "2014-07-13T03:03:58Z",
               "shared": "yes",
               "toread": "no"
           },
           {
               "extended": "",
               "hash": "4abe28f70154bd35f84be73cec0c53ef",
               "description": "Miami, the great world city, is drowning while the powers that be look away | World news | The Observer",
               "tags": "",
               "href": "http://www.theguardian.com/world/2014/jul/11/miami-drowning-climate-change-deniers-sea-levels-rising",
               "meta": "2ca547789553ba9d3202a5cd3d367685",
               "time": "2014-07-13T02:53:54Z",
               "shared": "yes",
               "toread": "yes"
           }
       ],
       "user": "dlo"
   }
   $ pinboard --raw get --date 7/13/2014
   {"date":"2014-07-13T03:03:58Z","user":"dlo","posts":[{"href":"http:\/\/sebastianraschka.com\/Articles\/2014_python_2_3_key_diff.html","description":"Python 2.7.x and Python 3.x key differences","extended":"","meta":"561d1f53791a8c50109393411f0301fc","hash":"e2311835eb0de6bff2595a9b1525bb98","time":"2014-07-13T03:03:58Z","shared":"yes","toread":"no","tags":"python"},{"href":"http:\/\/www.theguardian.com\/world\/2014\/jul\/11\/miami-drowning-climate-change-deniers-sea-levels-rising","description":"Miami, the great world city, is drowning while the powers that be look away | World news | The Observer","extended":"","meta":"2ca547789553ba9d3202a5cd3d367685","hash":"4abe28f70154bd35f84be73cec0c53ef","time":"2014-07-13T02:53:54Z","shared":"yes","toread":"yes","tags":""}]}


You can print a full list of pinboard commands by passing the "-h" flag.

.. code:: sh

   $ pinboard -h
   usage: pinboard [-h] [--raw]

                   {login,last-update,add,delete,get,recent,dates,bookmarks,suggest-tags,tags,delete-tag,rename-tag,notes,note,rss-key,api-token}
                   ...

   positional arguments:
     {login,last-update,add,delete,get,recent,dates,bookmarks,suggest-tags,tags,delete-tag,rename-tag,notes,note,rss-key,api-token}
       add                 posts/add
       delete              posts/delete
       get                 posts/get
       recent              posts/recent
       dates               posts/dates
       bookmarks           posts/all
       suggest-tags        posts/suggest
       tags                tags/get
       delete-tag          tags/delete
       rename-tag          tags/rename
       notes               notes/list
       note                notes/ID
       rss-key             user/secret
       api-token           user/api_token

   optional arguments:
     -h, --help            show this help message and exit
     --raw                 Print the raw data from the Pinboard API without any
                           formatting.


...or help for a specific subcommand by passing the subcommand and then the "-h" flag.

.. code:: sh

   $ pinboard bookmarks -h
   usage: pinboard bookmarks [-h] [--from_date FROM_DATE] [--to_date TO_DATE]
                             [--tags TAGS [TAGS ...]] [--count COUNT]
                             [--offset OFFSET]

   optional arguments:
     -h, --help            show this help message and exit
     --from_date FROM_DATE
     --to_date TO_DATE
     --tags TAGS [TAGS ...]
     --count COUNT
     --offset OFFSET


Support
-------

If you like this library, you might want to check out `Pushpin for Pinboard <https://itunes.apple.com/us/app/pushpin-for-pinboard/id548052590?mt=8&amp;uo=4&amp;at=1l3vbEC>`_.

License
-------

.. image:: http://img.shields.io/pypi/l/pinboard.svg?style=flat
   :target: https://github.com/lionheart/pinboard.py/blob/master/LICENSE

Apache License, Version 2.0. See `LICENSE <https://github.com/lionheart/pinboard.py/blob/master/LICENSE>`_ for details.


            

Raw data

            {
    "maintainer": "", 
    "docs_url": "http://pythonhosted.org/pinboard/", 
    "requires_python": "", 
    "maintainer_email": "", 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": "pinboard", 
    "upload_time": "2017-08-12 23:35:10", 
    "author": "Dan Loewenherz", 
    "home_page": "http://github.com/lionheart/pinboard.py", 
    "github_user": "lionheart", 
    "download_url": "https://pypi.python.org/packages/cb/85/17ba3ce26a7cdeeba5deb5c8a6a5e4c90b9b2bcc761535361483cda5bcc8/pinboard-2.0.3.tar.gz", 
    "platform": "", 
    "version": "2.0.3", 
    "cheesecake_documentation_id": null, 
    "description": "Pinboard.py\n===========\n\n.. https://circleci.com/gh/lionheart/pinboard.py/tree/master.png?circle-token=d50700e1c75836063a7951f80ab1913cf6447acf\n\n|ci|_ |version|_\n\n.. |ci| image:: http://img.shields.io/travis/lionheart/pinboard.py.svg?style=flat\n.. _ci: https://travis-ci.org/lionheart/pinboard.py\n\n.. |version| image:: http://img.shields.io/pypi/v/pinboard.svg?style=flat\n.. _version: https://pypi.python.org/pypi/pinboard\n\nPinboard.py is an easy-to-use and fully-functional Python wrapper and `command-line utility <https://github.com/lionheart/pinboard.py#command-line>`_ for the Pinboard.in API.\n\nInstallation\n------------\n\nPinboard.py is available for download through the Python Package Index (PyPi). You can install it right away using pip or easy_install.\n\nIf you're using Python 3 or above:\n\n.. code:: bash\n\n   pip install \"pinboard>=2.0\"\n\nFor Python 2.7:\n\n.. code:: bash\n\n   pip install \"pinboard>=1.0,<2.0\"\n\nUsage\n-----\n\nTo get started, you're going to need to get your Pinboard API token from the `password page <https://pinboard.in/settings/password>`_ on the Pinboard website. Once you've got that, you're ready to go.\n\n.. code:: pycon\n\n   >>> import pinboard\n   >>> pb = pinboard.Pinboard(api_token)\n\nOnce you've done this, you can now use the `pb` object to make calls to the Pinboard API. Here are some examples:\n\nUpdate\n''''''\n\nReturns the most recent time a bookmark was added, updated or deleted.\n\n.. code:: pycon\n\n   >>> pb.posts.update()\n   datetime.datetime(2014, 7, 27, 18, 11, 29)\n\n\nPosts\n'''''\n\nAdd a bookmark:\n\n.. code:: pycon\n\n   >>> pb.posts.add(url=\"http://google.com/\", description=\"A Great Search Engine\", \\\n           extended=\"This is a description!\", tags=[\"search\", \"tools\"], shared=True, \\\n           toread=False)\n   True\n\n\nUpdate a bookmark:\n\n.. code:: pycon\n\n   # First, retrieve the bookmark you'd like to edit\n   >>> bookmark = pb.posts.get(url='http://google.com/')['posts'][0]\n   >>> bookmark\n   <Bookmark description=\"A Great Search Engine\" url=\"google.com\">\n\n   # You can now change description, extended, shared, toread, tags, or time directly with the bookmark object.\n   >>> bookmark.description = \"Google is pretty awesome\"\n   >>> bookmark.tags = [\"search\", \"searching\"]\n   >>> bookmark.save()\n   True\n\n   # If you want to update the bookmark creation date as well, you'll need to pass in `update_time=True` to the save method\n   >>> import datetime\n   >>> bookmark.time = datetime.datetime.now() - datetime.timedelta(days=5)\n   >>> bookmark.save(update_time=True)\n\n\nDelete a bookmark:\n\n.. code:: pycon\n\n   >>> pb.posts.delete(url=\"http://google.com/\")\n   True\n\n\nGet one or more posts on a single day matching the parameters:\n\n.. code:: pycon\n\n   >>> pb.posts.get(url=\"http://google.com/\")\n   {u'date': datetime.datetime(2014, 7, 25, 16, 35, 25),\n    u'posts': [<Bookmark description=\"A Great Search Engine\" url=\"google.com\">],\n    u'user': u'dlo'}\n\n   >>> import datetime\n   >>> pb.posts.get(dt=datetime.date.today())\n   {u'date': datetime.datetime(2014, 7, 25, 16, 35, 25),\n    u'posts': [<Bookmark description=\"A Great Search Engine\" url=\"google.com\">,\n     <Bookmark description=\"Smooth Scrolling | CSS-Tricks\" url=\"css-tricks.com\">,\n     <Bookmark description=\"Apple \"Frustrated\" that \"People Don't Want to Pay Anything\" on Mobile, Says 'The Banner Saga' Developer | Touch Arcade\" url=\"toucharcade.com\">],\n    u'user': u'dlo'}\n\n\nReturn all recent bookmarks (optionally filtering by tag):\n\n.. code:: pycon\n\n   >>> pb.posts.recent(tag=[\"programming\", \"python\"])\n   {u'date': datetime.datetime(2014, 4, 28, 2, 7, 58),\n    u'posts': [<Bookmark description=\"itunesfs 1.0.0.7 : Python Package Index\" url=\"pypi.python.org\">,\n     <Bookmark description=\"mincss \"Clears the junk out of your CSS\" - Peterbe.com\" url=\"www.peterbe.com\">,\n     <Bookmark description=\"Braintree Test Credit Card Account Numbers\" url=\"www.braintreepayments.com\">,\n     <Bookmark description=\"Valued Lessons: Monads in Python (with nice syntax!)\" url=\"www.valuedlessons.com\">,\n     <Bookmark description=\"Paste #EGY1XPQxQ2UPuT91SH83 at spacepaste\" url=\"bpaste.net\">,\n     <Bookmark description=\"40 Random Letters and Numbers\" url=\"gist.github.com\">,\n     <Bookmark description=\"PEP 3156 -- Asynchronous IO Support Rebooted\" url=\"www.python.org\">,\n     <Bookmark description=\"Brython\" url=\"www.brython.info\">,\n     <Bookmark description=\"Django REST framework\" url=\"django-rest-framework.org\">,\n     <Bookmark description=\"mypy - A New Python Variant with Dynamic and Static Typing\" url=\"www.mypy-lang.org\">,\n     <Bookmark description=\"Julython 2012\" url=\"www.julython.org\">,\n     <Bookmark description=\"Stripe Blog: Exploring Python Using GDB\" url=\"stripe.com\">,\n     <Bookmark description=\"Python FAQ: Descriptors - fuzzy notepad\" url=\"me.veekun.com\">,\n     <Bookmark description=\"A Guide to Python's Magic Methods \u00ab rafekettler.com\" url=\"www.rafekettler.com\">,\n     <Bookmark description=\"Melopy\" url=\"prezjordan.github.com\">,\n     <Bookmark description=\"litl/rauth\" url=\"github.com\">],\n    u'user': u'dlo'}\n\n\nReturn a list of dates with the number of posts at each date:\n\n.. code:: pycon\n\n   >>> pb.posts.dates(tag=[\"programming\", \"python\"])\n   {u'dates': {datetime.date(2008, 12, 5): 1,\n     datetime.date(2008, 12, 6): 1,\n     ...\n     datetime.date(2014, 7, 24): 6,\n     datetime.date(2014, 7, 25): 4},\n    u'tag': u'programming+python',\n    u'user': u'dlo'}\n\n\nGet all bookmarks in your account:\n\n.. code:: pycon\n\n   >>> pb.posts.all()\n   [<Bookmark description=\"Of Princesses and Dragons\" url=\"medium.com\">\n    <Bookmark description=\"A Great Search Engine\" url=\"google.com\">,\n    ...\n    <Bookmark description=\"Runner Econ 101 - StimHa\" url=\"stimhack.com\">,\n    <Bookmark description=\"\uc11c\uc778\uad6d, \ud0c4\ud0c4 \uadfc\uc721+ \ud0dc\ud3c9\uc591 \uc5b4\uae68\u2026\uc5b4\ubd80\ubc14 \ubd80\ub978\ub2e4 : \ub124\uc774\" url=\"news.naver.com\">]\n\n\nYou can also filter by tag, start, results, fromdt, or todt.\n\n.. code:: pycon\n\n   >>> import datetime\n   >>> five_days_ago = datetime.datetime.now() - datetime.timedelta(days=5)\n   >>> pb.posts.all(tag=[\"programming\"], start=10, results=100, fromdt=five_days_ago)\n   [<Bookmark description=\"Of Princesses and Dragons\" url=\"medium.com\">\n    <Bookmark description=\"A Great Search Engine\" url=\"google.com\">,\n    ...\n    <Bookmark description=\"Runner Econ 101 - StimHa\" url=\"stimhack.com\">,\n    <Bookmark description=\"\uc11c\uc778\uad6d, \ud0c4\ud0c4 \uadfc\uc721+ \ud0dc\ud3c9\uc591 \uc5b4\uae68\u2026\uc5b4\ubd80\ubc14 \ubd80\ub978\ub2e4 : \ub124\uc774\" url=\"news.naver.com\">]\n\n\nTags\n''''\n\nSuggest tags for a given URL:\n\n.. code:: pycon\n\n   >>> pb.posts.suggest(url=\"https://pinboard.in\")\n   [{u'popular': [u'pinboard']},\n    {u'recommended': [u'bookmark',\n      u'bookmarks',\n      u'\\uc815\\ubcf4\\ud1b5\\uc2e0',\n      u'pinboard',\n      u'Unread',\n      u'webservice']}]\n\n\nReturn all tags in your account along with the number of times they were used:\n\n.. code:: pycon\n\n   >>> pb.tags.get()\n   [<Tag name=\"absurd\" count=1>,\n    <Tag name=\"accessibility\" count=2>,\n    <Tag name=\"accounting\" count=3>,\n    <Tag name=\"zen\" count=1>,\n    <Tag name=\"zsh\" count=1>,\n    <Tag name=\"zynga\" count=1>]\n\n\nDelete a tag:\n\n.. code:: pycon\n\n   >>> pb.tags.delete(tag=\"zynga\")\n   True\n\n\nRename a tag:\n\n.. code:: pycon\n\n   >>> pb.tags.rename(old='ppython', new='python')\n   True\n\n\nMiscellaneous\n'''''''''''''\n\nBy default, pinboard.py will return parsed JSON objects. If you'd like the raw response object for a request, just pass in `parse_response=False`.\n\n.. code:: pycon\n\n   >>> response = pb.tags.get(parse_response=False)\n   >>> response\n   <addinfourl at 4396047680 whose fp = <socket._fileobject object at 0x105f79850>>\n   >>> response.read()\n   ... your tags ...\n\n\nPinboard.py maps 1-1 to the Pinboard API (e.g., pb.one.two.three() will send a request to \"https://api.pinboard.in/v1/one/two/three\"). For more information on other methods and usage, please read the `Pinboard API documentation <https://pinboard.in/api/>`_.\n\nOne more note--you might have noticed that there is no \"title\" attribute for bookmarks. This has been done since the Pinboard API calls titles \"descriptions\" and descriptions \"extended\" (and this was done to stay consistent with the Delicious API, way back in the day). In order to keep things minimally confusing, this library sticks to how Pinboard names these fields. Just remember--\"description\" means \"title\" and \"extended\" means \"description\".\n\nCommand Line\n------------\n\nIn addition to providing full Python-level support for the Pinboard API, pinboard.py also comes bundled with a handy command-line utility called \"pinboard\". Just type \"pinboard -h\" for a full list of supported commands. To get started, type \"pinboard login\" and have your API token ready.\n\nAll of the commands pre-process and indent the JSON output. If you would like to shoot the raw response data to stdout, just pass \"--raw\" before the subcommand (e.g., \"pinboard --raw bookmarks\").\n\nExamples:\n\n.. code:: sh\n\n   $ pinboard login\n   Enter your Pinboard API token: username:XXXXX\n   Saved Pinboard credentials to ~/.pinboardrc\n   $ pinboard suggest-tags --url http://pymotw.com/2/argparse/\n   [\n       {\n           \"popular\": [\n               \"python\"\n           ]\n       },\n       {\n           \"recommended\": [\n               \"python\",\n               \"argument\",\n               \"parsing\"\n           ]\n       }\n   ]\n   $ pinboard get --date 7-13-2014\n   {\n       \"date\": \"2014-07-13T03:03:58Z\",\n       \"posts\": [\n           {\n               \"extended\": \"\",\n               \"hash\": \"e2311835eb0de6bff2595a9b1525bb98\",\n               \"description\": \"Python 2.7.x and Python 3.x key differences\",\n               \"tags\": \"python\",\n               \"href\": \"http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html\",\n               \"meta\": \"561d1f53791a8c50109393411f0301fc\",\n               \"time\": \"2014-07-13T03:03:58Z\",\n               \"shared\": \"yes\",\n               \"toread\": \"no\"\n           },\n           {\n               \"extended\": \"\",\n               \"hash\": \"4abe28f70154bd35f84be73cec0c53ef\",\n               \"description\": \"Miami, the great world city, is drowning while the powers that be look away | World news | The Observer\",\n               \"tags\": \"\",\n               \"href\": \"http://www.theguardian.com/world/2014/jul/11/miami-drowning-climate-change-deniers-sea-levels-rising\",\n               \"meta\": \"2ca547789553ba9d3202a5cd3d367685\",\n               \"time\": \"2014-07-13T02:53:54Z\",\n               \"shared\": \"yes\",\n               \"toread\": \"yes\"\n           }\n       ],\n       \"user\": \"dlo\"\n   }\n   $ pinboard --raw get --date 7/13/2014\n   {\"date\":\"2014-07-13T03:03:58Z\",\"user\":\"dlo\",\"posts\":[{\"href\":\"http:\\/\\/sebastianraschka.com\\/Articles\\/2014_python_2_3_key_diff.html\",\"description\":\"Python 2.7.x and Python 3.x key differences\",\"extended\":\"\",\"meta\":\"561d1f53791a8c50109393411f0301fc\",\"hash\":\"e2311835eb0de6bff2595a9b1525bb98\",\"time\":\"2014-07-13T03:03:58Z\",\"shared\":\"yes\",\"toread\":\"no\",\"tags\":\"python\"},{\"href\":\"http:\\/\\/www.theguardian.com\\/world\\/2014\\/jul\\/11\\/miami-drowning-climate-change-deniers-sea-levels-rising\",\"description\":\"Miami, the great world city, is drowning while the powers that be look away | World news | The Observer\",\"extended\":\"\",\"meta\":\"2ca547789553ba9d3202a5cd3d367685\",\"hash\":\"4abe28f70154bd35f84be73cec0c53ef\",\"time\":\"2014-07-13T02:53:54Z\",\"shared\":\"yes\",\"toread\":\"yes\",\"tags\":\"\"}]}\n\n\nYou can print a full list of pinboard commands by passing the \"-h\" flag.\n\n.. code:: sh\n\n   $ pinboard -h\n   usage: pinboard [-h] [--raw]\n\n                   {login,last-update,add,delete,get,recent,dates,bookmarks,suggest-tags,tags,delete-tag,rename-tag,notes,note,rss-key,api-token}\n                   ...\n\n   positional arguments:\n     {login,last-update,add,delete,get,recent,dates,bookmarks,suggest-tags,tags,delete-tag,rename-tag,notes,note,rss-key,api-token}\n       add                 posts/add\n       delete              posts/delete\n       get                 posts/get\n       recent              posts/recent\n       dates               posts/dates\n       bookmarks           posts/all\n       suggest-tags        posts/suggest\n       tags                tags/get\n       delete-tag          tags/delete\n       rename-tag          tags/rename\n       notes               notes/list\n       note                notes/ID\n       rss-key             user/secret\n       api-token           user/api_token\n\n   optional arguments:\n     -h, --help            show this help message and exit\n     --raw                 Print the raw data from the Pinboard API without any\n                           formatting.\n\n\n...or help for a specific subcommand by passing the subcommand and then the \"-h\" flag.\n\n.. code:: sh\n\n   $ pinboard bookmarks -h\n   usage: pinboard bookmarks [-h] [--from_date FROM_DATE] [--to_date TO_DATE]\n                             [--tags TAGS [TAGS ...]] [--count COUNT]\n                             [--offset OFFSET]\n\n   optional arguments:\n     -h, --help            show this help message and exit\n     --from_date FROM_DATE\n     --to_date TO_DATE\n     --tags TAGS [TAGS ...]\n     --count COUNT\n     --offset OFFSET\n\n\nSupport\n-------\n\nIf you like this library, you might want to check out `Pushpin for Pinboard <https://itunes.apple.com/us/app/pushpin-for-pinboard/id548052590?mt=8&amp;uo=4&amp;at=1l3vbEC>`_.\n\nLicense\n-------\n\n.. image:: http://img.shields.io/pypi/l/pinboard.svg?style=flat\n   :target: https://github.com/lionheart/pinboard.py/blob/master/LICENSE\n\nApache License, Version 2.0. See `LICENSE <https://github.com/lionheart/pinboard.py/blob/master/LICENSE>`_ for details.\n\n", 
    "lcname": "pinboard", 
    "bugtrack_url": "http://github.com/lionheart/pinboard.py/issues", 
    "github": true, 
    "coveralls": false, 
    "name": "pinboard", 
    "license": "Apache 2.0", 
    "travis_ci": true, 
    "github_project": "pinboard.py", 
    "summary": "A Python wrapper for Pinboard.in", 
    "split_keywords": [
        "pinboard"
    ], 
    "author_email": "dan@lionheartsw.com", 
    "urls": [
        {
            "has_sig": true, 
            "upload_time": "2017-08-12T23:35:10", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/cb/85/17ba3ce26a7cdeeba5deb5c8a6a5e4c90b9b2bcc761535361483cda5bcc8/pinboard-2.0.3.tar.gz", 
            "md5_digest": "a3a3f6178672a4e838f66b890db15345", 
            "downloads": 0, 
            "filename": "pinboard-2.0.3.tar.gz", 
            "packagetype": "sdist", 
            "path": "cb/85/17ba3ce26a7cdeeba5deb5c8a6a5e4c90b9b2bcc761535361483cda5bcc8/pinboard-2.0.3.tar.gz", 
            "size": 12562
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}