Skip to content

A complete pastebin.com API wrapper for Python

Notifications You must be signed in to change notification settings

FurCode/PastebinPython

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.message
except PastebinFileException as e:
        print e.message

Code Documentation

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

About

A complete pastebin.com API wrapper for Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 49.5%
  • Python 29.8%
  • CSS 15.4%
  • Makefile 5.3%