A Python client for the Imgur API
Project description
imgur-python
A Python client for the Imgur API.
The original imgurpython project is no longer supported, so, I decided to create my own python client for the Imgur API.
Disclaimer: This is a work in progress. In this first version, I'm not gonna implement all the API calls, only the necessary ones to interact with imgur and be able to create albums, upload images and share them on the site.
For more information, check the project wiki
Requirements
Links
Install
$ python setup.py install
with pip
$ pip install imgur-python
How to publish something and share it with the community?
- upload a bunch of images
- add them to an album
- share it
from os import path
from imgur_python import Imgur
imgur = Imgur({'client_id': 'cf8c57ca8......'})
image = imgur.image_upload(path.realpath('./image.png'), 'Untitled', 'My first image upload')
image_id = image['response']['data']['id']
album = imgur.album_create([image_id], 'My first album', 'Something funny', 'public')
album_id = album['response']['data']['id']
response = imgur.gallery_album(album_id, 'This is going down on the sub', 0, 'funny,midly_interesting')
print(response)
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
imgur_python-0.1.0.tar.gz
(19.3 kB
view hashes)
Built Distribution
Close
Hashes for imgur_python-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e138c528db7cdd734e94ddbec02cff0c5b628e722efc6f2bb476a0974f64905 |
|
MD5 | faa0e65af9da344efafb67aefb175276 |
|
BLAKE2b-256 | bae7684085bb0897ba2e6e039ef95ac23c7d5a2b7ca70d085eeee939a3540cf1 |