Metadata-Version: 2.1
Name: flask-imagekitio
Version: 0.1.0
Summary: A simple interface to use ImageKiIO API with Flask.
License: MIT
Author: Sebastian Salinas
Author-email: seba.salinas.delrio@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: Flask (>=2.2.2,<3.0.0)
Requires-Dist: imagekitio (>=3.0.1,<4.0.0)
Description-Content-Type: text/markdown

# Flask-CKEditor-Manager

Flask-ImageKitIO provides a simple interface to use ImageKitIO API with Flask.

```{warning}
🚧 This package is under heavy development..
```

## Installation

Install the extension with pip:

```bash
pip install flask-imagekitio
```

Install with poetry:

```bash
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:

```python
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'
        }
    ]
})
```

