Skip to content

AltF02/HasteBinWrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HasteBinWrapper

A asynchronous Python client for HasteBin.

Requirements

Installation

pip install git+https://github.com/DankDumpster/HasteBinWrapper

Usage

import hastebin

haste = hastebin.Session()

hastebin.Session(links=True) Returns links

link = await haste.upload("Your text")
content = await haste.read("HasteBin Link")

Example

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())

About

Wrapper for HasteBin / HasteBin api in python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages