# Static serving of all pyscripts (and dependencies)

**URL:** <https://forum.anaconda.com/t/static-serving-of-all-pyscripts-and-dependencies/21333>\
**Category:** PyScript\
**Created:** [May 10, 2022, 10:49pm UTC](https://forum.anaconda.com/t/static-serving-of-all-pyscripts-and-dependencies/21333 "2022-05-10T22:49:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurent.perraud](https://avatars.discourse-cdn.com/v4/letter/l/0075a9/32.png) [@laurent.perraud](https://forum.anaconda.com/u/laurent.perraud)\
**Post date:** [May 10, 2022, 10:49pm UTC](https://forum.anaconda.com/t/static-serving-of-all-pyscripts-and-dependencies/21333/1 "2022-05-10T22:49:36Z")

</div>

Is there a way to package all pyscript sources and their dependencies (pyodide, wasm) to operate an application cut from internet.  
As an example of sub-question: is the external reference to pyodide harcoded to a url?

---

<div class="post-metadata">

**Author:** ![criarlogins](https://avatars.discourse-cdn.com/v4/letter/c/f5a800/32.png) [@criarlogins](https://forum.anaconda.com/u/criarlogins)\
**Post date:** [May 11, 2022, 10:42am UTC](https://forum.anaconda.com/t/static-serving-of-all-pyscripts-and-dependencies/21333/2 "2022-05-11T10:42:28Z")

</div>

You just need to load the pyscript.js

I tested that too. Already planning an webapp to be used in my work.

---

<div class="post-metadata">

**Author:** ![john.hanley](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/john.hanley/32/1294_2.png) [@john.hanley](https://forum.anaconda.com/u/john.hanley)\
**Post date:** [May 12, 2022, 7:47am UTC](https://forum.anaconda.com/t/static-serving-of-all-pyscripts-and-dependencies/21333/3 "2022-05-12T07:47:47Z")

</div>

Just serving pyscript.js is not enough. That module loads almost a dozen other files.

---

<div class="post-metadata">

**Author:** ![pauleveritt](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/pauleveritt/32/1649_2.png) [@pauleveritt](https://forum.anaconda.com/u/pauleveritt)\
**Post date:** [May 17, 2022, 12:20pm UTC](https://forum.anaconda.com/t/static-serving-of-all-pyscripts-and-dependencies/21333/4 "2022-05-17T12:20:35Z")

</div>

Correct. PyScript [injects a script tag](https://github.com/pyscript/pyscript/blob/main/pyscriptjs/src/components/pyconfig.ts#L181) which loads Pyodide…which is around 10 MB compressed.

This new web component (it landed in the last week) should let you point to a different (e.g. local) URL for your Pyodide.

---

<div class="post-metadata">

**Author:** ![john.hanley](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/john.hanley/32/1294_2.png) [@john.hanley](https://forum.anaconda.com/u/john.hanley)\
**Post date:** [May 17, 2022, 9:29pm UTC](https://forum.anaconda.com/t/static-serving-of-all-pyscripts-and-dependencies/21333/5 "2022-05-17T21:29:29Z")

</div>

Paul, specifying the origin for the Pyscript and Pyodide dependencies will be very nice.

I am building apps that are extensions so I want to bundle (or download to persistent virtual storage) everything required.

Please ping me when that is available. I can also help test for my use case. I am a Google GDE.

---

<div class="post-metadata">

**Author:** ![pauleveritt](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/pauleveritt/32/1649_2.png) [@pauleveritt](https://forum.anaconda.com/u/pauleveritt)\
**Post date:** [May 18, 2022, 11:22am UTC](https://forum.anaconda.com/t/static-serving-of-all-pyscripts-and-dependencies/21333/6 "2022-05-18T11:22:38Z")

</div>

Hi @john.hanley I lost most of Sunday in a crap-fest of package.json/tsconfig.json/jest.config.js wire-wiggling. I’m a test-first person and want to drive from tests. ts-node and ts-jest don’t combine well with ESM.

I gave up, switched to Vite and Vitest, and damn if it didn’t work the first time. I just had to put the pyodide sources in a top-level pyodide dir.

Want to review/collborate on a tutorial/video I might do?

---

<div class="post-metadata">

**Author:** ![john.hanley](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/john.hanley/32/1294_2.png) [@john.hanley](https://forum.anaconda.com/u/john.hanley)\
**Post date:** [May 18, 2022, 9:22pm UTC](https://forum.anaconda.com/t/static-serving-of-all-pyscripts-and-dependencies/21333/7 "2022-05-18T21:22:03Z")

</div>

Hi Paul,

Yes, I would love to review and/or collaborate with you.

On my personal blog site, my PyScript articles are breaking traffic records and I already had significant traffic for my Google Cloud articles. There is a lot of interest right now.
