Skip to main content

A Pastebin API Wrapper for Python

Project description

Pastebin API wrapper for Python (pbwrap)

PyPI version Build Status Coverage Status

**Python API wrapper for the Pastebin Public API.
Only Python 3 supported!

Documentation

This wrapper is based on Pastebin API read their Documentation here.
for extra information and usage guide.

Usage

For a full list of the methods offered by the package Read.

Quickstart

Import and instantiate a Pastebin Object.

from pbwrap import Pastebin

pastebin = Pastebin(api_dev_key)

Examples

Get User Id

Returns a string with the user_id created after authentication.

user_id = pastebin.authenticate(username, password)
Get Trending Pastes details

Returns a list containing Paste objects of the top 18 trending Pastes.

trending_pastes = pastebin.get_trending()

Type models

Paste

Some API endpoints return paste data in xml format the wrapper either converts them in a python dictionary format
or returns them as Paste objects which contain the following fields:

  • key
  • date in UNIXTIME
  • title
  • size
  • expire_date
  • private
  • format_short
  • format_long
  • url
  • hits

License

pbwrap is released under MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pbwrap, version 1.2.2
Filename, size File type Python version Upload date Hashes
Filename, size pbwrap-1.2.2-py3-none-any.whl (8.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pbwrap-1.2.2.tar.gz (7.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page