Configuring per‑module network access in PyScript without production credentials
26.5K reputation · 15 May 2021, 15:05 UTC
Goal: Verify whether a network (or proposed allow‑network) attribute on a <py-script> tag grants network access only to that specific script element or to all PyScript code on the page when testing third‑party API calls without production credentials.
Uncertainty: The current documentation does not state if the permission is scoped per‑module or applied globally, and the silent failure mode omits console warnings, making it difficult to observe the boundary.
Questions: Does adding the network attribute to one <py-script> element affect other <py-script> tags on the same page? Is the permission applied globally across the PyScript runtime or scoped to the element that declares it? If the permission is global, what mechanism can isolate network access for individual scripts during integration testing?