Skip to content

Latest commit

 

History

History

python

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Introduction

This sample project shows an implementation of all methods exposed by Python SDK. You can copy-paste code snippet from here in your application and edit the values as per your requirement.

How to run locally

You will find sample.py in root folder.

Open python/sample.py file and replace placeholder credentials with actual values. You can get the value of URL-endpoint from your ImageKit dashboard. API keys can be obtained from the developer section in your ImageKit dashboard.

In sample.py file, set the following parameters for authentication:

from imagekitio import ImageKit
imagekit = ImageKit(
    private_key='your private_key',
    public_key='your public_key',
    url_endpoint = 'your url_endpoint'
)
  • You will find the dependencies in python/requirements.txt file.

Install dependencies

To install dependencies that are in the requirements.txt file can fire this command to install them:

pip install -r requirements.txt

Now run sample.py. If you are using CLI Tool (Terminal/Command prompt), open the project in CLI and execute it.

cd project-name
pip install imagekitio  # if not installed already
python sample.py        # to run sample.py file

Useful links

Report a bug

If something doesn't work as expected, report a bug at support@imagekit.io