{ "info": { "author": "Ian Cordasco", "author_email": "graffatcolmingov@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved", "License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "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 :: Implementation :: CPython" ], "description": "uritemplate\n===========\n\nDocumentation_ -- GitHub_ -- BitBucket_ -- Travis-CI_\n\nSimple python library to deal with `URI Templates`_. The API looks like\n\n.. code-block:: python\n\n from uritemplate import URITemplate, expand\n\n # NOTE: URI params must be strings not integers\n\n gist_uri = 'https://api.github.com/users/sigmavirus24/gists{/gist_id}'\n t = URITemplate(gist_uri)\n print(t.expand(gist_id='123456'))\n # => https://api.github.com/users/sigmavirus24/gists/123456\n\n # or\n print(expand(gist_uri, gist_id='123456'))\n\n # also\n t.expand({'gist_id': '123456'})\n print(expand(gist_uri, {'gist_id': '123456'}))\n\nWhere it might be useful to have a class\n\n.. code-block:: python\n\n import requests\n\n class GitHubUser(object):\n url = URITemplate('https://api.github.com/user{/login}')\n def __init__(self, name):\n self.api_url = url.expand(login=name)\n response = requests.get(self.api_url)\n if response.status_code == 200:\n self.__dict__.update(response.json())\n\nWhen the module containing this class is loaded, ``GitHubUser.url`` is \nevaluated and so the template is created once. It's often hard to notice in \nPython, but object creation can consume a great deal of time and so can the \n``re`` module which uritemplate relies on. Constructing the object once should \nreduce the amount of time your code takes to run.\n\nInstalling\n----------\n\n::\n\n pip install uritemplate.py\n\nLicense\n-------\n\nModified BSD license_\n\n\n.. _Documentation: http://uritemplate.rtfd.org/\n.. _GitHub: https://github.com/sigmavirus24/uritemplate\n.. _BitBucket: https://bitbucket.org/icordasc/uritemplate\n.. _Travis-CI: https://travis-ci.org/sigmavirus24/uritemplate\n.. _URI Templates: http://tools.ietf.org/html/rfc6570\n.. _license: https://github.com/sigmavirus24/uritemplate/blob/master/LICENSE\n\n\nChangelog - uritemplate\n=======================\n\n2.0.0 - 2016-08-29\n------------------\n\n- Merge uritemplate.py into uritemplate\n\n\nChangelog - uritemplate.py\n==========================\n\n2.0.0 - 2016-08-20\n------------------\n\n- Relicense uritemplate.py as Apache 2 and BSD (See\n https://github.com/sigmavirus24/uritemplate/pull/23)\n\n1.0.1 - 2016-08-18\n------------------\n\n- Fix some minor packaging problems.\n\n1.0.0 - 2016-08-17\n------------------\n\n- Fix handling of Unicode values on Python 2.6 and 2.7 for urllib.quote.\n\n- Confirm public stable API via version number.\n\n0.3.0 - 2013-10-22\n------------------\n\n- Add ``#partial`` to partially expand templates and return new instances of \n ``URITemplate``.\n\n0.2.0 - 2013-07-26\n------------------\n\n- Refactor the library a bit and add more tests.\n\n- Backwards incompatible with 0.1.x if using ``URIVariable`` directly from\n ``uritemplate.template``\n\n0.1.1 - 2013-05-19\n------------------\n\n- Add ability to get set of variable names in the current URI\n\n- If there is no value or default given, simply return an empty string\n\n- Fix sdist\n\n0.1.0 - 2013-05-14\n------------------\n\n- Initial Release\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://uritemplate.readthedocs.org", "keywords": "", "license": "BSD 3-Clause License or Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "uritemplate", "package_url": "https://pypi.org/project/uritemplate/", "platform": "", "project_url": "https://pypi.org/project/uritemplate/", "project_urls": { "Homepage": "https://uritemplate.readthedocs.org" }, "release_url": "https://pypi.org/project/uritemplate/3.0.0/", "requires_dist": null, "requires_python": "", "summary": "URI templates", "version": "3.0.0" }, "last_serial": 2312274, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "f1916193845a32ab298e9f385f2415a7", "sha256": "0a41aa4a217d82303ca860b9cdf92c1c044752a2205f41b61808ace4ca0fc168" }, "downloads": -1, "filename": "uritemplate-0.5.tar.gz", "has_sig": false, "md5_digest": "f1916193845a32ab298e9f385f2415a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3027, "upload_time": "2012-05-11T03:59:52", "url": "https://files.pythonhosted.org/packages/a8/e7/fbce648b46d95520b296b7951bc3e7996d40db54eedcd0dfa1876a532e74/uritemplate-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "ab391a688552bc849594f5e40be4c996", "sha256": "73174391962d954d907c64332cda21b514b1878b63a1a212ebdcd89a3a407632" }, "downloads": -1, "filename": "uritemplate-0.5.1.tar.gz", "has_sig": false, "md5_digest": "ab391a688552bc849594f5e40be4c996", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3022, "upload_time": "2012-05-11T04:18:20", "url": "https://files.pythonhosted.org/packages/0c/c5/ffa3b9dda6161fb8f4073141eea38fa97e496dd38035b4c72b0ef1d2b362/uritemplate-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "88293fb6afb2c70abbb5ee5dfb29e6c0", "sha256": "423dd22215a581dcea31691e6763a08c2269a21535099a084a5c643a711edfd7" }, "downloads": -1, "filename": "uritemplate-0.5.2.tar.gz", "has_sig": false, "md5_digest": "88293fb6afb2c70abbb5ee5dfb29e6c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3163, "upload_time": "2013-02-14T00:45:34", "url": "https://files.pythonhosted.org/packages/41/36/d3ea386483707b6b03e243ab5490d8d4d19c506486cf8cfa5b40008d9c59/uritemplate-0.5.2.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "ecfc1ea8d62c7f2b47aad625afae6173", "sha256": "a30e230aeb7ebedbcb5da9999a17fa8a30e512e6d5b06f73d47c6e03c8e357fd" }, "downloads": -1, "filename": "uritemplate-0.6.tar.gz", "has_sig": false, "md5_digest": "ecfc1ea8d62c7f2b47aad625afae6173", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3508, "upload_time": "2013-08-28T04:14:09", "url": "https://files.pythonhosted.org/packages/5a/6d/66aed916219c1a25e12a01457ea5442f80e54ed3844ef688b25e20dada5f/uritemplate-0.6.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "a4fd0c44561ebc7c45ba65810dea8e87", "sha256": "9f81708f73de17e080c12c81906290be2c97a69ca8f6c8bc787c3cad12288541" }, "downloads": -1, "filename": "uritemplate-2.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "a4fd0c44561ebc7c45ba65810dea8e87", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10418, "upload_time": "2016-08-30T00:12:19", "url": "https://files.pythonhosted.org/packages/7a/6b/37b80c80bc5c5a600dd0dc56351de0f8421de95a929e25245f0fac1b5050/uritemplate-2.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "34c75eff2888508ebe9da79cb1c154a2", "sha256": "c20c7e024535f9ef0130c5694159ce6210f703f8a7d813a602b020455052b5bf" }, "downloads": -1, "filename": "uritemplate-2.0.0.tar.gz", "has_sig": false, "md5_digest": "34c75eff2888508ebe9da79cb1c154a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30054, "upload_time": "2016-08-30T00:12:22", "url": "https://files.pythonhosted.org/packages/ba/83/069aee6d676e890b638c7c7da60063ff6abce00b4bb59d9a9e6249131bfa/uritemplate-2.0.0.tar.gz" } ], "2.0.0rc1": [ { "comment_text": "", "digests": { "md5": "ee70a668fb4694040428794059baa7b3", "sha256": "22d028c9733089a014998f015337020b25ab08dd3eea663cfd01f7f182356555" }, "downloads": -1, "filename": "uritemplate-2.0.0rc1-py2-none-any.whl", "has_sig": false, "md5_digest": "ee70a668fb4694040428794059baa7b3", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10271, "upload_time": "2016-08-20T12:05:45", "url": "https://files.pythonhosted.org/packages/32/42/d5edeb07d44ccb83ced5356b0d75f1f60aa8455cbe42b6f1e5db7b523de5/uritemplate-2.0.0rc1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f6f2d275a0eb9abc1530dc90497685c1", "sha256": "e0dd0052b2fe2797db325e069d805d1501ce3eda6ed51e1e5ac282b5ff686648" }, "downloads": -1, "filename": "uritemplate-2.0.0rc1.tar.gz", "has_sig": false, "md5_digest": "f6f2d275a0eb9abc1530dc90497685c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29861, "upload_time": "2016-08-20T12:05:47", "url": "https://files.pythonhosted.org/packages/0f/02/ea3394cf49c5efcb6fd78294179cb621bd88d88bca2df3095c6b1595c0f4/uritemplate-2.0.0rc1.tar.gz" } ], "2.0.0rc2": [ { "comment_text": "", "digests": { "md5": "2807f319b9e0a87bf868da26314cc492", "sha256": "cbf6c274edcda6c264626408b91f63713174e1ac491925dd0928365b56014a95" }, "downloads": -1, "filename": "uritemplate-2.0.0rc2-py2-none-any.whl", "has_sig": false, "md5_digest": "2807f319b9e0a87bf868da26314cc492", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10404, "upload_time": "2016-08-23T21:23:17", "url": "https://files.pythonhosted.org/packages/05/cf/98cd9ec86a8b5962f884f87b92e81f3716335e28ec3f4ccddb2abb415633/uritemplate-2.0.0rc2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6105faafc726b5f697fc2a4f63384e3a", "sha256": "89ef94992a8336449819178302d75d4ab6ea865c6fa826eebf7767401cd45774" }, "downloads": -1, "filename": "uritemplate-2.0.0rc2.tar.gz", "has_sig": false, "md5_digest": "6105faafc726b5f697fc2a4f63384e3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29984, "upload_time": "2016-08-23T21:23:21", "url": "https://files.pythonhosted.org/packages/a4/b9/427bef1ffcae381e194f51874b708d7c1ec3ee25b4d41619136fcdd9ddca/uritemplate-2.0.0rc2.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "b420ae8183a8af42481b1c655f528dfa", "sha256": "01c69f4fe8ed503b2951bef85d996a9d22434d2431584b5b107b2981ff416fbd" }, "downloads": -1, "filename": "uritemplate-3.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "b420ae8183a8af42481b1c655f528dfa", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10425, "upload_time": "2016-08-30T00:16:47", "url": "https://files.pythonhosted.org/packages/f6/25/66a49231b44409d7f07cfcf2506a8b070ce3c99fc47cc256bea833f24791/uritemplate-3.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ab58d573c5584499b57399522e6c4945", "sha256": "1b9c467a940ce9fb9f50df819e8ddd14696f89b9a8cc87ac77952ba416e0a8fd" }, "downloads": -1, "filename": "uritemplate-3.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ab58d573c5584499b57399522e6c4945", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10428, "upload_time": "2016-08-30T00:18:46", "url": "https://files.pythonhosted.org/packages/e5/7d/9d5a640c4f8bf2c8b1afc015e9a9d8de32e13c9016dcc4b0ec03481fb396/uritemplate-3.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ec31e0d8a2eec72357b2cef4bce5945", "sha256": "c02643cebe23fc8adb5e6becffe201185bf06c40bda5c0b4028a93f1527d011d" }, "downloads": -1, "filename": "uritemplate-3.0.0.tar.gz", "has_sig": false, "md5_digest": "1ec31e0d8a2eec72357b2cef4bce5945", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30038, "upload_time": "2016-08-30T00:16:53", "url": "https://files.pythonhosted.org/packages/cd/db/f7b98cdc3f81513fb25d3cbe2501d621882ee81150b745cdd1363278c10a/uritemplate-3.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b420ae8183a8af42481b1c655f528dfa", "sha256": "01c69f4fe8ed503b2951bef85d996a9d22434d2431584b5b107b2981ff416fbd" }, "downloads": -1, "filename": "uritemplate-3.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "b420ae8183a8af42481b1c655f528dfa", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10425, "upload_time": "2016-08-30T00:16:47", "url": "https://files.pythonhosted.org/packages/f6/25/66a49231b44409d7f07cfcf2506a8b070ce3c99fc47cc256bea833f24791/uritemplate-3.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ab58d573c5584499b57399522e6c4945", "sha256": "1b9c467a940ce9fb9f50df819e8ddd14696f89b9a8cc87ac77952ba416e0a8fd" }, "downloads": -1, "filename": "uritemplate-3.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ab58d573c5584499b57399522e6c4945", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10428, "upload_time": "2016-08-30T00:18:46", "url": "https://files.pythonhosted.org/packages/e5/7d/9d5a640c4f8bf2c8b1afc015e9a9d8de32e13c9016dcc4b0ec03481fb396/uritemplate-3.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ec31e0d8a2eec72357b2cef4bce5945", "sha256": "c02643cebe23fc8adb5e6becffe201185bf06c40bda5c0b4028a93f1527d011d" }, "downloads": -1, "filename": "uritemplate-3.0.0.tar.gz", "has_sig": false, "md5_digest": "1ec31e0d8a2eec72357b2cef4bce5945", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30038, "upload_time": "2016-08-30T00:16:53", "url": "https://files.pythonhosted.org/packages/cd/db/f7b98cdc3f81513fb25d3cbe2501d621882ee81150b745cdd1363278c10a/uritemplate-3.0.0.tar.gz" } ] }