This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Tartar optimizes your images, accelerates website loadtimes, saves storage and bandwidth

Project Description
# TARTAR README #

Tartar optimizes images.

Register on https://tartar.io/ and get the API keys.

For more details please visit https://tartar.io/docs/



### Installation ###


```
#!bash

pip install tartar
```


### Initialize ###

```
#!python

from tartar import Tartar

tartar = Tartar(tartar_token, tartar_secret)
```


### Amazon S3 store ###
Set this up if you want Tartar to store optimized images on your S3 store for you

```
#!python
tartar.s3_store(aws_key, aws_secret, s3_bucket_name)

```

### Immediate resizing ###


```
#!python

tartar.resize(
[
{
'strategy': 'landscape',
'width': 600,
'path': 'media/images/example.jpeg' # you must provide a path to S3 location for every resize object, if tartar.s3_store was set up
},
{
'strategy': 'exact',
'width': 600,
'height': 500,
'path': 'media/images/example.jpeg' # you must provide a path to S3 location for every resize object, if tartar.s3_store was set up
},
]
)
```

### Delayed resizing ###

If you wish to create multiple resizings of an image it's advisable to use tartar.resize_delay()
```
#!python

tartar.resize_delay(
[
{
'strategy': 'portrait',
'height': 600,
},
{
'strategy': 'frame',
'width': 600,
'height': 500,
},
]
)
```
You can also mix, providing tartar.resize for which you'll get the results immediately and tartar.resize_delay which Tartar will process in the background.

### Finally ###

You must feed the file either directly or from url. Both methods make the request to Tartar API with parameters provided using above methods.


```
#!python

tartar.upload(path='/path/to/file')
tartar.url(url='url/to/file')
```
Release History

Release History

This version
History Node

0.4

History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Tartar-0.4.tar.gz (2.6 kB) Copy SHA256 Checksum SHA256 Source Mar 7, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting