Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Unofficial uploader to pixhost.org image sharing site.

Project description

Unofficial Python 3.2+ upload client for pixhost.org image sharing website.

Usage

import pixhostuploader as pixhost

uploaded = pixhost.upload('image.jpg')

print(uploaded)

Uploader returns 3 URLs for each image: thumbnail, full size image and a its page on pixhost.org.

{
    'thumb_image': '...',
    'full_size_image': '...',
    'page_url': '...',
}

You can also upload multiple images at once.

images = [
    'image.jpg',
    'another_image.jpg',
]
uploaded = pixhost.upload(images)

Uploader then returns a list of URLs for each uploaded image.

[
    {
        'thumb_image': '...',
        'full_size_image': '...',
        'page_url': '...',
    }, {
        'thumb_image': '...',
        'full_size_image': '...',
        'page_url': '...',
    }
]

Maximum image size on pixhost.org is 10 MB so if you try to upload a larger file the upload function throws TooLargeImageFormat exception.

Also in case the upload fails for some reason (upload page doesn’t return 200 code) UploadFailed is thrown.

Project details


Download files

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

Files for pixhostuploader, version 1.0.10
Filename, size File type Python version Upload date Hashes
Filename, size pixhostuploader-1.0.10-py3-none-any.whl (4.4 kB) File type Wheel Python version 3.4 Upload date Hashes View hashes
Filename, size pixhostuploader-1.0.10.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page