Skip to main content

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

Metadata

Release files for pbwrap 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pbwrap 1.5.0
File Size Uploaded
pbwrap-1.5.0.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pbwrap 1.5.0
File Interpreter ABI Platform
pbwrap-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / pbwrap-1.5.0.tar.gz

Download URL pbwrap-1.5.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d1a15b1f9be8b6799a7cbc586489008ab8ffbd1e158e157f5ed2a31ee4fb412e
BLAKE2b-256 checksum
How to use checksums
ed66c16ec04503d8863f17dd47b97c30f2cad6f827c1fd79ccbb0fa208d7074f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.2 Linux/6.6.75-2-MANJARO

Release files / pbwrap-1.5.0-py3-none-any.whl

Download URL pbwrap-1.5.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a8eaa85270be343b6edc4601f0390e903e7cfcfb068780831b4206a7a65c261
BLAKE2b-256 checksum
How to use checksums
e1c8b9b6cdb5dc3fe543987201756161dec8b1767c97d49985cb63321eac5636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.2 Linux/6.6.75-2-MANJARO

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

1 release file

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page