{ "info": { "author": "Tumblr", "author_email": "accounts@tumblr.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "\nPyTumblr\n========\n|Build Status|\n\nInstallation\n============\n\nInstall via pip:\n\n.. code-block:: bash\n\n $ pip install pytumblr\n\nInstall from source:\n\n.. code-block:: bash\n\n $ git clone https://github.com/tumblr/pytumblr.git\n $ cd pytumblr\n $ python setup.py install\n\nUsage\n=====\n\nCreate a client\n---------------\n\nA ``pytumblr.TumblrRestClient`` is the object you'll make all of your calls to the Tumblr API through. Creating one is this easy:\n\n.. code:: python\n\n client = pytumblr.TumblrRestClient(\n '',\n '',\n '',\n '',\n )\n\n client.info() # Grabs the current user information\n\nTwo easy ways to get your credentials to are:\n\n1. The built-in ``interactive_console.py`` tool (if you already have a consumer key & secret)\n2. The Tumblr API console at https://api.tumblr.com/console\n3. Get sample login code at https://api.tumblr.com/console/calls/user/info\n\nSupported Methods\n-----------------\n\nUser Methods\n~~~~~~~~~~~~\n\n.. code:: python\n\n client.info() # get information about the authenticating user\n client.dashboard() # get the dashboard for the authenticating user\n client.likes() # get the likes for the authenticating user\n client.following() # get the blogs followed by the authenticating user\n\n client.follow('codingjester.tumblr.com') # follow a blog\n client.unfollow('codingjester.tumblr.com') # unfollow a blog\n\n client.like(id, reblogkey) # like a post\n client.unlike(id, reblogkey) # unlike a post\n\nBlog Methods\n~~~~~~~~~~~~\n\n.. code:: python\n\n client.blog_info(blogName) # get information about a blog\n client.posts(blogName, **params) # get posts for a blog\n client.avatar(blogName) # get the avatar for a blog\n client.blog_likes(blogName) # get the likes on a blog\n client.followers(blogName) # get the followers of a blog\n client.blog_following(blogName) # get the publicly exposed blogs that [blogName] follows\n client.queue(blogName) # get the queue for a given blog\n client.submission(blogName) # get the submissions for a given blog\n\nPost Methods\n~~~~~~~~~~~~\n\nCreating posts\n^^^^^^^^^^^^^^\n\nPyTumblr lets you create all of the various types that Tumblr supports. When using these types there are a few defaults that are able to be used with any post type.\n\nThe default supported types are described below.\n\n- **state** - a string, the state of the post. Supported types are *published*, *draft*, *queue*, *private*\n- **tags** - a list, a list of strings that you want tagged on the post. eg: [\"testing\", \"magic\", \"1\"]\n- **tweet** - a string, the string of the customized tweet you want. eg: \"Man I love my mega awesome post!\"\n- **date** - a string, the customized GMT that you want\n- **format** - a string, the format that your post is in. Support types are *html* or *markdown*\n- **slug** - a string, the slug for the url of the post you want\n\nWe'll show examples throughout of these default examples while showcasing all the specific post types.\n\nCreating a photo post\n'''''''''''''''''''''\n\nCreating a photo post supports a bunch of different options plus the described default options \\* **caption** - a string, the user supplied caption \\* **link** - a string, the \"click-through\" url for the photo \\* **source** - a string, the url for the photo you want to use (use this or the data parameter) \\* **data** - a list or string, a list of filepaths or a single file path for multipart file upload\n\n.. code:: python\n\n #Creates a photo post using a source URL\n client.create_photo(blogName, state=\"published\", tags=[\"testing\", \"ok\"],\n source=\"https://68.media.tumblr.com/b965fbb2e501610a29d80ffb6fb3e1ad/tumblr_n55vdeTse11rn1906o1_500.jpg\")\n\n #Creates a photo post using a local filepath\n client.create_photo(blogName, state=\"queue\", tags=[\"testing\", \"ok\"],\n tweet=\"Woah this is an incredible sweet post [URL]\",\n data=\"/Users/johnb/path/to/my/image.jpg\")\n\n #Creates a photoset post using several local filepaths\n client.create_photo(blogName, state=\"draft\", tags=[\"jb is cool\"], format=\"markdown\",\n data=[\"/Users/johnb/path/to/my/image.jpg\", \"/Users/johnb/Pictures/kittens.jpg\"],\n caption=\"## Mega sweet kittens\")\n\nCreating a text post\n''''''''''''''''''''\n\nCreating a text post supports the same options as default and just a two other parameters \\* **title** - a string, the optional title for the post. Supports markdown or html \\* **body** - a string, the body of the of the post. Supports markdown or html\n\n.. code:: python\n\n #Creating a text post\n client.create_text(blogName, state=\"published\", slug=\"testing-text-posts\", title=\"Testing\", body=\"testing1 2 3 4\")\n\nCreating a quote post\n'''''''''''''''''''''\n\nCreating a quote post supports the same options as default and two other parameter \\* **quote** - a string, the full text of the qote. Supports markdown or html \\* **source** - a string, the cited source. HTML supported\n\n.. code:: python\n\n #Creating a quote post\n client.create_quote(blogName, state=\"queue\", quote=\"I am the Walrus\", source=\"Ringo\")\n\nCreating a link post\n''''''''''''''''''''\n\n- **title** - a string, the title of post that you want. Supports HTML entities.\n- **url** - a string, the url that you want to create a link post for.\n- **description** - a string, the desciption of the link that you have\n\n.. code:: python\n\n #Create a link post\n client.create_link(blogName, title=\"I like to search things, you should too.\", url=\"https://duckduckgo.com\",\n description=\"Search is pretty cool when a duck does it.\")\n\nCreating a chat post\n''''''''''''''''''''\n\nCreating a chat post supports the same options as default and two other parameters \\* **title** - a string, the title of the chat post \\* **conversation** - a string, the text of the conversation/chat, with diablog labels (no html)\n\n.. code:: python\n\n #Create a chat post\n chat = \"\"\"John: Testing can be fun!\n Renee: Testing is tedious and so are you.\n John: Aw.\n \"\"\"\n client.create_chat(blogName, title=\"Renee just doesn't understand.\", conversation=chat, tags=[\"renee\", \"testing\"])\n\nCreating an audio post\n''''''''''''''''''''''\n\nCreating an audio post allows for all default options and a has 3 other parameters. The only thing to keep in mind while dealing with audio posts is to make sure that you use the external\\_url parameter or data. You cannot use both at the same time. \\* **caption** - a string, the caption for your post \\* **external\\_url** - a string, the url of the site that hosts the audio file \\* **data** - a string, the filepath of the audio file you want to upload to Tumblr\n\n.. code:: python\n\n #Creating an audio file\n client.create_audio(blogName, caption=\"Rock out.\", data=\"/Users/johnb/Music/my/new/sweet/album.mp3\")\n\n #lets use soundcloud!\n client.create_audio(blogName, caption=\"Mega rock out.\", external_url=\"https://soundcloud.com/skrillex/sets/recess\")\n\nCreating a video post\n'''''''''''''''''''''\n\nCreating a video post allows for all default options and has three other options. Like the other post types, it has some restrictions. You cannot use the embed and data parameters at the same time. \\* **caption** - a string, the caption for your post \\* **embed** - a string, the HTML embed code for the video \\* **data** - a string, the path of the file you want to upload\n\n.. code:: python\n\n #Creating an upload from YouTube\n client.create_video(blogName, caption=\"Jon Snow. Mega ridiculous sword.\",\n embed=\"http://www.youtube.com/watch?v=40pUYLacrj4\")\n\n #Creating a video post from local file\n client.create_video(blogName, caption=\"testing\", data=\"/Users/johnb/testing/ok/blah.mov\")\n\nEditing a post\n^^^^^^^^^^^^^^\n\nUpdating a post requires you knowing what type a post you're updating. You'll be able to supply to the post any of the options given above for updates.\n\n.. code:: python\n\n client.edit_post(blogName, id=post_id, type=\"text\", title=\"Updated\")\n client.edit_post(blogName, id=post_id, type=\"photo\", data=\"/Users/johnb/mega/awesome.jpg\")\n\nReblogging a Post\n^^^^^^^^^^^^^^^^^\n\nReblogging a post just requires knowing the post id and the reblog key, which is supplied in the JSON of any post object.\n\n.. code:: python\n\n client.reblog(blogName, id=125356, reblog_key=\"reblog_key\")\n\nDeleting a post\n^^^^^^^^^^^^^^^\n\nDeleting just requires that you own the post and have the post id\n\n.. code:: python\n\n client.delete_post(blogName, 123456) # Deletes your post :(\n\nA note on tags: When passing tags, as params, please pass them as a list (not a comma-separated string):\n\n.. code:: python\n\n client.create_text(blogName, tags=['hello', 'world'], ...)\n\nGetting notes for a post\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nIn order to get the notes for a post, you need to have the post id and the blog that it is on.\n\n.. code:: python\n\n data = client.notes(blogName, id='123456')\n\nThe results include a timestamp you can use to make future calls.\n\n.. code:: python\n\n data = client.notes(blogName, id='123456', before_timestamp=data[\"_links\"][\"next\"][\"query_params\"][\"before_timestamp\"])\n\n\nTagged Methods\n~~~~~~~~~~~~~~\n\n.. code:: python\n\n # get posts with a given tag\n client.tagged(tag, **params)\n\nUsing the interactive console\n-----------------------------\n\nThis client comes with a nice interactive console to run you through the OAuth process, grab your tokens (and store them for future use).\n\nYou'll need ``pyyaml`` installed to run it, but then it's just:\n\n.. code:: bash\n\n $ python interactive-console.py\n\nand away you go! Tokens are stored in ``~/.tumblr`` and are also shared by other Tumblr API clients like the Ruby client.\n\nRunning tests\n-------------\n\nThe tests (and coverage reports) are run with nose, like this:\n\n.. code:: bash\n\n python setup.py test\n\nCopyright and license\n=====================\n\nCopyright 2013 Tumblr, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations.\n\n.. |Build Status| image:: https://travis-ci.org/tumblr/pytumblr.png?branch=master\n :target: https://travis-ci.org/tumblr/pytumblr\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/tumblr/pytumblr/archive/0.1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tumblr/pytumblr", "keywords": "pytumblr", "license": "Apache Software License 2.0", "maintainer": "", "maintainer_email": "", "name": "PyTumblr", "package_url": "https://pypi.org/project/PyTumblr/", "platform": "", "project_url": "https://pypi.org/project/PyTumblr/", "project_urls": { "Download": "https://github.com/tumblr/pytumblr/archive/0.1.0.tar.gz", "Homepage": "https://github.com/tumblr/pytumblr" }, "release_url": "https://pypi.org/project/PyTumblr/0.1.0/", "requires_dist": [ "future", "requests-oauthlib" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "A Python API v2 wrapper for Tumblr", "version": "0.1.0" }, "last_serial": 5519642, "releases": { "0.0.5": [ { "comment_text": "", "digests": { "md5": "d4177cc640bf86d6bab8db04cc644a4b", "sha256": "2aa2451ecfbf8a5b856b11d0cb8a4ad3f2775634ad80757f7219e3290e591543" }, "downloads": -1, "filename": "PyTumblr-0.0.5-py2.7.egg", "has_sig": false, "md5_digest": "d4177cc640bf86d6bab8db04cc644a4b", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 15657, "upload_time": "2013-07-15T02:23:06", "url": "https://files.pythonhosted.org/packages/e8/4d/958a97aec3a5fe28e5687c54f9eb6735282304e9d0430c100110199a01e9/PyTumblr-0.0.5-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "54c691538637a3f85f1968deeb7c04bd", "sha256": "848e73b7803c9ab4f337a3a24d42667bce2aa71d693788d2c37511eea3059639" }, "downloads": -1, "filename": "PyTumblr-0.0.5.tar.gz", "has_sig": false, "md5_digest": "54c691538637a3f85f1968deeb7c04bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6251, "upload_time": "2013-07-15T02:23:18", "url": "https://files.pythonhosted.org/packages/06/90/cef22001637e4d4248f5dbc7770d8edb16dfd4eab24595423fc0447c7458/PyTumblr-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "a2e028582b492317e34895f7bb2c5e4e", "sha256": "a58c8b6026d2522f1c935a0978f3d605ed1bf44dd533e68284d6ea7cb247c32f" }, "downloads": -1, "filename": "PyTumblr-0.0.6.tar.gz", "has_sig": false, "md5_digest": "a2e028582b492317e34895f7bb2c5e4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6734, "upload_time": "2014-09-02T20:54:45", "url": "https://files.pythonhosted.org/packages/9e/81/e4d64a1ea1af6674b344947da1f9a6fb05dd5578dca99ef4967be5eeed54/PyTumblr-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "1dc77bfac956c483eb2bd8339186a8da", "sha256": "23c6b3854039e00912809f02b63eb8f46801551e7f941056529f7cad0898e866" }, "downloads": -1, "filename": "PyTumblr-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1dc77bfac956c483eb2bd8339186a8da", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15014, "upload_time": "2017-10-14T17:08:36", "url": "https://files.pythonhosted.org/packages/1c/59/88361fb1ba926a15b594dbf0f2a45816e6cdf9a10a4a1935b369cb19d1bb/PyTumblr-0.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5d619c2a1d91d8f5c6478698a6841de", "sha256": "d56a55b39708971f5d70e443df833c9ebe89f3dfe19b0d7b25b0e30a82d79303" }, "downloads": -1, "filename": "PyTumblr-0.0.7.tar.gz", "has_sig": false, "md5_digest": "e5d619c2a1d91d8f5c6478698a6841de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14375, "upload_time": "2017-10-14T17:08:37", "url": "https://files.pythonhosted.org/packages/51/b8/4bc4fe945f4738c9c59a2bdb388eade050253d66ca41600e5a877e1a27f1/PyTumblr-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "6cd48758f49fcd8a2fbf127187a06094", "sha256": "ce0ba73f27237d1ef7374950b46bb8c4b13d68e6529f733ebc63799c4607ffec" }, "downloads": -1, "filename": "PyTumblr-0.0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6cd48758f49fcd8a2fbf127187a06094", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10731, "upload_time": "2018-07-03T18:25:04", "url": "https://files.pythonhosted.org/packages/d3/9f/d400e19b827609d7997825c7dc421ed1f6f0fa30060066e8090aad0f54b0/PyTumblr-0.0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "676fd81bcb77dbcf72deaffa5fef7ada", "sha256": "d7496f966c0b42e8d8598c60b01a089d89670deb1f80d6b557168d706a428712" }, "downloads": -1, "filename": "PyTumblr-0.0.8.tar.gz", "has_sig": false, "md5_digest": "676fd81bcb77dbcf72deaffa5fef7ada", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13647, "upload_time": "2018-07-03T18:25:05", "url": "https://files.pythonhosted.org/packages/1b/dc/9dd5068eae25c0a064ff8e53c9a8285d7fbe7e7fb3e646495737d5d30841/PyTumblr-0.0.8.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "9a8371c9f8daa40a7de2c231dd034fb3", "sha256": "a3774d3978bcff2db98f36a2e5d17bb8496ac21157b1b518089adad86d0dca72" }, "downloads": -1, "filename": "PyTumblr-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9a8371c9f8daa40a7de2c231dd034fb3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 15307, "upload_time": "2019-07-11T19:11:35", "url": "https://files.pythonhosted.org/packages/f9/8b/72c7d5abaf3e98c28ad318175e2a4da19436549c284ce8bcfd67ec6e043a/PyTumblr-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aaf8752a1203e54f8c41aee0716de1d2", "sha256": "eaa4d98217df7ab6392fa5d8801f4a2bdcba35bf0fd49328aa3c98e3b231b6f2" }, "downloads": -1, "filename": "PyTumblr-0.1.0.tar.gz", "has_sig": false, "md5_digest": "aaf8752a1203e54f8c41aee0716de1d2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 11709, "upload_time": "2019-07-11T19:11:37", "url": "https://files.pythonhosted.org/packages/2d/b7/7968c96d81309b9fee31012d0d76da4e00e9d5f75445c6acb182a1da7fd4/PyTumblr-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9a8371c9f8daa40a7de2c231dd034fb3", "sha256": "a3774d3978bcff2db98f36a2e5d17bb8496ac21157b1b518089adad86d0dca72" }, "downloads": -1, "filename": "PyTumblr-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9a8371c9f8daa40a7de2c231dd034fb3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 15307, "upload_time": "2019-07-11T19:11:35", "url": "https://files.pythonhosted.org/packages/f9/8b/72c7d5abaf3e98c28ad318175e2a4da19436549c284ce8bcfd67ec6e043a/PyTumblr-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aaf8752a1203e54f8c41aee0716de1d2", "sha256": "eaa4d98217df7ab6392fa5d8801f4a2bdcba35bf0fd49328aa3c98e3b231b6f2" }, "downloads": -1, "filename": "PyTumblr-0.1.0.tar.gz", "has_sig": false, "md5_digest": "aaf8752a1203e54f8c41aee0716de1d2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 11709, "upload_time": "2019-07-11T19:11:37", "url": "https://files.pythonhosted.org/packages/2d/b7/7968c96d81309b9fee31012d0d76da4e00e9d5f75445c6acb182a1da7fd4/PyTumblr-0.1.0.tar.gz" } ] }