plat_browser
Browser-hosted Python runtime for plat.
This package is intended for client-side Python execution environments while keeping the main plat package focused on normal server/client/CLI usage.
Example
from plat_browser import Controller, POST, serve_server
@Controller()
class MathApi:
@POST()
def add(self, a: int, b: int, ctx):
return a + b
serve_server("browser-python-math", [MathApi])
It also supports hidden browser package installation syntax:
!pip install pandas
The browser host/runtime is responsible for package loading and transport bridging. User code should stay normal Python.
Payload fields are passed into handlers as keyword arguments by default, so browser Python code can use normal Python signatures like def add(self, a, b, ctx).
Browser Python can also act as a client:
from plat_browser import connect_server
client = await connect_server("css://browser-python-math")
await client.add(a=20, b=22)
Browser Python clients can also pass optional trust inputs:
client = await connect_server(
"css://browser-python-math",
{
"identity": {
"known_hosts": {},
"authority_servers": [
{
"base_url": "https://authority.example.com",
"public_key_jwk": {...},
}
],
}
},
)
That same client helper can also connect to normal HTTP servers that expose OpenAPI:
from plat_browser import connect_server
client = await connect_server("https://api.example.com")
await client.createOrder(itemId="sku_123", qty=2)
css:// host identity
The css:// transport can keep a stable host identity too.
- Browser-hosted servers can reuse a persisted public/private keypair
- Clients can trust on first use and remember a host key for later
- Clients can also verify a signed authority record for well-known server names
Those identity helpers live in the TypeScript/browser host layer so browser Python user code can stay normal Python and never mention lower-level runtime details.
TypeScript host utilities
Use the browser host utilities from the TypeScript package:
import { startClientSidePythonServerFromSource } from '@modularizer/plat/python-browser'
That host layer is responsible for:
- loading the hidden browser Python runtime
- handling
!pip install ...and import-based package installation - serving the Python-defined methods over the same client-side-server transport utilities
Metadata
Release files for modularizer-plat-browser 0.17.1
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 | Actions |
|---|---|---|---|---|
| modularizer_plat_browser-0.17.1.tar.gz | 17.6 kB | With provenance | Details for modularizer_plat_browser-0.17.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| modularizer_plat_browser-0.17.1-py3-none-any.whl | Python 3 | none | any | Details for modularizer_plat_browser-0.17.1-py3-none-any.whl |
Total release size: 35.6 kB
Release files / modularizer_plat_browser-0.17.1.tar.gz
| Download URL | modularizer_plat_browser-0.17.1.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
209ea0523d66f42d8b4815c4d70ee8511fe2db83188dcca45d727eefc10e4d5e
|
|
BLAKE2b-256 checksum How to use checksums |
c3881dd1987a657ae8c3aa03a9b1e9ba6649b04edb8866c2e16afe575ffbbcee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / modularizer_plat_browser-0.17.1-py3-none-any.whl
| Download URL | modularizer_plat_browser-0.17.1-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79da210ca2a34f704eef39a23f37e9702cf5319803ab7db5a5173509db4c40ba
|
|
BLAKE2b-256 checksum How to use checksums |
356273cb9ee97490311bd5c5da3bca4ac3068d9af0daed9e729a4dbbeb39f8ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for modularizer-plat-browser 0.17.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for modularizer_plat_browser-0.17.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA 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.