A asynchronous Python client for HasteBin.
- Python >= 3.7
- aiohttp
pip install git+https://github.com/DankDumpster/HasteBinWrapper
import hastebin
haste = hastebin.Session()
hastebin.Session(links=True) Returns links
link = await haste.upload("Your text")
content = await haste.read("HasteBin Link")
import haste
import asyncio
haste = haste.Session(links=True) # initiates the client
async def main():
link = await haste.upload(payload="import random\n"
"print(random.randint(0, 5))") # Sends the code to the wrapper and uploads it to HasteBin, and returns the link where its stored
content = await haste.read(payload=link) # Gets the data from the link
print(content) # Prints import random\n print(random.randint(0, 5))
asyncio.get_event_loop().run_until_complete(main())