Skip to main content

A Pastebin api created in python with easy to use syntax

Project description

PasteBinPy

An easy to learn, use, and contribute to api for python.


Getting Started

To get your pastebin api key, create or login to your pastebin account here > after creating your account, head over to the api documentation and grab your api key under Your Unique Developer API Key

Example

import pastebinpy as pbp

# All thats needed for a successfull response
pbp.paste("api_key", "title", "body")

pbp.paste("api_key", "title", "body", raw=1, expiry="10M", privacy="1", format="python")

pastebinpy.paste()

API_KEY can be retrieved by making a pastebin account and getting your api key from this link

CONTENT is the body of the paste, the inside that your user will be looking at.

TITLE is at the top of the paste, users will probably not notice this, but its a good attribute to still use.

PRIVACY has two values, 0 being public, and 1 being unlisted, meaning only people with the pastebin link can view it.

EXPIRY is defining the expiration time and/or time limit that you give your paste. Allowed variables are below.

N = Never
10M = 10 Minutes
1H = 1 Hour
1D = 1 Day
1W = 1 Week
2W = 2 Weeks
1M = 1 Month
6M = 6 Months
1Y = 1 Year

RAW is the toggle attribute for obtaining a raw pastebin link, with 1 equaling the raw pastebin link, and 0 being the default, returning the normal pastebin link.

FORMAT is the selected language attribute to format and color the content given. (e.g HTML, PHP, LUA, PYTHON, BF, CSS, CPP, CSHARP, RUBY, RAILS, etc)


Created by css / cesiyi

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

pastebinpy-0.1.5.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

pastebinpy-0.1.5-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

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