A simple interface to use ImageKiIO API with Flask.
Project description
Flask-CKEditor-Manager
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'
}
]
})
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
Built Distribution
File details
Details for the file flask_imagekitio-0.1.1.tar.gz
.
File metadata
- Download URL: flask_imagekitio-0.1.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f92fd7988d7a2e7c4f579eb9a05bd860135b44d80fe19a15dd339782b6f03002 |
|
MD5 | aafab3fd3be32d7bdf0df64da83d0255 |
|
BLAKE2b-256 | 71a6e5522c84b4ab5d5f45fd798b17ec98e4573e2c12fadb3682a05324b40ed5 |
File details
Details for the file flask_imagekitio-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: flask_imagekitio-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e8529098f01fbba912adc2b8e562a627e9916e3ab8228010c8e1d99e53a84b3 |
|
MD5 | 907e8be978c6d3f9ac0b4378edb33a5b |
|
BLAKE2b-256 | 66af4f5541514d0fbe6b9c78b887d9c09599e5768a7257eefbbbfcd0efc5fd89 |