Skip to main content

A small simple wrapper around the mystb.in API.

Project description

Mystbin.py!

Documentation Status Linting status Build status

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.


Features

  • - 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.

Installation

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

Usage examples

# 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:

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

mystbin_py-7.0.2.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

mystbin_py-7.0.2-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file mystbin_py-7.0.2.tar.gz.

File metadata

  • Download URL: mystbin_py-7.0.2.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1022-azure

File hashes

Hashes for mystbin_py-7.0.2.tar.gz
Algorithm Hash digest
SHA256 31737a9d04d025b0cf2660e12aaf6830d8110f08100d3b7c99f6d092f6e223da
MD5 fa4a6f21075034ecb252dc5697c5bf9f
BLAKE2b-256 7532190723649c1eab6b73daa0cde195aa68a287702e718a0ba5e8b4f7a3ba85

See more details on using hashes here.

File details

Details for the file mystbin_py-7.0.2-py3-none-any.whl.

File metadata

  • Download URL: mystbin_py-7.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1022-azure

File hashes

Hashes for mystbin_py-7.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4f8a5421e407aad8f5c9d9d0248db87678670a438f95889ddeaf84b7b9e3ffd7
MD5 bb1c30c7f8c507c1b00edd9940fd1598
BLAKE2b-256 d65e21ad8843a1bd7b8981172e4b282c89a07ab83b2f24c9a1ac9dc65c752e4d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page