imagehoster-python-client: A python client for SteemitImages

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@emrebeyler·
0.000 HBD
imagehoster-python-client: A python client for SteemitImages
#### Repository
- [https://github.com/emre/imagehoster-python-client](https://github.com/emre/imagehoster-python-client)

[Imagehoster](https://github.com/steemit/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](https://github.com/steemit/imagehoster) on the ImageHoster README.

***

[imagehoster-python-client](https://github.com/emre/imagehoster-python-client) is the python client of the steemitimages. You can upload images to steemitimages in your python applications.

##### Installation

```
$ (sudo) pip install imagehoster
```

##### Usage

```
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)
```

##### Using the CLI APP

<img src="https://steemit-production-imageproxy-upload.s3.amazonaws.com/DQmdws8Jofne1WEds361YJhqNDhNUidhQuGuucqbhRdavAL">
<center><sup><i>imagehosterception</i></sup></center>

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
```

##### Notes

- 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](https://github.com/marvin-we/steemj-image-upload) to see the java version of the same functionality.

- Have a look at [here](https://github.com/steemit/condenser/blob/b4579bf0fccf17b846e9bd27b4f77b615ceb2036/src/app/redux/UserSaga.js#L571) to see the implementation on [Condenser](https://github.com/steemit/condenser/)


#### Technology Stack
Code runs on Python 3.6+. It may run on previous versions of py3k, but didn't tried it myself.

#### Roadmap

It works fine at the moment. Since the server doesn't have many options, there is nothing to add more.

#### How to Contribute

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.

#### GitHub Account
[https://github.com/emre](https://github.com/emre)
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,