Skip to content

m4kyu/pypasteee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pypasteee

A simple Python wrapper for the paste.dev

Instalation

pip install pypasteee

Usage

Initialization

from pypasteee import Pasteee, Paste, Section

api = Pasteee(API_TOKEN)

Get a list of your pastes

...
pastes = api.getPastesList()
for i in pastes:
    print(f'ID: {i.id}. Description: {i.description}. Views: {i.views}. Created at: {i.created_at}')

Get paste info

...
pastes = api.getPaste('<id>')

Create a new paste

...

new_paste = Paste(description='First paste from pypasteee', encrypted=False, sections=[Section(syntax="autodetect", name='Section1', content='Feels great')]) 
api.paste(new_paste)

Delete paste

...
api.deletePaste('<id>')

About

A simple API wrapper for paste.ee

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages