{ "info": { "author": "Dmitriy Chukhin", "author_email": "dchukhin@caktusgroup.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "===============\nOptimized-image\n===============\n\nOptimized-image is a simple Django library to allows optimization\nof images by using TinyPNG. Saving an image locally to an\nOptimizedImageField uses TinyPNG to optimize the image, then S3\nto store it.\n\nDetailed documentation is in the \"docs\" directory.\n\nQuick start\n-----------\n\n1. Add \"optimized_image\" to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = [\n ...\n 'optimized_image',\n ]\n\n2. Because optimized_image uses TinyPNG and S3, you will need to\n get API keys from each of them. Visit https://tinypng.com/developers\n and http://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html\n for more details on getting a TinyPNG API key (easy) and setting\n up an S3 bucket (harder). Once you have done so, add the\n following settings to your settings file. Note: it is a good idea\n to keep most, if not all, of these secret::\n\n TINYPNG_KEY # Go to\n S3_KEY_ID\n S3_ACCESS_KEY\n S3_REGION\n S3_BUCKET\n S3_OPTIMIZED_IMAGES_FOLDER\n\n3. Migrate the optimized_image models::\n\n python manage.py migrate optimized_image\n\n4. You may use the `OptimizedImageField` by importing it::\n\n\n from optimized_image.fields import OptimizedImageField\n\n and saving images into it, the same way you would to a Django `ImageField`.\n\n5. You may get an optimized url by using the `get_optimized_url` function\n for an instance of an object. For a blogpost with an ``image`` field that\n has had an image uploaded you may run::\n\n from optimized_image.utils import get_optimized_url\n get_optimized_url(blogpost, \u2018image\u2019)\n\n6. If you want to change legacy models with Django's Image fields and\n optimize the images in those fields, you may do so for legacy models\n by passing a list of legacy model classes (not their instances) to\n the following function::\n\n from optimized_image.utils import optimize_legacy_images_in_model_fields\n optimize_legacy_images_in_model_fields([LegacyModelClass1, LegacyModelClass2])\n\n Note: this function makes calls to TinyPNG and S3, so it can take a really\n long time, depending on how many images you have. You may pass in 1\n for the verbosity parameter to get logs on the progress::\n\n optimize_legacy_images_in_model_fields([LegacyModelClass1, LegacyModelClass2], verbosity=1)\n\n Note about TinyPNG API keys: If you obtain the free TinyPNG API token, you are limited to 500\n image optimizations per month, so this function may fail if you have a\n lot of images. You may either obtain a paid API key, or wait until next month.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/dchukhin/django_tinypng/tarball/0.0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dchukhin/django_tinypng", "keywords": "django,image,optimize,imagefield", "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "optimized-image", "package_url": "https://pypi.org/project/optimized-image/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/optimized-image/", "project_urls": { "Download": "https://github.com/dchukhin/django_tinypng/tarball/0.0.1", "Homepage": "https://github.com/dchukhin/django_tinypng" }, "release_url": "https://pypi.org/project/optimized-image/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "A simple Django app that allows for optimization of images.", "version": "0.0.1" }, "last_serial": 2572305, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "e45300fdf77ce994c7150807c848e2c4", "sha256": "ac7160fce4f05410cddf06fcb40dc409012f7c0b671839efe30006ff84ecca75" }, "downloads": -1, "filename": "optimized-image-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e45300fdf77ce994c7150807c848e2c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7515, "upload_time": "2017-01-13T15:49:32", "url": "https://files.pythonhosted.org/packages/ab/7c/f88d25a0c8ff7fed766d49927bd0bc873a0bf8d705b5f80159819de46266/optimized-image-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e45300fdf77ce994c7150807c848e2c4", "sha256": "ac7160fce4f05410cddf06fcb40dc409012f7c0b671839efe30006ff84ecca75" }, "downloads": -1, "filename": "optimized-image-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e45300fdf77ce994c7150807c848e2c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7515, "upload_time": "2017-01-13T15:49:32", "url": "https://files.pythonhosted.org/packages/ab/7c/f88d25a0c8ff7fed766d49927bd0bc873a0bf8d705b5f80159819de46266/optimized-image-0.0.1.tar.gz" } ] }