Skip to main content

Unofficial uploader to pixhost.org image sharing site.

Project description

pixhost-uploader
================

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

Usage
-----

.. code:: python

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.

.. code:: python

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

You can also upload multiple images at once.

.. code:: python

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

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

.. code:: python

[
{
'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.2.tar.gz (75.4 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for pixhostuploader-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c56fc3e636dd6cf25a247f16e4471419677bd6a0b08d8729b6c9cc35463d17a3
MD5 d09ec5462da3f9f393f3e9e7cde52e96
BLAKE2b-256 17e90fec16d611f0ff821d34bdb004d8aac95446ebc140457bc322ba0f071404

See more details on using hashes here.

Supported by

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