An unofficial wrapper for the freeimagehost website api.
Project description
FreeImageHost
Unofficial wrapper for the freeimagehost website api
Install
$ python3 -m pip install freeimagehost
Example
from imagehost import Client
cl = Client('api_key...')
#local image
image = cl.upload(
'image.png'
)
#url image
image2 = cl.upload(
'https://example.com/image.png',
'url'
)
#base64 image
image3 = cl.upload(
'b64 string...',
'b64'
)
print(image['image']['url'])
print(image2['image']['url'])
print(image3['image']['url'])
Asyncio Example
import asyncio
from imagehost.aio import Client
async def main():
cl = Client('api_key....')
#local image
image = await cl.upload(
'image.png'
)
#url image
image2 = await cl.upload(
'https://example.com/image.png',
'url'
)
#base64 image
image3 = await cl.upload(
'b64 string...',
'b64'
)
print(image['image']['url'])
print(image2['image']['url'])
print(image3['image']['url'])
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
freeimagehost-1.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for freeimagehost-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c25bccb2ab332266ca772fcfca4f21cd491025d48f6b447b3638a04ff5bb7bda |
|
MD5 | 86997396281388457cd535c8ba25d250 |
|
BLAKE2b-256 | 4bd844d57c6da62291415cef9130773a89a0f78f296db10101a326d3b6b1fd09 |