We're developing some algorithms and visualizations in a Python package, and as part of the package, we'd like to release a Streamlit app that demonstrates their usage in a no-code environment. Ideally we'd like to use Posit Connect Cloud.
A toy version of the app is here: GitHub - shapiromatron/streamlitpkg (with no algorithms, just the deployment details).
The package is structured like this:
.
├── pyproject.toml
├── requirements.txt
└── src
└── streamlitpkg
├── __init__.py
├── app.py
├── cli.py
└── work.py
To run locally, you run this command:
pip install -e .
streamlit run src/streamlitpkg/app.py
The requirements.txt just contains -e .
, so it should install the package locally so imports work fine, but it fails in deployment:
2025-05-22T21:28:48-04:00 Error determining requirements: / does not appear to be a Python project, as neither `pyproject.toml` nor `setup.py` are present in the directory
2025-05-22T21:28:48-04:00 Failed to publish content: This content's dependencies could not be resolved. Check your requirements.txt. error_id=be682893-96d2-4b6f-b236-4dbbe1be8a31
Any idea how to fix? I tried moving the app file to the root outside of the package (not ideal), but that gave the same error.