Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_imagekitio-0.1.0.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

flask_imagekitio-0.1.0-py3-none-any.whl (2.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page