A Pastebin API Wrapper for Python
Project description
# Pastebin API wrapper for Python (pbwrap)
[![PyPI version](https://badge.fury.io/py/pbwrap.svg)](https://badge.fury.io/py/pbwrap)
[![Build Status](https://travis-ci.org/Mikts/pbwrap.svg?branch=master)](https://travis-ci.org/Mikts/pbwrap)
[![Coverage Status](https://coveralls.io/repos/github/Mikts/pbwrap/badge.svg)](https://coveralls.io/github/Mikts/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.**](https://pastebin.com/api)
for extra information and usage guide.
### Usage
For a full list of the methods offered by the package [**Read.**](http://pbwrap.readthedocs.io/en/latest/)
#### Quickstart
Import and instantiate a Pastebin Object.
```Python
from pbwrap import Pastebin
pastebin = Pastebin(api_dev_key)
```
### Examples
##### Get User Id
Returns a string with the user_id created after authentication.
```Python
user_id = pastebin.authenticate(username, password)
```
##### Get Trending Pastes details
Returns a list containing Paste objects of the top 18 trending Pastes.
```Python
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**](./LICENSE)
[![PyPI version](https://badge.fury.io/py/pbwrap.svg)](https://badge.fury.io/py/pbwrap)
[![Build Status](https://travis-ci.org/Mikts/pbwrap.svg?branch=master)](https://travis-ci.org/Mikts/pbwrap)
[![Coverage Status](https://coveralls.io/repos/github/Mikts/pbwrap/badge.svg)](https://coveralls.io/github/Mikts/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.**](https://pastebin.com/api)
for extra information and usage guide.
### Usage
For a full list of the methods offered by the package [**Read.**](http://pbwrap.readthedocs.io/en/latest/)
#### Quickstart
Import and instantiate a Pastebin Object.
```Python
from pbwrap import Pastebin
pastebin = Pastebin(api_dev_key)
```
### Examples
##### Get User Id
Returns a string with the user_id created after authentication.
```Python
user_id = pastebin.authenticate(username, password)
```
##### Get Trending Pastes details
Returns a list containing Paste objects of the top 18 trending Pastes.
```Python
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**](./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
pbwrap-1.0.6-py3-none-any.whl
(6.1 kB
view hashes)
Close
Hashes for pbwrap-1.0.6.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e47e641324c71b7a469489bc95808169d51f728e0ae3077d6959a70e1ab29c5b |
|
MD5 | c58a3daa0e89977c85a24240e398aa8a |
|
BLAKE2b-256 | 430cae10686746de135363b86626236cf416e221dd0345ac13f5ea16e4efcba5 |