{ "info": { "author": "Caleb Hattingh", "author_email": "caleb.hattingh@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://img.shields.io/badge/stdlib--only-yes-green.svg\n :target: https://img.shields.io/badge/stdlib--only-yes-green.svg\n\n.. image:: https://travis-ci.org/cjrh/cjrh_template.svg?branch=master\n :target: https://travis-ci.org/cjrh/cjrh_template\n\n.. image:: https://coveralls.io/repos/github/cjrh/cjrh_template/badge.svg?branch=master\n :target: https://coveralls.io/github/cjrh/cjrh_template?branch=master\n\n.. image:: https://img.shields.io/pypi/pyversions/cjrh_template.svg\n :target: https://pypi.python.org/pypi/cjrh_template\n\n.. image:: https://img.shields.io/github/tag/cjrh/cjrh_template.svg\n :target: https://img.shields.io/github/tag/cjrh/cjrh_template.svg\n\n.. image:: https://img.shields.io/badge/install-pip%20install%20cjrh_template-ff69b4.svg\n :target: https://img.shields.io/badge/install-pip%20install%20cjrh_template-ff69b4.svg\n\n.. image:: https://img.shields.io/pypi/v/cjrh_template.svg\n :target: https://img.shields.io/pypi/v/cjrh_template.svg\n\n.. image:: https://img.shields.io/badge/calver-YYYY.MM.MINOR-22bfda.svg\n :target: http://calver.org/\n\ncjrh_template\n=============\n\nThis package offers a very thin subclass of ``string.Template``\nwhich adds a few extra features to the standard library class.\n\n**NOTE: this package has no dependencies and will therefore not incur an\nadditional 3rd-party dependency cost. This is intentional and will not\nchange.**\n\nGet var names in the template\n-----------------------------\n\nThe ``placeholders()`` method returns a generator of the variable names\ninside the template:\n\n.. code:: python\n\n # main.py\n from cjrh_template import Template\n s = '$person1 gave $object to $person2'\n tmpl = Template(s)\n print(list(tmpl.placeholders()))\n\nOutput:\n\n.. code:: bash\n\n $ python main.py\n ['person1', 'object', 'person2']\n\nA typical use-case for this is to be able to see a UI with the required\nparameters for template substitution. Also, note that the method returns\na generator that will return the names sequentially in a memory-efficient\nway.\n\nThere is also an ``allow_repeats`` parameter to ``placeholders()`` that will\nallow the generator to return even repeated variable names, depending on the\nsequence in which they're found in the template. This could be used to generate\nfrequency counts of variable names. Default is ``False``.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cjrh/cjrh_template", "keywords": "string.Template Template", "license": "", "maintainer": "", "maintainer_email": "", "name": "cjrh_template", "package_url": "https://pypi.org/project/cjrh_template/", "platform": "", "project_url": "https://pypi.org/project/cjrh_template/", "project_urls": { "Homepage": "https://github.com/cjrh/cjrh_template" }, "release_url": "https://pypi.org/project/cjrh_template/2017.10.18/", "requires_dist": null, "requires_python": "", "summary": "Subclass for string.Template: adds placeholders() method. ", "version": "2017.10.18" }, "last_serial": 3255578, "releases": { "2017.10.17": [ { "comment_text": "", "digests": { "md5": "831f995d52c2090c26956c0856b78fdb", "sha256": "410f6bb04aa00dc2ce62cce01fed1f0c1f3d557b70b6c21401271ba83b85fb05" }, "downloads": -1, "filename": "cjrh_template-2017.10.17-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "831f995d52c2090c26956c0856b78fdb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14847, "upload_time": "2017-10-17T05:40:56", "url": "https://files.pythonhosted.org/packages/1f/be/309cfdae6ce187843e1ad121f7bfec9d01098b590771b72651db63c735d9/cjrh_template-2017.10.17-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f9dfb928dc0cf68ecb5d0f349dd25cd", "sha256": "a4ab8a0e90e4adccb952343306ad0ded067b3393ce83a13cc37c9483b3e65e91" }, "downloads": -1, "filename": "cjrh_template-2017.10.17.tar.gz", "has_sig": false, "md5_digest": "6f9dfb928dc0cf68ecb5d0f349dd25cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7106, "upload_time": "2017-10-17T05:40:59", "url": "https://files.pythonhosted.org/packages/4a/15/0decc6f865636f31d47eea52ff874e44b641f7bfdc09ac57a4c84e22bb31/cjrh_template-2017.10.17.tar.gz" } ], "2017.10.18": [ { "comment_text": "", "digests": { "md5": "577f687754d71b7c70e2052beec30b37", "sha256": "673adcf024189c0f234886c962b3a4b62ff511b3c9ce1adf1e376d586d65e8e2" }, "downloads": -1, "filename": "cjrh_template-2017.10.18-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "577f687754d71b7c70e2052beec30b37", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14871, "upload_time": "2017-10-17T05:48:26", "url": "https://files.pythonhosted.org/packages/c3/72/dd1385217ff7102cf5ae25d512bfd4e5078f5db40f956281756aa81867d1/cjrh_template-2017.10.18-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d2af010229d977b96b140b150721000", "sha256": "6f814bd21e43ba7cd6f7f4f4019939f573701be9873ce44bb76b0772dbe3b27f" }, "downloads": -1, "filename": "cjrh_template-2017.10.18.tar.gz", "has_sig": false, "md5_digest": "2d2af010229d977b96b140b150721000", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7141, "upload_time": "2017-10-17T05:48:29", "url": "https://files.pythonhosted.org/packages/66/a2/b7d25c9f51621ee2de3b33b60ba148f794705aded639399dc9bc19f5b5a6/cjrh_template-2017.10.18.tar.gz" } ], "2017.5.1": [], "2017.5.2": [ { "comment_text": "", "digests": { "md5": "299516022eef013f2e5c492ad1521d22", "sha256": "234c0f46c3b37a91b4b9cac275fc9fc352b3d9ffa2f2c10c7d16bd25f28c557f" }, "downloads": -1, "filename": "cjrh_template-2017.5.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "299516022eef013f2e5c492ad1521d22", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2751, "upload_time": "2017-05-07T01:04:06", "url": "https://files.pythonhosted.org/packages/8f/a8/e038fa35899160dfed5c8ed92443c6e2a1ff2c6ec6abf7303b3d26509b66/cjrh_template-2017.5.2-py2.py3-none-any.whl" } ], "2017.5.3": [ { "comment_text": "", "digests": { "md5": "4183ddfaa13f786f9b0ee27c0b95b440", "sha256": "43466ffc1a1b515097f41b504251f06b119832cadc60aa8572d5629f85a1c4cb" }, "downloads": -1, "filename": "cjrh_template-2017.5.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4183ddfaa13f786f9b0ee27c0b95b440", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2880, "upload_time": "2017-05-07T01:10:58", "url": "https://files.pythonhosted.org/packages/b2/7d/ba9422ce3e0f34f7ac1800c2d53521e66817969223127502d63371cc1a2c/cjrh_template-2017.5.3-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "577f687754d71b7c70e2052beec30b37", "sha256": "673adcf024189c0f234886c962b3a4b62ff511b3c9ce1adf1e376d586d65e8e2" }, "downloads": -1, "filename": "cjrh_template-2017.10.18-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "577f687754d71b7c70e2052beec30b37", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14871, "upload_time": "2017-10-17T05:48:26", "url": "https://files.pythonhosted.org/packages/c3/72/dd1385217ff7102cf5ae25d512bfd4e5078f5db40f956281756aa81867d1/cjrh_template-2017.10.18-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d2af010229d977b96b140b150721000", "sha256": "6f814bd21e43ba7cd6f7f4f4019939f573701be9873ce44bb76b0772dbe3b27f" }, "downloads": -1, "filename": "cjrh_template-2017.10.18.tar.gz", "has_sig": false, "md5_digest": "2d2af010229d977b96b140b150721000", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7141, "upload_time": "2017-10-17T05:48:29", "url": "https://files.pythonhosted.org/packages/66/a2/b7d25c9f51621ee2de3b33b60ba148f794705aded639399dc9bc19f5b5a6/cjrh_template-2017.10.18.tar.gz" } ] }