A small simple wrapper around the Mystb.in API. API docs can be found here.
Documentation for this wrapper can be found here.
If you want the docs for the main
branch, those can be found here.
- - Creating pastes.
- - Deleting pastes.
- - Getting pastes.
- - Sync client.
- This one will take some time as I have no motivation to do it, but PRs are welcome if others want to do it.
This project will be on PyPI as a stable release, you can always find that there.
Installing via pip
:
python -m pip install -U mystbin.py
Installing from source:
python -m pip install git+https://github.com/PythonistaGuild/mystbin.py.git
# async example - it will default to async
import mystbin
client = mystbin.Client()
file = mystbin.File(filename="File1.txt", content="Hello there!")
file2 = mystbin.File(filename="test.py", content="print('hello!')")
paste = await client.create_paste(files=[file, file2])
str(paste)
>>> 'https://mystb.in/<your generated ID>'
get_paste = await client.get_paste("<your generated ID>")
get_paste.files[0].content
>>> "Hello there!"
get_paste.created_at
>>> datetime.datetime(2020, 10, 6, 10, 53, 57, 556741)
If you have any question please feel free to join the Pythonista Discord server: