Skip to main content

A small package to create pastes on Pastebin with the Pastebin API

Project description

Pastebin

Create a Paste as a guest.

get your api_dev_key from here

    paste = pb.Paste("<your api_dev_key>")
    paste.create_paste(title="test",
        text="test",
        format=pb.code_formats.PYTHON,
        expire=pb.expire_type.ONE_DAY,
        paste_type=pb.paste_type.PUBLIC)

Get your user key:

    import pastebin as pb

    api_user_key = pb.Login("username","password","api_dev_key").get_user_key()

Create Paste as a registered user.

    paste = pb.Paste("<your api_dev_key>",user_key="<your user_key>")
    paste.create_paste(title="test",
        text="test",
        format=pb.code_formats.PYTHON,
        expire=pb.expire_type.ONE_DAY,
        paste_type=pb.paste_type.PUBLIC)

get the paste url.

    paste.get_paste()

list all pastes.

    paste.list_pastes()

delete a paste.

    paste.delete_paste(paste_key="<paste_key>")

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

NaNbin-0.0.1.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

NaNbin-0.0.1-py3-none-any.whl (5.1 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