{ "info": { "author": "Caitlyn Finn", "author_email": "caitlynannefinn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Other Audience", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Multimedia :: Graphics :: Graphics Conversion" ], "description": "\n![PyPI](https://img.shields.io/pypi/v/web-mage?color=blue&label=PyPI%20version)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/web-mage?label=Downloads)\n\nweb-mage\n========\n\nweb-mage is a simple Python package that's used to automate the process\nof optimizing image files for the web. It can be imported and customized\nin a Python module, or run simply as a command-line utility.\n\nThis project is functional, but still in early development.\n\nInstallation\n------------\n\nInstall using `pip`:\n```bash\npip install web-mage\n```\n\nUsage\n-----\n\n```bash\npython3 -m web_mage SOURCE_DIR DEST_DIR\n```\n\nThis will optimize all files in `SOURCE_DIR` to 60% quality with no image resizing,\nand output them to `DEST_DIR` with a filename suffix.\n\nUsage in Code\n-------------\n\nThis is the preferred method of usage. You can import web-mage into\nPython if you want to run jobs in a script or program, or customize\nthe way images are optimized.\n\n```python\nfrom web_mage.web_mage import Job\nfrom web_mage.formats import IMG_FORMAT_CONTENT_LARGE\n\nformats = [IMG_FORMAT_CONTENT_LARGE]\noptim_job = Job(source=\"/path/to/source/directory\",\n dest=\"/path/to/output/directory\",\n formats=formats)\noptim_job.run()\n```\n\nYou can use multiple formats if you want images to be optimized for\nmultiple different devices or layouts. You can also define your own\nimage formats based on a few different parameters.\n\n```python\nfrom web_mage.formats import (ImageFormat,\n IMG_FORMAT_CONTENT_LARGE,\n IMG_FORMAT_CONTENT_MEDIUM,\n IMG_FORMAT_CONTENT_SMALL)\n\nmy_format = ImageFormat(max_width=1024, # Image will be resized based on dimensions.\n max_height=768,\n min_quality=85, # This will optimize to 85% quality.\n tag=\"my_format\") # Tags are appended to the filename of the\n # resulting file so multiple output formats\n # can be distinguished.\nmy_other_format = ImageFormat(max_dimension=1280, # This will ensure that neither height\n # nor width will exceed 1280 pixels.\n tag=\"my_other_format\")\n\nformats = [IMG_FORMAT_CONTENT_LARGE,\n IMG_FORMAT_CONTENT_MEDIUM,\n IMG_FORMAT_CONTENT_SMALL,\n my_format,\n my_other_format]\n```\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/c8bit/web-mage", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "web-mage", "package_url": "https://pypi.org/project/web-mage/", "platform": "", "project_url": "https://pypi.org/project/web-mage/", "project_urls": { "Homepage": "https://github.com/c8bit/web-mage" }, "release_url": "https://pypi.org/project/web-mage/0.2.0/", "requires_dist": [ "Pillow" ], "requires_python": ">=3.6.0", "summary": "Small package that optimizes images for the web.", "version": "0.2.0" }, "last_serial": 5618925, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7f9e9d8589a8a48d2fe67fe99bf45169", "sha256": "4d914a3eaa3974a01f7588286697dfb7bca08d955369c732542a01227cd5161f" }, "downloads": -1, "filename": "web_mage-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7f9e9d8589a8a48d2fe67fe99bf45169", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4552, "upload_time": "2019-07-16T13:23:32", "url": "https://files.pythonhosted.org/packages/63/c5/771235c2b537b902eeab219d1401d6573c9cfd188e3efc4adb2ba2183f01/web_mage-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7fb855527fe251f086d72c731ed6a5df", "sha256": "413ef11518b4832e0a13b1c275f445000655da746dd609aa7a3a9547b4d12ce1" }, "downloads": -1, "filename": "web_mage-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7fb855527fe251f086d72c731ed6a5df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4788, "upload_time": "2019-07-16T13:23:34", "url": "https://files.pythonhosted.org/packages/6b/b4/3d64f128530dc8750b13e5003fdcca3b300f23e2e19432c4c23cd084f4c4/web_mage-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e6f446235bfe984b3044a61a999e6f2d", "sha256": "ba380d372fca51cf6cfba8055a05cc678466cc1a3a7367b7ddec127a34f2ad79" }, "downloads": -1, "filename": "web_mage-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e6f446235bfe984b3044a61a999e6f2d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4662, "upload_time": "2019-07-27T03:21:43", "url": "https://files.pythonhosted.org/packages/d5/66/6761e77cad9f81c6ed9465d83b4123c843092e85e7128d618a2fd04e5e64/web_mage-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e20a1008802135af9906b1cc0f6a0d00", "sha256": "57fd3b0126b0025fdcceb1a94e82387683b3a1b81eb6a535b0fbdcb420c5b139" }, "downloads": -1, "filename": "web_mage-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e20a1008802135af9906b1cc0f6a0d00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4925, "upload_time": "2019-07-27T03:21:45", "url": "https://files.pythonhosted.org/packages/e5/48/fe3c0d3e1a7c86c3f50350cc2472cd966e54e0c96d396d559f390b3a24ee/web_mage-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ca8382df960e47f0740cac3be3336a79", "sha256": "3a95d2e80d8354cf64160fd5b63c6823ea0d343b3cdadab952bf1d0c78e0b1d0" }, "downloads": -1, "filename": "web_mage-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca8382df960e47f0740cac3be3336a79", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 5690, "upload_time": "2019-08-01T13:59:31", "url": "https://files.pythonhosted.org/packages/29/e1/b1a04df8e979a8dde80b62e5e74a432266712829c182ec6817e2f0c76a6c/web_mage-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfd875f12c3db06324319bcd89a39f94", "sha256": "8088676a9d4f6c65e5e110f89cabe9b06c7e9fbfda142a84101d63ad43f74af3" }, "downloads": -1, "filename": "web_mage-0.2.0.tar.gz", "has_sig": false, "md5_digest": "cfd875f12c3db06324319bcd89a39f94", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 6083, "upload_time": "2019-08-01T13:59:34", "url": "https://files.pythonhosted.org/packages/26/d3/d97a89415a8949009bd4406c7a281740c6c203a74bc270866f637be98e31/web_mage-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ca8382df960e47f0740cac3be3336a79", "sha256": "3a95d2e80d8354cf64160fd5b63c6823ea0d343b3cdadab952bf1d0c78e0b1d0" }, "downloads": -1, "filename": "web_mage-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca8382df960e47f0740cac3be3336a79", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 5690, "upload_time": "2019-08-01T13:59:31", "url": "https://files.pythonhosted.org/packages/29/e1/b1a04df8e979a8dde80b62e5e74a432266712829c182ec6817e2f0c76a6c/web_mage-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfd875f12c3db06324319bcd89a39f94", "sha256": "8088676a9d4f6c65e5e110f89cabe9b06c7e9fbfda142a84101d63ad43f74af3" }, "downloads": -1, "filename": "web_mage-0.2.0.tar.gz", "has_sig": false, "md5_digest": "cfd875f12c3db06324319bcd89a39f94", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 6083, "upload_time": "2019-08-01T13:59:34", "url": "https://files.pythonhosted.org/packages/26/d3/d97a89415a8949009bd4406c7a281740c6c203a74bc270866f637be98e31/web_mage-0.2.0.tar.gz" } ] }