Minimalistic Python client for pastes.dev
Project description
Pastes
Minimalistic Python client for pastes.dev Share your code in seconds with a simple function call.
✨ Features
- 🌀 Both sync and async APIs
- ⚡ One-liner usage
- 📤 Returns instant paste URL
- 🐍 Pure Python, only requests required
📦 Installation
pip install pastes
⚡ Usage
🔹 Sync
from pastes import paste
code = """
def fib(n):
a, b = 0, 1
while a < n:
print(a, end=' ')
a, b = b, a+b
print()
fib(1000)
"""
url = paste(code)
print(url) # https://pastes.dev/UUHlliP7SF
🔹 Async
from pastes import apaste
import asyncio
code = """
def fib(n):
a, b = 0, 1
while a < n:
print(a, end=' ')
a, b = b, a+b
print()
fib(1000)
"""
async def main():
url = await apaste(code)
print(url) # https://pastes.dev/UUHlliP7SF
asyncio.run(main())
👨💻 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
pastes-1.3.0.tar.gz
(15.3 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
pastes-1.3.0-py3-none-any.whl
(15.9 kB
view details)
File details
Details for the file pastes-1.3.0.tar.gz.
File metadata
- Download URL: pastes-1.3.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a300d3463c00ab557e2042883d514721c6796c65766ac42fd8d4b1daa71b36d9
|
|
| MD5 |
84c586fa9fbc7685ad2eccb7d891148b
|
|
| BLAKE2b-256 |
9dde62f8e65a0196190920001faf7f313507cb3089d4bd6a14314f8e868d186e
|
File details
Details for the file pastes-1.3.0-py3-none-any.whl.
File metadata
- Download URL: pastes-1.3.0-py3-none-any.whl
- Upload date:
- Size: 15.9 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 |
0de86fc626d2f1b652475b2bb1f54466408b05c83aeba46a705d09323683407e
|
|
| MD5 |
a6f2b1ae2022d0f70fd6dc280f339ef6
|
|
| BLAKE2b-256 |
9f7876c1ccbc0e56c001d2bf23c6fb73a8c85dea124179859ed97d9d2b370d59
|