Skip to content

ChasL/pb_wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PB_WRAPPER

A simple Pastebin API wrapper written in Python 3.4

Code examples:

Create paste with no additional arguments:

from pb_api import PasteAPI

pb = PasteAPI('devkey', 'userkey') # userkey optional
pb.create_paste('Paste content')

Create paste with a title, formatted for python, Private, and expiring in 1 hour: (see pb_lists.py for valid arguments for format, privacy, and expire)

from pb_api import PasteAPI

pb = PasteAPI('devkey', 'userkey') # userkey optional
pb.create_paste('Paste content', title='Paste Title', format='python', privacy='2', expire='1H')

List pastes made by the user:

from pb_api import PasteAPI

pb = PasteAPI('devkey', 'userkey') # userkey mandatory for list_user_pastes()
pb.list_user_pastes(limit=10) # limit argument optional. defaults to 50

Requirements

The only requirement is the requests package

pip3 install requests

About

A simple Pastebin API wrapper written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages