spin-templete


Namespin-templete JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
Summaryspin templete is the layer of Spin-python-sdk for render html
upload_time2024-04-12 07:30:25
maintainerNone
docs_urlNone
authormominiqbal1234
requires_pythonNone
licenseNone
keywords spin-python-sdk spinpython python webassembly webassembly webassembly in python webassembly api build python webassembly api python to webassembly
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
    

# What is Spin
Spin is a framework for building and running event-driven microservice applications with WebAssembly (Wasm) components.

# Spin Templete

spin templete is the layer of Spin-python-sdk for render html

# How to install spin_templete

```python
pip install spin_templete
```

### setup
```
mkdir templete
cd templete
touch index.html
```
### index.html
```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>Hello World Again Momin</h1>

    <ul>
        {% for item in items %}
            <li>{{ item }}</li>
        {% endfor %}
        </ul>   
    <ul>
        {% for item in mylist %}
            <li>{{ item }}</li>
        {% endfor %}
        </ul>   



<h1>{{name}}</h1>

</body>
</html>
```

### app.py
```python
from spin_sdk.http import IncomingHandler, Request, Response
from spintemplete.templete import Render


html = Render("templete")

class IncomingHandler(IncomingHandler):
    def handle_request(self, request: Request) -> Response:
        return html.render("index.html",items=[1,2,3,4,5],mylist=["hello","world"],name="momin")
```

### spin.toml
Add more html files your requirements
```

[component.myapp]
source = "app.wasm"
files = ["templete/index.html"]
```

Check Our Site : https://mefiz.com/about </br>
Developed by : Momin Iqbal



    


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "spin-templete",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "spin-python-sdk, spinpython, python webassembly, webassembly, webassembly in python, webassembly api, build python webassembly api, python to webassembly",
    "author": "mominiqbal1234",
    "author_email": "<mominiqbal1214@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f5/cf/617362d07a56615180ed46317ea248ce6b0fc099686da93450874c176c30/spin_templete-0.1.2.tar.gz",
    "platform": null,
    "description": "\n    \n\n# What is Spin\nSpin is a framework for building and running event-driven microservice applications with WebAssembly (Wasm) components.\n\n# Spin Templete\n\nspin templete is the layer of Spin-python-sdk for render html\n\n# How to install spin_templete\n\n```python\npip install spin_templete\n```\n\n### setup\n```\nmkdir templete\ncd templete\ntouch index.html\n```\n### index.html\n```\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Document</title>\n</head>\n<body>\n    <h1>Hello World Again Momin</h1>\n\n    <ul>\n        {% for item in items %}\n            <li>{{ item }}</li>\n        {% endfor %}\n        </ul>   \n    <ul>\n        {% for item in mylist %}\n            <li>{{ item }}</li>\n        {% endfor %}\n        </ul>   \n\n\n\n<h1>{{name}}</h1>\n\n</body>\n</html>\n```\n\n### app.py\n```python\nfrom spin_sdk.http import IncomingHandler, Request, Response\nfrom spintemplete.templete import Render\n\n\nhtml = Render(\"templete\")\n\nclass IncomingHandler(IncomingHandler):\n    def handle_request(self, request: Request) -> Response:\n        return html.render(\"index.html\",items=[1,2,3,4,5],mylist=[\"hello\",\"world\"],name=\"momin\")\n```\n\n### spin.toml\nAdd more html files your requirements\n```\n\n[component.myapp]\nsource = \"app.wasm\"\nfiles = [\"templete/index.html\"]\n```\n\nCheck Our Site : https://mefiz.com/about </br>\nDeveloped by : Momin Iqbal\n\n\n\n    \n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "spin templete is the layer of Spin-python-sdk for render html",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "spin-python-sdk",
        " spinpython",
        " python webassembly",
        " webassembly",
        " webassembly in python",
        " webassembly api",
        " build python webassembly api",
        " python to webassembly"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0cd08f105e7a7eeb5ed2c25b671b23830af31019125e38683852c1657734882b",
                "md5": "7838131ee430416115b4b4f84485afd5",
                "sha256": "73bac60dfed7fba35f5709be0fbad4305f5fe59882aa773b60cf49fcae2173f9"
            },
            "downloads": -1,
            "filename": "spin_templete-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7838131ee430416115b4b4f84485afd5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3149,
            "upload_time": "2024-04-12T07:30:24",
            "upload_time_iso_8601": "2024-04-12T07:30:24.250377Z",
            "url": "https://files.pythonhosted.org/packages/0c/d0/8f105e7a7eeb5ed2c25b671b23830af31019125e38683852c1657734882b/spin_templete-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f5cf617362d07a56615180ed46317ea248ce6b0fc099686da93450874c176c30",
                "md5": "a29792e3fca0c5a693b83ef429a2184f",
                "sha256": "e8b8df89d9cdce73fa4c27415149c806120800eb00ef3ebfab12a49e82fae1da"
            },
            "downloads": -1,
            "filename": "spin_templete-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a29792e3fca0c5a693b83ef429a2184f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2939,
            "upload_time": "2024-04-12T07:30:25",
            "upload_time_iso_8601": "2024-04-12T07:30:25.991246Z",
            "url": "https://files.pythonhosted.org/packages/f5/cf/617362d07a56615180ed46317ea248ce6b0fc099686da93450874c176c30/spin_templete-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-12 07:30:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "spin-templete"
}
        
Elapsed time: 0.40177s