Deploy to Connect a streamlit app where packages are managed with poetry

Hi there,

When I use conda environment or virtualenv, I understand that rsconnect write-manifest would "inspect the Python environment" and write these dependencies to manifest.json and requirements.txt.

Now, the packages in my Streamlit app are managed with poetry, so instead of requirements.txt I have pyproject.toml and poetry.lock. How do I specify these files in my rsconnect write-manifest so that it knows where the necessary packages are?

Currently, if I simply run rsconnect write-manifest streamlit ., it would inspect my base environment and install unnecessary packages and not the one I need for the app.

Any insight is much appreciated!

Use the export command to get a requirements file from your poetry project.

1 Like

Thank you! It's working!!! I was worried about the warning but it turned out OK.

Warning: requirements.txt already exists and will not be overwritten.

poetry export -f requirements.txt --output requirements.txt
rsconnect write-manifest streamlit . 

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.