{ "info": { "author": "Sidnei da Silva", "author_email": "sidnei at enfoldsystems dot com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: User Interfaces" ], "description": "Quick Overview\n==============\n\nSpats or Simple PAge Template Server is an attempt to make a\nsimple little Page Template Server that can be used by\neveryone. Basically the idea is simple, allow you to serve out a\nPage Template back to a http request. It subclass all the Python\nstandard library HTTP servers to do this.\n\nYou can also have Python Scripts which are for the more advanced logic\nof serving out bits and peices.\n\nDependencies\n============\n\nSimpleTAL, although we might need to make a more complicated one soon\nto deal with i18n. SimpleTAL can be found here::\n \n http://www.owlfish.com/software/simpleTAL/\n\nOptional Dependencies\n=====================\n\nwxembed: Using a wxPython to embed the server and IE win to make it\nlook like an application. Requires wx.\n \nmfcembed: Using a win32ui native wrapper to embed the server and IE\nwin to make it look like an application. A better choice for Windows\nusers. Requires pywin32.\n \ntaskbar: Makes a little windows taskbar icon. Again only for Windows\nand requires pywin32.\n \nbrowser: Just runs in the command line and fires up a browser. No\ndependencies for this one ;)\n\nDetailed Overview\n**********************\n\nWhat is spats?\n--------------\n\nA SimplePAgeTemplateServer, credit goes to Leo for the name. Basically\na way to make a web server, quickly and simply to serve dynamic stuff\nback to the server.\n\nWhat does it do?\n----------------\n\nServes compiled page templates back to the user. That's all really,\nbasically it takes the file on the file system and serves it back. If\nthat file happens to be a page template it compiles it with simpletal\nand then spits it back to the user.\n\nIt's not a CGI server (it doesn't serve Python scripts back).\n\nIt's not Zope, it doesn't do any of that stuff Zope does. It's simple.\n\nIt does GET and HEAD, that's it.\n\nIt does not make good cups of tea.\n\nUsing\n-----\n\nSee ``example.py``\n\nMake a directory and put a start.py, that reads::\n\n from spats import SimplePageTemplateServer\n SimplePageTemplateServer.start()\n\nThis won't do much however, you need to tell it where to read HTML\nfrom. So you can pass a config dictionary variable through of all the\npossible values.\n\nSo make a directory called say ``html`` or ``pt``. Stick a PageTemplate,\ncalled say ``index.pt`` in there. Now pass that directory through and\nyou are on your way::\n\n from spats import SimplePageTemplateServer\n config = {\"html_dir\":\"html\"}\n SimplePageTemplateServer.start(config)\n\nSee ``SimplePageTemplateServer.py`` for a commented list of variables.\n\nScripts\n+++++++\n\nPass through a ``scripts_dir`` value in the config, and everything in\nthat dir that: ends in .py and contains a ``__main__`` method will be\ncompiled into the scripts context.\n\nSo you can then access in TAL ``scripts/foo`` where foo is your\nscript. This will call the ``__call__`` function.\n\nNote: in a script the context will be assigned to the script, this is\nthe context variable in TAL so you can access all TAL variables in the\nscript. See some examples in the reports site.\n\nYou do not serve scripts directly, you serve PageTemplates that call\nscripts.\n\nSimpleTal\n+++++++++\n\nThis is rather quirky if you are used to Zope TAL, but you should get\nthere quickly. Main quirks:\n\n- elements have to be closed ``

`` must be ``

``\n\n- the context is different because we build that ourselves and it can\n be tricky\n\n- attributes errors fail silently which is kinda nice but confusing\n\nBut it doesn't do...?\n---------------------\n\nSo add it dude, its only a 200 line module. But keep it simple please,\nor goal is to be able to throw together things simply and quickly not\nrebuild Zope.\n\nChange history\n**************\n\n0.1 (2008-12-10)\n================\n\n - Initial release as a Python egg [sidnei].\n\nContributors\n************\n\n- Andy McKay\n\n- Mark Hammond\n\n- Neil Kandalgoankar \n\nDownload\n********", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://enfoldsystems.com/", "keywords": "server template tal", "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "spats", "package_url": "https://pypi.org/project/spats/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/spats/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://enfoldsystems.com/" }, "release_url": "https://pypi.org/project/spats/0.1/", "requires_dist": null, "requires_python": null, "summary": "Spats or Simple PAge Template Server is an attempt to make a simple little Page Template Server that can be used by everyone", "version": "0.1" }, "last_serial": 799862, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "13c22cc27a0fa4ecf044c66c50911c60", "sha256": "e2382ef2b7e498c6f7e441314b4a0189e05ff525cb623a93ca001912c53863d7" }, "downloads": -1, "filename": "spats-0.1.zip", "has_sig": false, "md5_digest": "13c22cc27a0fa4ecf044c66c50911c60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 59510, "upload_time": "2008-12-10T19:29:09", "url": "https://files.pythonhosted.org/packages/ae/7b/2093011945e5aad31eb618e00f0cf59afe863233526f463e56743d1dee68/spats-0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "13c22cc27a0fa4ecf044c66c50911c60", "sha256": "e2382ef2b7e498c6f7e441314b4a0189e05ff525cb623a93ca001912c53863d7" }, "downloads": -1, "filename": "spats-0.1.zip", "has_sig": false, "md5_digest": "13c22cc27a0fa4ecf044c66c50911c60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 59510, "upload_time": "2008-12-10T19:29:09", "url": "https://files.pythonhosted.org/packages/ae/7b/2093011945e5aad31eb618e00f0cf59afe863233526f463e56743d1dee68/spats-0.1.zip" } ] }