Breaking Code

March 6, 2010

Quickpost: Using the Pastebin.com API with Python

Filed under: Tools, Web applications — Tags: , , , , , — Mario Vilas @ 11:59 pm

Hello everyone. Today we have a quick script I just coded to access the Pastebin.com API from Python. It can be imported like a module or run as a command line script, and the interface is really simple (just one function!). The command line interface allows you to upload files. Enjoy! :)

Edit: Also see this post on how to use this script to send files anonymously to Pastebin.

Updated 28-Jun-2011: small changes made
Updated 27-Jan-2012: fixed bug in paste_expire_date, added Epydoc documentation
Updated 28-Jan-2012: removed paste_subdomain, feature seems to have been deprecated
Updated 3-Jun-2013: the API this script was using has been deprecated, and the new one requires credentials to be used. :(

Download


pastebin.py

The API this script was using has been deprecated, and the new one requires credentials to be used. :(

Source code

(more…)

The Silver is the New Black Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 2,481 other followers