Metadata-Version: 2.4
Name: pasters
Version: 1.0.0
Summary: Minimalistic Python client for paste.rs
Author-email: RimMirK <me@RimMirK.pp.ua>
Project-URL: Repository, https://github.com/RimMirK/pasters
Keywords: paste,pastes,paste.rs,pasters,code,pastebin,client,share,send
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: httpx
Dynamic: license-file

# Pasters
[![PyPI](https://img.shields.io/pypi/v/pasters?color=blue&label=PyPI)](https://pypi.org/project/pasters/)
[![Python](https://img.shields.io/pypi/pyversions/pasters.svg?logo=python&logoColor=yellow)](https://pypi.org/project/pasters/)
[![License](https://img.shields.io/github/license/RimMirK/pasters?color=green)](LICENSE)
[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

Minimalistic Python client for [paste.rs](https://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 `requests` and `httpx`)  

---

## 📦 Installation
```sh
pip install pasters
````

---

## ⚡ Usage

### 🔹 Sync

```python
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

```python
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) -> str`
* `apaste(text, ext='', allow_206=False) -> str`
* `get_paste(url) -> str`
* `aget_paste(url) -> str`
* `delete_paste(url) -> None`
* `adelete_paste(url) -> None`

---

## 👨‍💻 Author

Made with ❤️ by [@RimMirK](https://t.me/RimMirK)


