Skip to main content

A complete pastebin.com API wrapper for Python

Project description

PastebinPython

A complete http://pastebin.com API wrapper for Python

Sample Usage

"""
Creating paste from file...

"""
from pastebin_python import PastebinPython
from pastebin_python.pastebin_exceptions import PastebinBadRequestException, PastebinNoPastesException, PastebinFileException
from pastebin_python.pastebin_constants import PASTE_PUBLIC, EXPIRE_10_MIN
from pastebin_python.pastebin_formats import FORMAT_NONE, FORMAT_PYTHON, FORMAT_HTML

pbin = PastebinPython(api_dev_key='<unique api key>')

try:
        pbin.createAPIUserKey('<username>','<password>')
        print pbin.createPasteFromFile('/home/six519/Downloads/email.html', 'Email format testing 2...', FORMAT_HTML, PASTE_PUBLIC, EXPIRE_10_MIN)
except PastebinBadRequestException as e:
        print e
except PastebinFileException as e:
        print e

Code Documentation

You can read the documentation at: http://pythonhosted.org/pastebin_python/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pastebin_python-1.2.tar.gz (7.3 kB view details)

Uploaded Source

File details

Details for the file pastebin_python-1.2.tar.gz.

File metadata

File hashes

Hashes for pastebin_python-1.2.tar.gz
Algorithm Hash digest
SHA256 7b045179222339c3b1e97a867ec22468a1f2fde87149ce6ad0eeae0c4c734a78
MD5 c92abcc523fe56367cf9ad77236471fd
BLAKE2b-256 5b56c300cbc96f71685917404c2d3203b2f166b3c8f975ba92a9f1fd62488f71

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page