{ "info": { "author": "Andrew Aldridge", "author_email": "i80and@foxquill.com", "bugtrack_url": null, "classifiers": [], "description": ".. |travis| image:: https://travis-ci.org/i80and/fett.svg?branch=master\n :target: https://travis-ci.org/i80and/fett\n\n=============\nFett |travis|\n=============\n\nOverview\n--------\n\nExample\n-------\n\n.. code-block:: python\n\n import fett\n\n fett.Template('''{{ for customer in customers }}\n {{ if i even }}\n Even: {{ customer.name }}\n {{ else }}\n Odd: {{ customer.name }}\n {{ end }}\n {{ else }}\n No customers :(\n {{ end }}''').render({'customers': [\n {'name': 'Bob'},\n {'name': 'Elvis'},\n {'name': 'Judy'}\n ]})\n\nSyntax\n------\n\n========================================== ===========\nTag Format Description\n========================================== ===========\n``{{ }}`` Substitutions_\n``{{ `foo` }}`` Substitutions_\n``{{ format }}`` Metaformatting_\n``{{ if }}`` Conditionals_\n``{{ for in }}`` Loops_\n``{{ else }}``\n``{{ end }}`` Block termination\n``{{ # }}`` Comments_\n========================================== ===========\n\nSpaces between tag opening/closing delimiters are optional.\n\nExpressions\n~~~~~~~~~~~\n\nAn **expression** is given for Substitutions_, Conditionals_, and Loops_.\n\nExpressions take the following form:\n\n [....] [ [...]]\n\nInstead of specifying a field path, you can start an expression using\na string literal:\n\n `` [ [...]]\n\nYou can use **filters** to modify a single value in simple ways. For example,\nthe loop iteration counter ``i`` counts from ``0``, but users often wish to\ncount from ``1``. You can obtain a count-from-1 value with the expression\n``i inc``.\n\nThe full list of filters:\n\n=========== ======\nFilter Name Effect\n=========== ======\ncar Returns the first element of a list.\ncdr Returns all but the first element of a list.\ndec Decrements a value representable as an integer by one.\neven Returns true iff its input is representable as an even integer.\nescape Encodes `&`, `<`, `>`, `\"`, and `'` characters with HTML entities.\ninc Increments a value representable as an integer by one.\nlen Returns the length of a list.\nnot Returns the inverse of a boolean.\nodd Returns true iff its input is representable as an odd integer.\nnegative Returns true iff its input is representable as an integer < 0.\npositive Returns true iff its input is representable as an integer > 0.\nsplit Splits a value into a list by whitespace.\nstrip Returns the input string with surrounding whitespace removed.\nstriptags Remove HTML tags from a value.\ntimesNegOne Returns int(input) * -1\nzero Returns true iff the input is zero\n=========== ======\n\n=========== ======\nFilter Name Effect\n=========== ======\nupperCase Returns a Unicode-aware uppercase version of the input.\nlowerCase Returns a Unicode-aware lowercase version of the input.\n=========== ======\n\n===================== ======\nFilter Name Effect\n===================== ======\nadd(n) Increments a value representable as an integer by `n`.\nminus(n) Decrements a value representable as an integer by `n`.\nequal(value) Returns true iff a value equals the given value.\nlessThan(n) Returns true iff n < the given value.\nlessThanOrEqual(n) Returns true iff n <= the given value.\ngreaterThan(n) Returns true iff n > the given value.\ngreaterThanOrEqual(n) Returns true iff n >= the given value.\n===================== ======\n\nSubstitutions\n~~~~~~~~~~~~~\n\nMetaformatting\n~~~~~~~~~~~~~~\n\nConditionals\n~~~~~~~~~~~~\n\nLoops\n~~~~~\n\nComments\n~~~~~~~~", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/i80and/fett", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "fett", "package_url": "https://pypi.org/project/fett/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/fett/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/i80and/fett" }, "release_url": "https://pypi.org/project/fett/0.3.2/", "requires_dist": null, "requires_python": null, "summary": "A fast indentation-preserving template engine.", "version": "0.3.2" }, "last_serial": 2764260, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c39247efd065e7f4563e2391635d703b", "sha256": "5a05f2bb664135e43a96bffe63a832aa53a78b82f1785b76f7d74790840a8213" }, "downloads": -1, "filename": "fett-0.1.0.tar.gz", "has_sig": true, "md5_digest": "c39247efd065e7f4563e2391635d703b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5787, "upload_time": "2016-10-25T01:23:00", "url": "https://files.pythonhosted.org/packages/23/0f/66171dd41b93326104ffc244c05182b56363e3ff519f2afc0f893350c5a5/fett-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "052066b85f060699eed9063285ba08e6", "sha256": "fdee4a669e7577c75fac5e62e125fe826ace314b2873a66b0411c925c090afe2" }, "downloads": -1, "filename": "fett-0.1.1.tar.gz", "has_sig": true, "md5_digest": "052066b85f060699eed9063285ba08e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5824, "upload_time": "2016-10-25T16:16:33", "url": "https://files.pythonhosted.org/packages/48/4a/1e052be97f06b4002330f48b0fea87bce28788eb24d218b897434496a4aa/fett-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6ba7db66a73164c08052e72454768233", "sha256": "a6fe2e02bec0c3e21a6eb2148dcabd9f2f4eb3c7936cd91a555be3910698945c" }, "downloads": -1, "filename": "fett-0.2.0.tar.gz", "has_sig": true, "md5_digest": "6ba7db66a73164c08052e72454768233", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6185, "upload_time": "2016-10-27T22:56:30", "url": "https://files.pythonhosted.org/packages/b0/d9/1fd1e855c24c437deedb47f0a298c85ba7eef4e80724b4a4316dac06f66c/fett-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ef73dba008d64a1fa19c817c633eb5e0", "sha256": "36d07a2ee2f7cf5e537084bfda3320a010a5da2f4e2528972d9976264b5a0913" }, "downloads": -1, "filename": "fett-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ef73dba008d64a1fa19c817c633eb5e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6429, "upload_time": "2017-02-09T06:45:45", "url": "https://files.pythonhosted.org/packages/01/23/01238fa3211c67f195026ff843b05bfb81f5137e8a1bcf2c35b4c7309ba1/fett-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "58f175bb87c7bfaf7e409107f3d9a2b8", "sha256": "62d7164c8cef12ecc045e7ea7f90f37703fd051c99cb92714754dbf3f9412421" }, "downloads": -1, "filename": "fett-0.3.0.tar.gz", "has_sig": false, "md5_digest": "58f175bb87c7bfaf7e409107f3d9a2b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7017, "upload_time": "2017-03-10T20:06:27", "url": "https://files.pythonhosted.org/packages/ea/41/e0bf3291a7eedfea28f1d5b80b80c77ab643fec38e57cabf5473b8c6f090/fett-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "27aae6140c33e3a9657d610413b4615b", "sha256": "551e5d7d3fd5a4e1c6b1e6fb46efc81ba5128b3a788b2c2838240f8c162f7c81" }, "downloads": -1, "filename": "fett-0.3.1.tar.gz", "has_sig": false, "md5_digest": "27aae6140c33e3a9657d610413b4615b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7095, "upload_time": "2017-04-09T16:51:17", "url": "https://files.pythonhosted.org/packages/de/01/7d7e4a08627cf5dcddfa8b2651110db7e6e7892a8a4271383c45eebc33b7/fett-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "811cad5ca9fbff4d1c9229eae3138606", "sha256": "f06a819ac7caba01f1c84c4b8132671d1d289d17becea7747448e271b05be0a1" }, "downloads": -1, "filename": "fett-0.3.2.tar.gz", "has_sig": false, "md5_digest": "811cad5ca9fbff4d1c9229eae3138606", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7181, "upload_time": "2017-04-09T17:13:27", "url": "https://files.pythonhosted.org/packages/a6/fb/d4f8e22ea58cfb4a86f617982f037d3fd057491b50d8f0fe81495c2f6f64/fett-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "811cad5ca9fbff4d1c9229eae3138606", "sha256": "f06a819ac7caba01f1c84c4b8132671d1d289d17becea7747448e271b05be0a1" }, "downloads": -1, "filename": "fett-0.3.2.tar.gz", "has_sig": false, "md5_digest": "811cad5ca9fbff4d1c9229eae3138606", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7181, "upload_time": "2017-04-09T17:13:27", "url": "https://files.pythonhosted.org/packages/a6/fb/d4f8e22ea58cfb4a86f617982f037d3fd057491b50d8f0fe81495c2f6f64/fett-0.3.2.tar.gz" } ] }