A Python solution to creating pastes as a guest, listing new public pastes and more
Project description
MyPasteBot
A simple https://pastebin.com Python package to create guest pastes, find new public pastes and more!
prerequisites
requests==2.22.0
Installation
python -m pip install mypastebot
Methods
Create a New Guest Paste
from mypastebot import Create
token = Create.getToken()
paste = Create.makePaste(text='This is the text of our new paste', title='This is the title of the paste', format='1', token=token)
print("Link: " + paste['link'])
print("Raw Link: " + paste['raw'])
Find Pastes Using Keyword
from mypastebot import Search
# max limit is 15
pastes = Search.find(term='Python', limit=10)
print(pastes['results'])
# find most recent pastes
pastes = Search.find(term='Python', limit=10, sortType='date')
print(pastes['results'])
Find Newest Public Pastes
from mypastebot import Search
pastes = Search.new()
print(pastes['results'])
# get new public pastes as links
pastes = Search.new(linkType='link')
print(pastes['results'])
# get new public pastes as raw links
pastes = Search.new(linkType='raw')
print(pastes['results'])
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
mypastebot-0.2.tar.gz
(1.6 kB
view details)
Built Distribution
File details
Details for the file mypastebot-0.2.tar.gz
.
File metadata
- Download URL: mypastebot-0.2.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e905a4bcdce89a787d5f552ee50fb68a6f33e13e3162e576e354d2eea3d921d |
|
MD5 | aa1f6faad967693224741314201f2eac |
|
BLAKE2b-256 | 8f77221b53e3621074acba522d6221248f1a1282493405a8f701a08107647dd9 |
File details
Details for the file mypastebot-0.2-py3-none-any.whl
.
File metadata
- Download URL: mypastebot-0.2-py3-none-any.whl
- Upload date:
- Size: 1.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37533701e25d6e802743f88e387d3986817357dd116016e793eddf31dc21bbff |
|
MD5 | c2f81f6fdaba62adcdecd7f18442eefd |
|
BLAKE2b-256 | 59e0a76d9ddde7e819dd656c2a56a7a00a1902aa1e63edddfbf19522f848083c |