{% from "_macros.html" import icon %} {#- The `python` tool's runtime (services/pyodide_files.py, api/admin_brand.py). Pyodide is fetched by the administrator, once, from one fixed address, and every file is checked against the lock committed with LLeMbas. While a download runs the card asks for itself again every second, and stops asking once it has finished: the finished card carries no trigger. -#}

{{ t("Python in the browser") }}

{{ t("Pyodide %(version)s", version=pyodide.version) }} {% if pyodide.running %}

{{ t("Downloading: %(done)s of %(total)s", done=pyodide.done|filesizeformat, total=pyodide.total|filesizeformat) }}

{% elif pyodide.available %}

{{ t("On this server: %(count)s files, %(size)s, each checked against its pinned SHA-256.", count=pyodide.count, size=pyodide.total|filesizeformat) }}

{% else %}

{{ t("Not on this server. Downloading fetches %(count)s files (%(size)s) once, from the Pyodide release's own address, and refuses them unless each matches the SHA-256 pinned in this version of LLeMbas. Nothing is loaded from anywhere else afterwards.", count=pyodide.count, size=pyodide.total|filesizeformat) }}

{% endif %} {% if pyodide.error %} {% endif %} {% if not pyodide.running %}
{% if pyodide.available %}
{% else %}
{% endif %}
{% endif %}

{% if pyodide.available %}{{ t("Code runs in the person's own browser (Pyodide), never on this server, with only the files the chat hands it, and only while a page of that chat is open.") }} {% else %}{{ t("Pyodide is not on this server yet, so there is nothing to switch on.") }}{% endif %}