Skip to main content

Upload and retrieve pastes from Pastebin via Python EASLY .

Project description

Telegram Owner

[!IMPORTANT] PyPasta is a lightweight Python utility for interacting with the Pastebin API. It allows users to upload code snippets with metadata like title, syntax highlighting, and expiration time, as well as retrieve and display paste content via a simple interface.

Installation and Development 🚀

  • Via PyPi ⚡️
# via PyPi
pip install PyPasta -U

🚀 Quick Start .

from PyPasta import Paste
object = Paste()
# Uploading Paste .

object.upload(
    api_dev_key= "",        # Your Pastebin Developer API key (default provided but recommended to use your own)
    syntax="" ,             # Syntax highlighting format (e.g., python, html, text)
    code="" ,               # The actual code snippet to upload
    expire_date="10M" ,     # Expiration time (10M, 1H, 1D, 1W, 2W, 1M, 6M, 1Y, or N for never)
    title="" ,              # Name/title of the paste
    private= 1              # Paste visibility (0=public, 1=unlisted, 2=private)
)

# Get Paste .

object.get("")              # ID Of Paste

Features 📚

  • ✅ Upload code snippets to Pastebin using their API

  • 📝 Set paste title, syntax format, expiration date, and visibility

  • 🔍 Retrieve existing pastes by ID

  • 🌐 Fetch paste metadata (title, visibility) and raw code content

  • 🎨 Clean and colored terminal output using colorama

Notes ✍️

  • Make sure to get your own API key from Pastebin.

  • This tool is ideal for quick snippet sharing, backups, or automated code posting from scripts.

💬 Help & Support .

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypasta-0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

PyPasta-0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file pypasta-0.1.tar.gz.

File metadata

  • Download URL: pypasta-0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for pypasta-0.1.tar.gz
Algorithm Hash digest
SHA256 71e93558025a7400534fc5bd5c17bd7c59b28b0f28a56a8562a62f5f5bfdf8ca
MD5 eca45f50e0bccaa9e71d880e09f2e956
BLAKE2b-256 5b298f306fd388d14a9629737dd0182034c9bec0b736e2c169e21f8cd655a37c

See more details on using hashes here.

File details

Details for the file PyPasta-0.1-py3-none-any.whl.

File metadata

  • Download URL: PyPasta-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for PyPasta-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c910a0e3091ae49bb0a5626beed5ec8120712a450ad2e55d7d6d1b91c6dae73e
MD5 b5aefcf37027f55552962121f808aba6
BLAKE2b-256 098b19e8e3ad009879e5d53011da0dde96e906781d1a2e49ddd1d4aaba03cf7b

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