Skip to content

docs: add local (non-pip) modules example for SLS-360#47

Open
deanq wants to merge 1 commit into
mainfrom
deanquinanola/sls-360-local-modules-example
Open

docs: add local (non-pip) modules example for SLS-360#47
deanq wants to merge 1 commit into
mainfrom
deanquinanola/sls-360-local-modules-example

Conversation

@deanq

@deanq deanq commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Adds 01_getting_started/05_local_modules/ — a CPU example that factors a Flash endpoint across local (non-pip) Python files: a sibling module (text_utils.py) and a package (greetings/, whose __init__ re-exports from a submodule). This is the capability delivered by SLS-360.

Depends on the SDK/worker change:

What it demonstrates

  • Importing a local sibling module and a local package (with __init__ + submodule) from an endpoint.
  • In-function imports — required on the live path (only the function source + its local-module closure ship to the worker) and unchanged for flash deploy.

Verification (see the example README for commands)

  • Build path (local): flash build bundles the sibling + package; a module dropped by the ignore filter (e.g. test_*.py) is force-included when an endpoint imports it; an unresolved endpoint import fails the build loudly.
  • Deploy path (real endpoint): verified end-to-end — deployed to a real CPU endpoint, the worker imported the local modules and returned {"greeting": "HOLA, ADA!"}, then torn down.
  • Live path (flash dev): works once the worker image from feat: import shipped local modules before executing user code runpod-workers/flash#100 is published (stock workers don't yet materialize inline modules); testable now via a locally-built worker image.

Notes

  • .flash/ build artifacts are gitignored.
  • Endpoint uses typed params (name, lang) so the queue handler's greet(**job_input) call binds {"input": {"name": ..., "lang": ...}} correctly.

@capy-ai

capy-ai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Capy auto-review is paused for this organization because the usage-cycle auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant