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.

Source Distribution

pbwrap-1.5.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

pbwrap-1.5.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file pbwrap-1.5.0.tar.gz.

File metadata

  • Download URL: pbwrap-1.5.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.2 Linux/6.6.75-2-MANJARO

File hashes

Hashes for pbwrap-1.5.0.tar.gz
Algorithm Hash digest
SHA256 d1a15b1f9be8b6799a7cbc586489008ab8ffbd1e158e157f5ed2a31ee4fb412e
MD5 1cb007894f356c32db651e343eb0148b
BLAKE2b-256 ed66c16ec04503d8863f17dd47b97c30f2cad6f827c1fd79ccbb0fa208d7074f

See more details on using hashes here.

File details

Details for the file pbwrap-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: pbwrap-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.2 Linux/6.6.75-2-MANJARO

File hashes

Hashes for pbwrap-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a8eaa85270be343b6edc4601f0390e903e7cfcfb068780831b4206a7a65c261
MD5 743645ddaa40dca6bce4052b6becbe9b
BLAKE2b-256 e1c8b9b6cdb5dc3fe543987201756161dec8b1767c97d49985cb63321eac5636

See more details on using hashes here.

Supported by

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