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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file freeimagehost-1.2.tar.gz.
File metadata
- Download URL: freeimagehost-1.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c103b82bbe0057fa24d5d0a3d9ef11105b57e34cf79c1e1583d63d30c1c2474
|
|
| MD5 |
665a3a1786e0b7081751d88af2e21dec
|
|
| BLAKE2b-256 |
3988e28ce49784fdac8bdeac8c0f567ef245d17f0a4ed62dce563298068b053c
|
File details
Details for the file freeimagehost-1.2-py3-none-any.whl.
File metadata
- Download URL: freeimagehost-1.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ae400966e9e3de7fcf9735e458097ab4de640157b450676a584b21fa5914765
|
|
| MD5 |
966683fce4b00fabd3398fe6c8ecf84f
|
|
| BLAKE2b-256 |
d066fb496065ea6bec9b0f2416d58b2300be490abc3d0568235a0ae9d3b3651b
|