{ "info": { "author": "RobertoPrevato", "author_email": "roberto.prevato@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "[![Build Status](https://dev.azure.com/robertoprevato/Nest/_apis/build/status/RobertoPrevato.Gallerist?branchName=master)](https://dev.azure.com/robertoprevato/Nest/_build/latest?definitionId=26&branchName=master) [![pypi](https://img.shields.io/pypi/v/Gallerist.svg?color=blue)](https://pypi.org/project/Gallerist/)\n\n# Gallerist\nClasses and methods to handle pictures for the web, using [Pillow](https://pillow.readthedocs.io).\n\n```bash\n$ pip install gallerist\n```\n\n## Features\n* Code api to handle the generation of pictures in various sizes (e.g. medium size picture, small size, thumbnail)\n* Both asynchronous api and synchronous api\n* Supports user defined stores for binaries, for example to read and write files in [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/), or [AWS S3](https://aws.amazon.com/s3/)\n* Supports scaling animated GIF files\n* Maintain PNG transparencies\n* Handles by default JPG, PNG, GIF, MPO; and provides a code api to support adding more supported formats\n\n## Examples\nBasic example using the synchronous api, and reading files from file system:\n\n```python\nfrom gallerist import Gallerist\nfrom gallerist.fs import FileSystemSyncFileStore\n\n\ngallerist = Gallerist(FileSystemSyncFileStore('tests'))\n\n\nmetadata = gallerist.process_image('files/blacksheep.png')\n```\n\n#### Configuring sizes\n\n```python\nfrom gallerist import Gallerist, ImageSize\nfrom gallerist.fs import FileSystemSyncFileStore\n\n\nstore = FileSystemSyncFileStore('tests')\n\n# configuring sizes by mime (use '*' to match any mime):\ngallerist = Gallerist(store, sizes={\n 'image/jpeg': [\n ImageSize('a', 500),\n ImageSize('b', 400),\n ImageSize('c', 300)\n ],\n 'image/png': [\n ImageSize('a', 350),\n ImageSize('b', 250),\n ImageSize('c', 150)\n ]\n})\n```\n\n#### Implementing a custom file store\n\n```python\nfrom gallerist.abc import FileStore, SyncFileStore\n\n\nclass MyAsyncFileStore(FileStore):\n \"\"\"Implement your async file store, then use gallerist.process_image_async method\"\"\"\n\n async def read_file(self, file_path: str) -> bytes:\n pass\n\n async def write_file(self, file_path: str, data: bytes):\n pass\n\n async def delete_file(self, file_path: str):\n pass\n\n\nclass MySyncFileStore(SyncFileStore):\n \"\"\"Implement your sync file store, then use gallerist.process_image method\"\"\"\n\n def read_file(self, file_path: str) -> bytes:\n pass\n\n def write_file(self, file_path: str, data: bytes):\n pass\n\n def delete_file(self, file_path: str):\n pass\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/RobertoPrevato/Gallerist", "keywords": "pictures images web", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gallerist", "package_url": "https://pypi.org/project/gallerist/", "platform": "", "project_url": "https://pypi.org/project/gallerist/", "project_urls": { "Homepage": "https://github.com/RobertoPrevato/Gallerist" }, "release_url": "https://pypi.org/project/gallerist/0.0.4/", "requires_dist": [ "aiofiles", "Pillow" ], "requires_python": "", "summary": "Classes and methods to handle pictures for the web", "version": "0.0.4" }, "last_serial": 5868282, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4738da6820da51ac670de612791b8c7f", "sha256": "18c13fdb2d3f89d5f8e3d926f4e0246d5645aecd8c664128d64578370bd94239" }, "downloads": -1, "filename": "gallerist-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4738da6820da51ac670de612791b8c7f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7671, "upload_time": "2019-09-20T18:22:16", "url": "https://files.pythonhosted.org/packages/b7/35/74c3ef8175649e7587c15698e8e28b65dd5d5533f0f0cdc9b1e9dcd8181d/gallerist-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8803cb00a876f60d51ae2a94df1cf9f1", "sha256": "b3257a3cc7d37db73cd52a765869ac900d0d89a093ae53e1901772159bcdee19" }, "downloads": -1, "filename": "gallerist-0.0.1.tar.gz", "has_sig": false, "md5_digest": "8803cb00a876f60d51ae2a94df1cf9f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6007, "upload_time": "2019-09-20T18:22:18", "url": "https://files.pythonhosted.org/packages/92/2d/612414b87d9b5dfa81cb8ad9577034f54d2b6f6144c3a0710e931146de14/gallerist-0.0.1.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "2a586198b97b19731701858e61db19f7", "sha256": "28a95cb7d4583a3c8bceae5f1dd66bc65d2cfb90b36ac65905f6f76cb58bc3b0" }, "downloads": -1, "filename": "gallerist-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "2a586198b97b19731701858e61db19f7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8072, "upload_time": "2019-09-21T10:06:53", "url": "https://files.pythonhosted.org/packages/5f/31/f203932e77798271a69c3d8b60327b8cf8a228efbb123cabcc928f5b3f34/gallerist-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d7825e688d65464e45428a04686f7ae9", "sha256": "9b9872d9bdd7b90e3cd3d36d074a44908186d115282697b3e10957ae5a6af3d4" }, "downloads": -1, "filename": "gallerist-0.0.3.tar.gz", "has_sig": false, "md5_digest": "d7825e688d65464e45428a04686f7ae9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6371, "upload_time": "2019-09-21T10:06:55", "url": "https://files.pythonhosted.org/packages/f5/6a/31c1f61f76aa0327f28f793264f726a5e8beeb8ab154590bcc94fd9cfc15/gallerist-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "ccbd1ade323a600ae2417d82a187e7af", "sha256": "bfe1e69ea505f20638a30d49b23377a690fc54ba7e4f80df93290866e13d4923" }, "downloads": -1, "filename": "gallerist-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "ccbd1ade323a600ae2417d82a187e7af", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8384, "upload_time": "2019-09-22T08:27:31", "url": "https://files.pythonhosted.org/packages/e8/0c/e1a1b0dcfce107ea22d2a68078a35b9ab5345a37a1e82a1b5830aa1546fe/gallerist-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b59df68bd8e1731424d641fedccaaf5c", "sha256": "94b8ada9ac355571548371a4405e28be1affc3e194d918c46339e79bca973fef" }, "downloads": -1, "filename": "gallerist-0.0.4.tar.gz", "has_sig": false, "md5_digest": "b59df68bd8e1731424d641fedccaaf5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7053, "upload_time": "2019-09-22T08:27:33", "url": "https://files.pythonhosted.org/packages/f0/67/8ddcf4087c2b761dc8d97636062d26eb266aae90ec616983da0b0726bc18/gallerist-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ccbd1ade323a600ae2417d82a187e7af", "sha256": "bfe1e69ea505f20638a30d49b23377a690fc54ba7e4f80df93290866e13d4923" }, "downloads": -1, "filename": "gallerist-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "ccbd1ade323a600ae2417d82a187e7af", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8384, "upload_time": "2019-09-22T08:27:31", "url": "https://files.pythonhosted.org/packages/e8/0c/e1a1b0dcfce107ea22d2a68078a35b9ab5345a37a1e82a1b5830aa1546fe/gallerist-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b59df68bd8e1731424d641fedccaaf5c", "sha256": "94b8ada9ac355571548371a4405e28be1affc3e194d918c46339e79bca973fef" }, "downloads": -1, "filename": "gallerist-0.0.4.tar.gz", "has_sig": false, "md5_digest": "b59df68bd8e1731424d641fedccaaf5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7053, "upload_time": "2019-09-22T08:27:33", "url": "https://files.pythonhosted.org/packages/f0/67/8ddcf4087c2b761dc8d97636062d26eb266aae90ec616983da0b0726bc18/gallerist-0.0.4.tar.gz" } ] }