Flask-ImageKitIO
Flask-ImageKitIO provides a simple interface to use ImageKitIO API with Flask.
🚧 This package is under heavy development..
Installation
Install the extension with pip:
pip install flask-imagekitio
Install with poetry:
poetry add flask-imagekitio
Configuration
This are some of the settings available
| Config | Description | Type | Default |
|---|---|---|---|
| IMAGEKITIO_URL_ENDPOINT | The ImagekitIO account url endpoint | str | None |
| IMAGEKITIO_PRIVATE_KEY | The ImagekitIO Private Key | str | None |
| IMAGEKITIO_PUBLIC_KEY | The ImagekitIO Public Key | str | None |
Usage
Once installed ImagekitIO is easy to use. Let's walk through setting up a basic application. Also please note that this is a very basic guide: we will be taking shortcuts here that you should never take in a real application.
To begin we'll set up a Flask app:
from flask import Flask
from flask_imagekitio import ImagekitIO
app = Flask(__name__)
imagekitio = ImagekitIO()
imagekitio.init_app(app)
result = imagekit.upload_file(data, file.filename)
img_url = imagekit.url({
'src': result.url,
'transformation': [
{
'width': '600',
'aspect_ratio': '5-3'
}
]
})
Metadata
Release files for flask-imagekitio 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flask_imagekitio-0.1.3.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flask_imagekitio-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.1 kB
Release files / flask_imagekitio-0.1.3.tar.gz
| Download URL | flask_imagekitio-0.1.3.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ee30ff8a8ce809ac4f33ad4c03638e3eb102fd02cf394a67102b758f6b0b524
|
|
BLAKE2b-256 checksum How to use checksums |
4a77c75ff5442a27cce5e3cbd66a8f6069a1f76f2eec379351cbcf1da6a42e7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|
Release files / flask_imagekitio-0.1.3-py3-none-any.whl
| Download URL | flask_imagekitio-0.1.3-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94a2278d8ff90a778158b96349de80fbe3bccdc6e45ac8a55ed8ed4102890316
|
|
BLAKE2b-256 checksum How to use checksums |
c964f80f4b6ee43901af35069974914ce2ea8e16c998e10f60d23cdc8d3847cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|