{ "info": { "author": "YouGov, Plc.", "author_email": "dev@yougov.com", "bugtrack_url": null, "classifiers": [], "description": "Meet Thumpy\n===========\n\nThumpy is a Python web service that crops and scales images. It doesn't store\nanything. It's meant to be used as an origin server sitting behind a CDN such\nas Amazon CloudFront.\n\nYg.thumpy is the YouGov fork of Thumpy.\n\nConfiguration\n=============\n\nSettings are stored in the settings.yaml file. They should include:\n- the name and access keys to your S3 bucket\n- compression quality (e.g. 80)\n- list of CORS allowed hosts\n\nInterface\n=========\n\nThumpy serves images using the same paths as their storage location on S3.\nConversion parameters are specified in the query string, using an interface\ninspired by `TimThumb\n`_.\n\nexamples:\n\nScaling\n~~~~~~~\n\nScale the width to 200px, and the height proportionally::\n\n http://mythumpyserver.somewhere/castle.jpg?w=200\n\nScale the height to 150px, and the width propotionally::\n\n http://mythumpyserver.somewhere/castle.jpg?w=200\n\nSpecify both height and width::\n\n http://mythumpyserver.somewhere/castle.jpg?w=200&h=150\n\nScaling (Post processing)\n~~~~~~~~~~~~~~~~~~~~~~~~~\nSame as Scaling (above) but applied to the output image after all transformations\n\n http://mythumpyserver.somewhere/castle.jpg?pw=200&ph=150\n\nCropping\n~~~~~~~~\n\nCrop the width to 200 and the height to 100::\n\n\thttp://mythumpyserver.somewhere/castle.jpg?cw=200&ch=100\n\nCrop the width and height to 50::\n\n\thttp://mythumpyserver.somewhere/castle.jpg?cw=50&ch=50\n\n- Thumpy will always scale first before any cropping.\n- Thumpy always crops from the center of the image.\n\nReveal Mask / Zoom Cropping\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\nMinimum 3 parameters required:\n- Top offset (e.g. zct=100px)\n- Left offset (e.g. zcl=100px)\n- Width or Height of the output crop from the offsets. If only one is provided the other will automatically be assigned the other's value.\n\nThe mask should be applied to the original image which means there is no scaling but only masking.\n\nSee: Scaling (Post processing) to get the scaled mask/crop.\n\nGet 100px x 50px scaled crop off a larger image with a reveal mask of 350px x 175px applied at 20px x 10px top-left offset.\n\n http://mythumpyserver.somewhere/castle.jpg?zcw=350&zch=175&zct=20&zcl=10&pw=100&ph=50\n\n\nGreyscale\n~~~~~~~~~\n\nExample of a greyscale image with no resizing::\n\thttp://mythumpyserver.somewhere/castle.jpg?gray=1\n\n\nCloudfront Ugliness\n~~~~~~~~~~~~~~~~~~~\n\nIf the \"cloudfront_ugliness\" option in thumpy's config is set to true, then the image modification parameters will be pulled from the first segment of the path instead of the URL query string.\n\nThis is to workaround Amazon Cloudfront dropping the URL query string when making requests to your origin server. Example::\n\n\thttp://mycloudfrontdist.somewhere/w=100/path/to/image/castle.jpg\n\nFor the original, unaltered image, place an \"o\" where the query string would go, like this::\n\n\thttp://mycloudfrontdist.somewhere/o/path/to/image/castle.jpg", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yougov/yg.thumpy", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "yg.thumpy", "package_url": "https://pypi.org/project/yg.thumpy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/yg.thumpy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/yougov/yg.thumpy" }, "release_url": "https://pypi.org/project/yg.thumpy/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "A Python web server that uses Pillow to dynamically scale, crop, transform and serve images from S3 or the local filesystem", "version": "1.0.1" }, "last_serial": 2526043, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "b18fbbfe06104e6a7fe65e24dadfc0f6", "sha256": "a7444e5af59446e8947800e72343f49bbaa53a29a997aacfbdfecd2a6b0f4ad0" }, "downloads": -1, "filename": "yg.thumpy-1.0.tar.gz", "has_sig": false, "md5_digest": "b18fbbfe06104e6a7fe65e24dadfc0f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 483444, "upload_time": "2016-08-09T22:00:32", "url": "https://files.pythonhosted.org/packages/5a/d1/d7ffe0faad54f3bdea2296b79f66ff540d9a74bce9177f97ec1e7e0e7d12/yg.thumpy-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "9c461ca90c74d2f8de7a4d5ca5bfcd56", "sha256": "3d1656948e7796b2bb6f3d1ac4605ea155d7562cc2ea16c47032a9e7e7222e90" }, "downloads": -1, "filename": "yg.thumpy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9c461ca90c74d2f8de7a4d5ca5bfcd56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 483554, "upload_time": "2016-08-10T09:53:14", "url": "https://files.pythonhosted.org/packages/39/bc/8ede4bd662d8ff3ac8f4dc49edbead6c9b0e932d8350c908787add87e8cd/yg.thumpy-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9c461ca90c74d2f8de7a4d5ca5bfcd56", "sha256": "3d1656948e7796b2bb6f3d1ac4605ea155d7562cc2ea16c47032a9e7e7222e90" }, "downloads": -1, "filename": "yg.thumpy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9c461ca90c74d2f8de7a4d5ca5bfcd56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 483554, "upload_time": "2016-08-10T09:53:14", "url": "https://files.pythonhosted.org/packages/39/bc/8ede4bd662d8ff3ac8f4dc49edbead6c9b0e932d8350c908787add87e8cd/yg.thumpy-1.0.1.tar.gz" } ] }