Skip to main content

A simple Python library for JustPaste.it API

Project description

JustPaste.py: Simple JustPaste.py API Wrapper for Python

Disclaimer:

Justpaste.py API requires captcha for creating new notes for accounts that have not purchased their Premium service. Once purchased, captchas will disappear even after the premium expires.

Installation:

pip install -U justpaste.py

Usage:

from justpaste import Justpaste

jp = Justpaste("<your email>", "<your password>")

# create new article
article = jp.new_article(
    title="Title of article",
    body="<p>Hello World</p>",
    privacy="public",
    tags=["test"],
    hide_views=True
)

# edit existing article

edited = jp.edit_article(
    article,
    title="New Title",
    body="<p>Hello, World!</p>"
    privacy="hidden"
)

# delete article (move to trash)

jp.delete_article(edited)

# get a user's public articles

user = user_from_url("...")
user.public_articles # previews
[load_articles_from_preview(preview) for preview in user.public_articles] # full articles

Project details


Download files

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

Source Distribution

justpaste_py-2.0.tar.gz (27.4 kB view details)

Uploaded Source

File details

Details for the file justpaste_py-2.0.tar.gz.

File metadata

  • Download URL: justpaste_py-2.0.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for justpaste_py-2.0.tar.gz
Algorithm Hash digest
SHA256 41acdf61343ee89bbff516d0120cdfd91ebd9173c31b34f6d4e929019cefcdd2
MD5 a38b42eb1e275e9aeeabcba1d592fd5b
BLAKE2b-256 95276b53b0a52a5bc463f5c43880816892bb3dfc8ee573a37c1aec2881ca5eee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page