A Pastebin API Wrapper for Python
Project description
Pastebin API wrapper for Python (pbwrap)
**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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pbwrap-1.4.0.tar.gz
.
File metadata
- Download URL: pbwrap-1.4.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8100153fd2ca1e366a912c579ba28f320e36908fc85e8f2678789a9be5027172 |
|
MD5 | bc6ecda08fd9a16f5ad1b33111fae53b |
|
BLAKE2b-256 | c997c7103dce726ba7ac23e52af70bbf9f56d743499d1eea975c581f700b43b4 |
File details
Details for the file pbwrap-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: pbwrap-1.4.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ed1408b9dbd996c2cc600d4f7ad5c8960d9e9707e52285a59902f358b3903f4 |
|
MD5 | d745ef78e521e18467c15680dddfbc3b |
|
BLAKE2b-256 | 6be6e47207134607ce27c6c91027812df0552aef9372690a395f3517c3a9d85c |