1- # MystBin.py!
1+ <div align =" center " >
2+ <h1>Mystbin.py!</h1>
3+ <a href='https://mystbinpy.readthedocs.io/en/latest/?badge=latest'>
4+ <img src='https://readthedocs.org/projects/mystbinpy/badge/?version=latest' alt='Documentation Status' />
5+ </a>
6+ <a href='https://github.com/AbstractUmbra/mystbin.py/workflows/Code%20Linting'>
7+ <img src='https://github.com/AbstractUmbra/mystbin.py/workflows/Code%20Linting/badge.svg?branch=main' alt='Linting status' />
8+ </a>
9+ <a href='https://github.com/AbstractUmbra/mystbin.py/workflows/Code%20Analysis'>
10+ <img src='https://github.com/AbstractUmbra/mystbin.py/workflows/Code%20Analysis/badge.svg?branch=main' alt='Code analysis' />
11+ </a>
12+ <a href='https://github.com/AbstractUmbra/mystbin.py/workflows/Build'>
13+ <img src='https://github.com/AbstractUmbra/mystbin.py/workflows/Build/badge.svg' alt='Build status' />
14+ </a>
15+ </div >
16+ <br >
217
318A small simple wrapper around the [ MystB.in] ( https://mystb.in/ ) API.
4-
519----------
6- ![ Code Linting] ( https://github.com/AbstractUmbra/mystbin.py/workflows/Code%20Linting/badge.svg?branch=main )
7- ![ Code Analysis] ( https://github.com/AbstractUmbra/mystbin.py/workflows/Code%20Analysis/badge.svg?branch=main )
8- ![ Build] ( https://github.com/AbstractUmbra/mystbin.py/workflows/Build/badge.svg )
920### Features
1021
1122- [x] - ` POST ` ing to the API, which will return the provided url.
@@ -39,7 +50,6 @@ Since the project is considered multi-sync, it will work in a sync/async environ
3950import mystbin
4051
4152mystbin_client = mystbin.Client()
42- # NOTE : The `api_key` kwarg in the Client constructor is optional.
4353
4454paste = await mystbin_client.post(" Hello from MystBin!" , syntax = " python" )
4555str (paste)
@@ -57,22 +67,13 @@ paste.created_at
5767```
5868
5969``` py
60- # sync example - we need to pass a session though
6170import mystbin
62- import requests
6371
64- sync_session = requests.Session()
65- mystbin_client = mystbin.Client(session = sync_session)
66- # NOTE : The `api_key` kwarg in the Client constructor is optional.
72+ mystbin_client = mystbin.SyncClient()
6773
6874paste = mystbin_client.post(" Hello from sync Mystb.in!" , syntax = " text" )
6975str (paste)
7076>> > ' https://mystb.in/<your generated ID>.text'
7177```
7278
7379NOTE: There is a timeout of 15s for each operation.
74-
75- ### Dependencies
76-
77- ` aiohttp ` - required \
78- ` requests ` - optional
0 commit comments