{ "info": { "author": "Federico Salerno", "author_email": "itashadd+gridder@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Multimedia :: Graphics", "Topic :: Utilities" ], "description": "# Gridder-REST\nA REST-ful API for [Gridder](https://pypi.org/project/gridder/).\nGenerate grids or tiles over existing images or as stand-alone images.\n\n## Usage\n### Server\nSet up a server and run `main.py` to be able to receive requests.\n\nBe sure to create a directory named `output` at the same level as the main script.\n\n**NOTE:** Gridder-REST stores the uploaded images and the prepared images before \nsending them back to the user, but no clean up occurs. It is the responsibility \nof the server to clean up the directory of all the png files created by \nGridder-REST.\n\n### Client\nSend a request containing, at a minimum, the `size` parameter, to one of the\navailable endpoints (see below) depending on the desired shape of the grid.\n\nSee below for a list of allowed and required parameters.\n\n## Methods\nRequests can be made with two possible methods:\n\n### GET\nGET requests create brand-new images. In addition to the `size` parameter,\n`width` and `height` parameters are required to determine the size of the output.\n\n### POST\nPOST requests draw grids over pre-existing images. In addition to the `size`\nparameter, the base image to draw on must be provided in the form-data under the\n`base` key.\n\n## Endpoints\nRequests with the allowed methods and parameters must be sent to one of the\nfollowing endpoints.\n\nAll endpoints accept GET and POST methods, with the exception of the\n`/` index endpoint, which only accepts GET.\n\n### `/`\nProvides basic usage instructions.\n\n### `/square`\nA square grid. The `size` parameter equals the side of the square.\n\n### `/vline`\nA grid of vertical lines. The `size` parameter equals the distance between \nthe lines.\n\n### `/hline`\nA grid of horizontal lines. The `size` parameter equals the distance between \nthe lines.\n\n### `/vhex`\nA grid of hexagonal tiles arranged vertically (with top and bottom being flat). \nThe `size` parameter equals the height of each hex.\n\n### `/hhex`\nA grid of hexagonal tiles arranged horizontally (with left and right being flat). \nThe `size` parameter equals the width of each hex.\n\n## Parameters\nAll parameters are optional except for `size` and, for GET method, \n`width` and `height`.\n\nWhere applicable, measures can be entered in centimetres, millimetres or inches by\nappending `cm`, `mm` or `in` to the amount.\n\n#### `size`\nDetermines the size of the grid. For details, refer to specific endpoints.\n\n#### `height`, `width`\nHeight and width of the output image. Only allowed with GET method.\n\n#### `bgcol`\nColour of the background of the image. Can be a colour name or hexadecimal colour\nvalue like `#000000`. Only allowed with GET method.\n\n#### `gridcol`\nColour of the line used to draw the grid.\n\n#### `padding`, `pt`, `pr`, `pb`, `pl`\nPadding around the grid, before the image bounds.\n\nOptions for specific padding on the top `pt`, right `pr`, bottom `pb` and left `pl`\nmargins are available and, if present, have priority over the generic `padding`\noption.\n\n#### `line`\nLine width of the lines used to draw the grid.\n\n#### `name`\nName of the output file. If an extension other than png is entered, it is used as\npart of the file name: the output will always be in png format.\n\n## Response codes\n#### 200 OK\nEverything went as expected and appropriate output was produced.\n\n#### 400 Bad Request\nA POST request was made without correctly including the base file.\n\n#### 415 Unsupported Media Type\nA POST request was made using a base file in a format unreadable by the backend.\nConvert the file to a more common format and retry.\n\n#### 422 Unprocessable Entity\nOne or more required parameter are missing or were provided in unreadable form.\n\n#### 500 Server Error\nSomething went wrong with the backend. Please contact the author providing details\non what you tried so the problem may be fixed, if it's due to a bug.\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://gitlab.com/brzrkr/gridder-rest", "keywords": "grid tile tileset image generator rest restful api", "license": "", "maintainer": "", "maintainer_email": "", "name": "gridder-rest", "package_url": "https://pypi.org/project/gridder-rest/", "platform": "", "project_url": "https://pypi.org/project/gridder-rest/", "project_urls": { "Homepage": "https://gitlab.com/brzrkr/gridder-rest", "Source": "https://gitlab.com/brzrkr/gridder-rest" }, "release_url": "https://pypi.org/project/gridder-rest/1.0.1/", "requires_dist": [ "flask-restful", "flask", "webargs", "Pillow", "gridder" ], "requires_python": ">=3.2", "summary": "REST-ful API for Gridder.", "version": "1.0.1" }, "last_serial": 4456993, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "a944aa91ed681c2750b6f1dc258a8293", "sha256": "9f295019829f83ebc377742f94b94756922a492f8d536f55be149f51e144da3c" }, "downloads": -1, "filename": "gridder_rest-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a944aa91ed681c2750b6f1dc258a8293", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.2", "size": 15503, "upload_time": "2018-11-06T11:04:42", "url": "https://files.pythonhosted.org/packages/7b/a4/fab73906aa8bb54b607a219de96b9d0e46e004b1c314f0238c1bcf21d2b1/gridder_rest-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "31f288e7b33c2699353488ccdedd9cc1", "sha256": "eb6b05e8977f43f2d04372f3979e4172199cb37997f00c1ddf3619cf2b4dc5a9" }, "downloads": -1, "filename": "gridder-rest-1.0.0.tar.gz", "has_sig": false, "md5_digest": "31f288e7b33c2699353488ccdedd9cc1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.2", "size": 16825, "upload_time": "2018-11-06T11:04:44", "url": "https://files.pythonhosted.org/packages/07/56/36786ddbbd8cdb7ea1d7a48d74da66d4eca238291134954332e2ac06aba9/gridder-rest-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "bda2413399dce771dadbf53f096f7a6e", "sha256": "5043caacf924a55221dd1ba41dd8ce25dcab983582e8ff9f6cadb16497ff1ce6" }, "downloads": -1, "filename": "gridder_rest-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bda2413399dce771dadbf53f096f7a6e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.2", "size": 17080, "upload_time": "2018-11-06T11:11:48", "url": "https://files.pythonhosted.org/packages/37/a3/0ddd2ed2b268d644f498fcf8ccf5de2f673711c1521bef284b3409f9d85c/gridder_rest-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e0b069656ea98acf5a5cc81c320d01b1", "sha256": "f8971f5929087f54664eaffb1d1518af217bcefb5bd645649f92b3c5be1b233e" }, "downloads": -1, "filename": "gridder-rest-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e0b069656ea98acf5a5cc81c320d01b1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.2", "size": 18715, "upload_time": "2018-11-06T11:11:50", "url": "https://files.pythonhosted.org/packages/f8/64/807e86741d7384d7c31f92f829a0e1709c38b5c050bc9dea99cc874bb60e/gridder-rest-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bda2413399dce771dadbf53f096f7a6e", "sha256": "5043caacf924a55221dd1ba41dd8ce25dcab983582e8ff9f6cadb16497ff1ce6" }, "downloads": -1, "filename": "gridder_rest-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bda2413399dce771dadbf53f096f7a6e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.2", "size": 17080, "upload_time": "2018-11-06T11:11:48", "url": "https://files.pythonhosted.org/packages/37/a3/0ddd2ed2b268d644f498fcf8ccf5de2f673711c1521bef284b3409f9d85c/gridder_rest-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e0b069656ea98acf5a5cc81c320d01b1", "sha256": "f8971f5929087f54664eaffb1d1518af217bcefb5bd645649f92b3c5be1b233e" }, "downloads": -1, "filename": "gridder-rest-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e0b069656ea98acf5a5cc81c320d01b1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.2", "size": 18715, "upload_time": "2018-11-06T11:11:50", "url": "https://files.pythonhosted.org/packages/f8/64/807e86741d7384d7c31f92f829a0e1709c38b5c050bc9dea99cc874bb60e/gridder-rest-1.0.1.tar.gz" } ] }