{ "info": { "author": "Ryan Morshead", "author_email": "ryan.morshead@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# Hyperscript Markup Language Python Extension\n\nAn extension to the Python language with an\n[f-string](https://www.python.org/dev/peps/pep-0498/)-like\ntemplate syntax for writing HTMl inspired by [pyxl](https://github.com/dropbox/pyxl):\n\n```python\n# coding=html\n\ndef html(tag, props, children):\n return (tag, props, children)\n\nsize = \"30px\"\ntext = \"Hello!\"\n\nmodel = html\"\"\"\n
\n

{text}

\n
\n\"\"\"\n```\n\n\n# HTML Template Usage\n\nEvery file that uses the HTML template syntax must:\n\n1. Have an `html` encoding indicator as its first or second line.\n2. Define a callable ``html(tag, props, children)`` in the module.\n\nSo your files should all start a bit like this:\n\n```python\n# coding=html\ndef html(tag, props, children): ...\n```\n\nIf you haven't [permanently installed](#HTML-Template-Syntax-Installation) the\nlanguage extension you'll need to import modules with HTML Template Syntax, you'll need\nto make sure `idom` has been imported at your application's entry point to register the\nlanguage extension before importing your module:\n\n```python\nimport htm_pyx\nimport my_project\n```\n\nWhere ``my_project.py`` would have the following contents:\n\n```python\n# coding=html\n\ndef html(tag, props, children):\n ...\n\ncool_stuff = html\"
...
\"\n```\n\n\n# HTML Template Syntax Installation\n\nIf you want to more permanently install the language extension you can run the console command:\n\n```bash\nhtm-pyx register\n```\n\nWhich can be undone (if desired) later:\n\n```bash\nhtm-pyx deregister\n```\n\n\nThis is **optional**, because you can always `import htm_pyx` at the root of your application\nto enable the extension. After this initial import all the follow with `coding=html`\nwill be appropriately transpiled.\n\n\n# Additional Support For HTML Template Syntax\n\nYou won't be able to use the HTML template syntax directly in Python's default REPL, but\nit will work out of the box with:\n\n1. [Jupyter](https://jupyter.org)\n2. [IPython](http://ipython.org/)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rmorshea/htm-pyx", "keywords": "JSX", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "htm-pyx", "package_url": "https://pypi.org/project/htm-pyx/", "platform": "Linux", "project_url": "https://pypi.org/project/htm-pyx/", "project_urls": { "Homepage": "https://github.com/rmorshea/htm-pyx" }, "release_url": "https://pypi.org/project/htm-pyx/0.1.0.dev0/", "requires_dist": [ "docopt (==0.6.2)", "mypy-extensions (==0.4.1)" ], "requires_python": ">=3.6,<4.0", "summary": "Control the web with Python", "version": "0.1.0.dev0" }, "last_serial": 5921993, "releases": { "0.1.0.dev0": [ { "comment_text": "", "digests": { "md5": "f57acfd0f58bdf4c34ac537d72daa7e3", "sha256": "d662634aa1729da74093067369d905b9bde7bf1b881f6ecd92ceb1f7a315a978" }, "downloads": -1, "filename": "htm_pyx-0.1.0.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "f57acfd0f58bdf4c34ac537d72daa7e3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 9307, "upload_time": "2019-10-03T06:53:13", "url": "https://files.pythonhosted.org/packages/23/e3/949d0d4ddee4ead94857e365a93e63be4673895706383bfed0991775e9a8/htm_pyx-0.1.0.dev0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f57acfd0f58bdf4c34ac537d72daa7e3", "sha256": "d662634aa1729da74093067369d905b9bde7bf1b881f6ecd92ceb1f7a315a978" }, "downloads": -1, "filename": "htm_pyx-0.1.0.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "f57acfd0f58bdf4c34ac537d72daa7e3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 9307, "upload_time": "2019-10-03T06:53:13", "url": "https://files.pythonhosted.org/packages/23/e3/949d0d4ddee4ead94857e365a93e63be4673895706383bfed0991775e9a8/htm_pyx-0.1.0.dev0-py3-none-any.whl" } ] }