A simple Python wrapper for the paste.dev
pip install pypasteee
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>')