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
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
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
Developed by : Momin Iqbal
Metadata
Release files for spin-templete 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| spin_templete-0.1.2.tar.gz | 2.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spin_templete-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / spin_templete-0.1.2.tar.gz
| Download URL | spin_templete-0.1.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8b8df89d9cdce73fa4c27415149c806120800eb00ef3ebfab12a49e82fae1da
|
|
BLAKE2b-256 checksum How to use checksums |
f5cf617362d07a56615180ed46317ea248ce6b0fc099686da93450874c176c30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / spin_templete-0.1.2-py3-none-any.whl
| Download URL | spin_templete-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73bac60dfed7fba35f5709be0fbad4305f5fe59882aa773b60cf49fcae2173f9
|
|
BLAKE2b-256 checksum How to use checksums |
0cd08f105e7a7eeb5ed2c25b671b23830af31019125e38683852c1657734882b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Security for spin-templete 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.