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.1.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.1.tar.gz.
File metadata
- Download URL: freeimagehost-1.1.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 |
07cd14b3e86914caecac887311942180e16665386a7be56e75da6f24fb349ac8
|
|
| MD5 |
966b2b5882f5bc6ff5770bd0f12993af
|
|
| BLAKE2b-256 |
ec80a6040544572f6a204524bf4c814c18d084b2037e72dc0bfc556860f58e51
|
File details
Details for the file freeimagehost-1.1-py3-none-any.whl.
File metadata
- Download URL: freeimagehost-1.1-py3-none-any.whl
- Upload date:
- Size: 4.4 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 |
9cc58d923d2974362ba3e98b2013166540ffc462c52b1e063229bb46ceaa1bc2
|
|
| MD5 |
11eda329903187a5041cfdf89bd4f64d
|
|
| BLAKE2b-256 |
4a00a5d279c249371f522eac5d8e6da34501815cc7304c04119249ba9d898b8a
|