Skip to main content

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.

Source Distribution

pixhostuploader-1.0.10.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

pixhostuploader-1.0.10-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file pixhostuploader-1.0.10.tar.gz.

File metadata

File hashes

Hashes for pixhostuploader-1.0.10.tar.gz
Algorithm Hash digest
SHA256 03413ec5360a0d6fdabf0d6265771467de000e26d17aea2e1b2799ba8a392b26
MD5 c211556ee1a3d85bf7e8aa418a9eae17
BLAKE2b-256 6e4479b55fd698248f128bc39537c954a1de312d1e146a2f1a8585993829a3e4

See more details on using hashes here.

File details

Details for the file pixhostuploader-1.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for pixhostuploader-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 bbc0358e72906fe22443428f2a9b0bf9ce040c2bd282263db0ecaf8c661fe18c
MD5 c505cb0a530b19479a2d5560208e889c
BLAKE2b-256 4dde6febec22b49944a4efdca6e66ef12e8f9142a8c203ba55986cd9073a7d60

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