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.1.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mystbin_py-7.1.1-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mystbin_py-7.1.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.20.1 CPython/3.8.18 Linux/6.5.0-1025-azure

File hashes

Hashes for mystbin_py-7.1.1.tar.gz
Algorithm Hash digest
SHA256 611f60868e331ed4bb46ca3de3ee6e61895a11d0021987f3cb994aba9a876d5b
MD5 25846fc7089f7f384987d37a320f5a48
BLAKE2b-256 ac5294c40ea0348fa4f2f44dbaee75130674108b05206841dfbfa1adc05e2fbe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mystbin_py-7.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.20.1 CPython/3.8.18 Linux/6.5.0-1025-azure

File hashes

Hashes for mystbin_py-7.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef15e5dd61da0ec630436b2046bcac53e4b98412b934ccd60a50280a2a0b61a4
MD5 066b8311fe882b609912bf80954dd6c9
BLAKE2b-256 9874a702b11f2ff6daea4a2a6a4fe6535567da27b5670dd4ac9a2277090bdf76

See more details on using hashes here.

Supported by

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