Imagehoster is the project powers the images you upload at Steemit. It's an interesting project because only STEEM accounts can upload files here by signing the image content with their posting key. You can get more details on the ImageHoster README.
imagehoster-python-client is the python client of the steemitimages. You can upload images to steemitimages in your python applications.
$ (sudo) pip install imagehoster
image_uploader = ImageUploader(
steem_username,
private_posting_key,
)
resp = image_uploader.upload("/path/to/image.png)
if 'url' in resp:
print("File uploaded: %s" % resp["url"])
else:
print(resp)
Once you have installed the package via pip, you have also a CLI app installed.
Make sure you have set environment variables first:
export IMAGEHOSTER_USERNAME=emrebeyler
export IMAGEHOSTER_POSTING_WIF=PRIVATE_POSTING_WIF
Then...
$ imagehoster qq.jpeg
File uploaded: https://steemitimages.com/DQmZNzWiHHSJGdPjTXDAmeZEW5G84z47uSKbR9shABJRRaL/image
If you set up your own imagehoster server instance, all you need to do is change the image_uploader_instance.API_BASE_URL to your URL.
Have a look at here to see the java version of the same functionality.
Code runs on Python 3.6+. It may run on previous versions of py3k, but didn't tried it myself.
It works fine at the moment. Since the server doesn't have many options, there is nothing to add more.
Contribution process is same as any other open-source project. You can check out open issues at Github and can start working. Just make sure, you will comment on the related issue before starting working on it.