posit-dev / posit-dev/shinylive
Shinylive Python Question: Importing from subfolders
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 251
- Forks
- 25
- Avg merge
- 19m
- Merged PRs (30d)
- 2
Description
Curious if it's possible to import modules from local directory-based packages or folders. I feel like I was able to do this a couple of versions back, but I'm unable to now (it's also possible I'm just incorrectly remembering using regular py-shiny as well.
With larger apps/utilities, folders really help for organizing code (i.e., right now I have a utility that contains 28 other module files in the same directory as app.py), but I'm unable to figure out how to successfully import them (I've tried absolute imports, relative imports, regular folders, package folders, etc).
Any direction is helpful. Thanks!
(btw - really enjoying Shinylive)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the import attempts described for app.py, comparing absolute imports, relative imports, regular folders, and package folders in Shinylive. Check whether the behavior differs from earlier versions; done means identifying the supported import behavior and documenting or correcting the regression with a reproducible test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, wasm
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100