vtpp2014 / tinify-python

Python client for the Tinify API.

Home Page:http://tinify.com/developers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Tinify API client for Python

Python client for the Tinify API, used for TinyPNG and TinyJPG. Tinify compresses your images intelligently. Read more at http://tinify.com.

Documentation

Go to the documentation for the Python client.

Installation

Install the API client:

pip install tinify

Usage

import tinify
tinify.key = 'YOUR_API_KEY'

tinify.from_file('unoptimized.png').to_file('optimized.png')

Running tests

pip install -r requirements.txt -r test-requirements.txt
nosetests

Integration tests

pip install -r requirements.txt -r test-requirements.txt
TINIFY_KEY=$YOUR_API_KEY nosetests test/integration.py

License

This software is licensed under the MIT License. View the license.

About

Python client for the Tinify API.

http://tinify.com/developers

License:MIT License


Languages

Language:Python 99.1%Language:Shell 0.9%