{ "info": { "author": "Juan-Pablo Scaletti", "author_email": "juanpablo@jpscaletti.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10" ], "description": "\n# Clay\n\n[![Coverage Status](https://coveralls.io/repos/github/lucuma/Clay/badge.svg?branch=clay3)](https://coveralls.io/github/lucuma/Clay?branch=clay3) [![Tests](https://travis-ci.org/lucuma/Clay.svg?branch=master)](https://travis-ci.org/lucuma/Clay/)\n\n**An amazing prototyping tool.**\n\nWith Clay you can forget about making changes to dozens of HTML files\njust because you need to add a link in the footer.\n\nYou can also use it to prototype your AJAX-driven application or the\nresponses of sending forms, because it acts like a real server.\n\n\n## Install\n\n```\npip install clay\n```\n\n\n## Quickstart\n\n```python\nclay new mysite\n```\n\nwill generate a new app container with the following structure:\n\n```\nmysite\n\u00a0\u00a0\u251c\u2500\u2500 static/\n\u00a0\u00a0\u251c\u2500\u2500 clay.yaml\n\u00a0\u00a0\u251c\u2500\u2500 index.html\n \u2514\u2500\u2500 ...other files\n```\n\nYou can also use an optional project template path or git URL. For the URLs, \"gh:\" works as a shortcut of \"https://github.com/\" and \"gl:\" as a shortcut of \"https://gitlab.com/\". For example:\n\n```python\n# Absolute or relative path.\nclay new myapp /path/to/project/template\n\n# GitHub repo. Note the \".git\" postfix.\nclay new myapp https://github.com/lucuma/clay-template.git\n\n# The same GitHub repo with shortcut\nclay new myapp gh:/lucuma/clay-template.git\n```\n\n\n## Development server\n\nInside that folder, run the development server with:\n\n```\nclay run\n```\n\nand your site'll be available at ``http://0.0.0.0:8080/``.\n\nAnything inside the `static` folder is served as-is under the `/static/` path.\nFor example you can see `myapp/static/image.png` at the `http://0.0.0.0:8080/static/image.png` URL.\n\nAny file outside the `static` folder, is rendered as a page.\n\nFor example, `myapp/page.html` is rendered and shown at `http://0.0.0.0:8080/page.html`, as an HTML page.\n\nAnd `myapp/foo/bar.json` is rendered and shown at `http://0.0.0.0:8080/foo/bar.json` as a JSON document.\n\nRemember to put inside `static` anything you don't want to be rendered.\n\n\n## Build version\n\nTo generate a static version of your site, first, stop the server with\n``Control + C``, and then run:\n\n```\nclay build\n```\n\nand all the templates will be processed and the result stored inside the\n`build` folder.\n\n\n\n## Static files\n\nIf you have folders in your project, you might be tempted to write internal URLs like this\n\n```html\n