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 ImageHost
cl = ImageHost('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 ImageHost
async def main():
cl = ImageHost('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.2.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for freeimagehost-1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ae400966e9e3de7fcf9735e458097ab4de640157b450676a584b21fa5914765 |
|
MD5 | 966683fce4b00fabd3398fe6c8ecf84f |
|
BLAKE2b-256 | d066fb496065ea6bec9b0f2416d58b2300be490abc3d0568235a0ae9d3b3651b |