{ "info": { "author": "mek", "author_email": "michael.karpeles@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "iiif2\n=====\n\n.. image:: https://travis-ci.org/mekarpeles/iiif2.svg\n :target: https://travis-ci.org/mekarpeles/iiif2\n\nAn implementation of the IIIF Image API 2.0 Specification \n\nInstallation\n------------\n\n.. code:: bash\n\n $ pip3 install iiif2\n\nUsage\n-----\n\nThe iiif2 library includes an image processing component called IIIF,\nresponsible for implementing the iiif image processing pipeline, and a\nParse utility capable of extracting iiif parameters and their data\nfrom uris.\n\n.. code:: python\n\n from iiif2 import IIIF\n from iiif2.web import Parse\n\nYou can combine the IIIF and Parse objects to create iiif 2.0 image\ntiles using only:\n\n- a iiif image 2.0 uri and\n- a resolved image filepath\n\nAn image path may be provided in one of two ways. First, it can be\nmanually specified as a string:\n\n.. code:: python\n\n from iiif2 import IIIF, web\n\n url = 'https://stacks.stanford.edu/image/iiif/'\n 'ff139pd0160%252FK90113-43/full/full/0/default.jpg'\n\n # a web server can return a rendered tile directly\n # without ever saving tile to disk. Works on read-only fs:\n tile = IIIF.render('images/file.jpg', *web.Parse(url)) \n\n # if we want, we can save tile (e.g. for caching)\n tile.save('cache/%s' % web.urihash(url))\n\n\nExample Web Service\n-------------------\n\nAn entire IIIF Web Service written in Flask in ~30 lines of code is\nprovided in the examples/ folder.\n\n.. code:: python\n\n import os.path\n from flask import Flask, request, jsonify, send_file\n from iiif2 import IIIF, web\n\n PATH = os.path.dirname(os.path.realpath(__file__))\n app = Flask(__name__)\n\n\n @app.route('//info.json')\n def info(identifier):\n\t return jsonify(web.info(request.url_root, identifier))\n\n\n @app.route('/////.')\n def iiif(**kwargs):\n\tparams = web.Parse.params(**kwargs)\n\tpath = resolve(params.get('identifier'))\n\twith IIIF.render(path, **params) as tile:\n return send_file(tile, mimetype=tile.mime)\n\n\n def resolve(identifier):\n \"\"\"Resolves a iiif identifier to the resource's path on disk.\n This method is specific to this server's architecture.\n \"\"\"\n return os.path.join(PATH, 'images', '%s.jpg' % identifier)\n\n\n if __name__ == \"__main__\":\n app.run(debug=True)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "iiif.io", "keywords": null, "license": "LICENSE", "maintainer": null, "maintainer_email": null, "name": "iiif2", "package_url": "https://pypi.org/project/iiif2/", "platform": "any", "project_url": "https://pypi.org/project/iiif2/", "project_urls": { "Download": "UNKNOWN", "Homepage": "iiif.io" }, "release_url": "https://pypi.org/project/iiif2/0.0.32/", "requires_dist": null, "requires_python": null, "summary": "An implementation of the IIIF Image API 2.0 Specification", "version": "0.0.32" }, "last_serial": 1708780, "releases": { "0.0.1": [], "0.0.3": [ { "comment_text": "", "digests": { "md5": "46dc71c636683749904a493bb8bc7759", "sha256": "3a5f0478ae5651b52e8b45687b28273f3aca4f3ce98fe439e546293f7104b0c5" }, "downloads": -1, "filename": "iiif2-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "46dc71c636683749904a493bb8bc7759", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9577, "upload_time": "2015-07-28T14:44:17", "url": "https://files.pythonhosted.org/packages/d1/07/bafe4242393048076d8a7095f542e2dee2dea43fd8c22c12044305a15bf1/iiif2-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "93e43533c9d6035cadbcaa8288c13a60", "sha256": "9ad27c3bf213cd56f459f4beee2bda256475eca05c62d819fa29fe84560011b3" }, "downloads": -1, "filename": "iiif2-0.0.3.tar.gz", "has_sig": false, "md5_digest": "93e43533c9d6035cadbcaa8288c13a60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6751, "upload_time": "2015-07-28T14:44:20", "url": "https://files.pythonhosted.org/packages/85/38/77fb95b4f447665aca4da7e457b2bc6210b9d4526300ea6f26698c563a7d/iiif2-0.0.3.tar.gz" } ], "0.0.31": [ { "comment_text": "", "digests": { "md5": "865dd946a75fca428d0e8f202ea910f0", "sha256": "4e5a91dc267d5faec1fd612403082cc972e63aa15c98cefe34582ba288c688ae" }, "downloads": -1, "filename": "iiif2-0.0.31-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "865dd946a75fca428d0e8f202ea910f0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9618, "upload_time": "2015-07-30T21:42:28", "url": "https://files.pythonhosted.org/packages/dd/7d/c813603ac5de6079cb8a074358ab1dbef0ff37b4fb5bbf417e5600ee0e8e/iiif2-0.0.31-py2.py3-none-any.whl" } ], "0.0.32": [ { "comment_text": "", "digests": { "md5": "23948ea30f1178839cd29f40b48bfbce", "sha256": "2ee36801319d01843541cd5276e3633e3758d5ca56e00c4649a7d2a37aabe2ea" }, "downloads": -1, "filename": "iiif2-0.0.32-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "23948ea30f1178839cd29f40b48bfbce", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 9619, "upload_time": "2015-09-04T22:41:50", "url": "https://files.pythonhosted.org/packages/4a/09/bfc4214ab30e348851727ce61f91f66592f13e0cc2f9d8a45c829a754a83/iiif2-0.0.32-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "77f2218368183b6a6d01dc76490d61cd", "sha256": "592d0b44b9e6da8ad7d3abd94a5853b20235b1c6b080fc5fd5d9e0cbe41bc075" }, "downloads": -1, "filename": "iiif2-0.0.32.tar.gz", "has_sig": false, "md5_digest": "77f2218368183b6a6d01dc76490d61cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6792, "upload_time": "2015-09-04T22:41:46", "url": "https://files.pythonhosted.org/packages/fe/d6/acda542aef303068d2769c5f8d7d6aab3649c0700f62f111e7de707024d7/iiif2-0.0.32.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "23948ea30f1178839cd29f40b48bfbce", "sha256": "2ee36801319d01843541cd5276e3633e3758d5ca56e00c4649a7d2a37aabe2ea" }, "downloads": -1, "filename": "iiif2-0.0.32-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "23948ea30f1178839cd29f40b48bfbce", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 9619, "upload_time": "2015-09-04T22:41:50", "url": "https://files.pythonhosted.org/packages/4a/09/bfc4214ab30e348851727ce61f91f66592f13e0cc2f9d8a45c829a754a83/iiif2-0.0.32-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "77f2218368183b6a6d01dc76490d61cd", "sha256": "592d0b44b9e6da8ad7d3abd94a5853b20235b1c6b080fc5fd5d9e0cbe41bc075" }, "downloads": -1, "filename": "iiif2-0.0.32.tar.gz", "has_sig": false, "md5_digest": "77f2218368183b6a6d01dc76490d61cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6792, "upload_time": "2015-09-04T22:41:46", "url": "https://files.pythonhosted.org/packages/fe/d6/acda542aef303068d2769c5f8d7d6aab3649c0700f62f111e7de707024d7/iiif2-0.0.32.tar.gz" } ] }