Minimalistic Python client for paste.rs
Project description
Pasters
Minimalistic Python client for paste.rs
Share text or code in seconds with one simple call.
✨ Features
- 🌀 Both sync and async APIs
- ⚡ One-liner usage
- 📤 Instant paste URL
- 🐍 Pure Python (depends only on
requestsandhttpx)
📦 Installation
pip install pasters
⚡ Usage
🔹 Sync
from pasters import paste, get_paste, delete_paste
# create paste
url = paste("print('hello world')", ext="py")
print(url) # https://paste.rs/abcd.py
# fetch paste
print(get_paste(url))
# delete paste
delete_paste(url)
🔹 Async
from pasters import apaste, aget_paste, adelete_paste
import asyncio
async def main():
# create paste
url = await apaste("# some markdown text", ext="md")
print(url) # https://paste.rs/efgh.md
# fetch paste
text = await aget_paste(url)
print(text)
# delete paste
await adelete_paste(url)
asyncio.run(main())
API
paste(text, ext='', allow_206=False) -> strapaste(text, ext='', allow_206=False) -> strget_paste(url) -> straget_paste(url) -> strdelete_paste(url) -> Noneadelete_paste(url) -> None
👨💻 Author
Made with ❤️ by @RimMirK
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
pasters-1.0.0.tar.gz
(16.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pasters-1.0.0-py3-none-any.whl
(16.6 kB
view details)
File details
Details for the file pasters-1.0.0.tar.gz.
File metadata
- Download URL: pasters-1.0.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c9f10c4bb52b8cd835821c53f1dd784c07a07a6f59b03f7d381aa0fdcb074a6
|
|
| MD5 |
3aa4e7bbde6debda342c1a0d7d1c3828
|
|
| BLAKE2b-256 |
60a5672d06f477ec19962f69b33637ece4ca530d6b7d0cbca94f8cb22bc230c9
|
File details
Details for the file pasters-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pasters-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2c1899a422f3e1a3c0bc2d1899a5181fb1ae1f65c5a5aecdd88ed14571ed601
|
|
| MD5 |
821e572e2ef6db125a2b93707f85d82c
|
|
| BLAKE2b-256 |
1d23df554f697f256adffab7f443d1191424617a8f26952fe463ad2196cc391f
|