Skip to main content

A simple API wrapper for paste.ee

Project description

pypasteee

A simple Python wrapper for the paste.ee

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>')

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

pypasteee-0.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypasteee-0.0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pypasteee-0.0.1.tar.gz.

File metadata

  • Download URL: pypasteee-0.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pypasteee-0.0.1.tar.gz
Algorithm Hash digest
SHA256 386e5fb025ba178969fd14f32d5846f4c55588bb1d9119dc090c6f47a2d3584a
MD5 820b58be1e18606c1338e375dadb905a
BLAKE2b-256 0ee2ad356cdfc848a05d1ed627e03f246c0feb8f2ae273335759ae66a56671be

See more details on using hashes here.

File details

Details for the file pypasteee-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pypasteee-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pypasteee-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0aacb47a5e842e16ecba3a24a9a18a9bd5656f28977877ef1c3c519741cf383d
MD5 396b20b311f59b9b9c78bdbd96b7856a
BLAKE2b-256 6fb7e4c65c33bf13e176a232ad6d0fce446c738d28dc86edfa50f103e592f330

See more details on using hashes here.

Supported by

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