{ "info": { "author": "tfpk", "author_email": "tomkunc0@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# Dewar\n\nDewar is a static site generator inspired by flask.\n\n## About\n### Why the name \"dewar\"?\n\nDewar (pronounced d-you-ah) is another name for a vacuum flask, or a thermos. Basically, it's a flask that keeps things frozen (or hot).\n\n### Why would I use this?\n\nTo the moment, there have been a few ways of making a static site:\n\n - Roll your own custom solution, maybe using jinja, but maybe just formatting a html template solution.\n\nThis might work for a small site, or for a repetitive report; but maintainability is lost, and a lot of custom configuration has to be done.\n\n - Use a static site generator (a la jekyll or hyde).\n\nThese are great for making blogs, but are opinionated about what content they should host. They don't allow for computation inline, and they are their own ecosystem to learn.\n\n### Just use flask!\n\n There are two major limitations to flask that this project solves:\n\n 1) Flask only serves one page at a time.\n 2) Flask requires a server to be running.\n\nThese limitaions are obvious, but they prevent a few use cases:\n - hosting a site that doesn't need to be continuously rendered\n - creating sites that can be easily downloaded\n - creating a server that can be seen without a server running\n - creating sites that rely entirely on client-side code, but want some convenient templating [in this case, it adds overhead of processing that's unnecessary]\n\n## Setup\n\nInstalling Dewar is as simple as:\n\n```\npip install dewar\n```\n\nAnd writing a program like\n```python3\n# named 'site.py'\nimport dewar\n\nsite = dewar.Site()\n\n@site.register('index.html')\ndef index():\n return \"