Skip to content

Consider supporting additional dependency formats #327

Closed

Description

@strangemonad

We use bot RSConnect and pypoetry quite a bit. It would be great if rsconnect-python supported deploying pypoetry projects or other ways of plugging in to pyproject.toml buiold systems.

We currently work around this limitation by wrapping rsconnect with our own tool that first runs poetry export (without extra repo urls) and copies our apps (stored using an src project layout) to a deploy directory containing the AppStore json file. We use the fact that rsconnect.environment stops after finding a requirements.txt.

There's multiple aspects of this request:

Implementation options
1.1 Possibly consider supporting poetry directly
1.2 There are other competing approaches to python dependencies e.g. PEP 631 allows dependencies in the pyproject.toml and other package management tools like Hatch use that. Allow cli callers to specify a cli tool to be called for resolving project dependencies
1.3 like 1.2 but only expose it via an api (i.e. pluggable build / dependency systems would only be supported by writing a custom tool that has rsconnect-python as a dependency and invokes it programatically.

Streamline non-pypi package registries
When running poetry export on a project that's setup to use non pypi repositories, extra pip urls are included at the top of the generated requirements.txt. When the repo is private and password protected

  1. rsconnect-python fails to properly parse the requirements
  2. the username and password are included in the file, which is insecure given how connect deploys content.
    We currently work around this by stripping any extra pip url lines and manually configuring the connect serve's pipconf with the required private package registry details.

Support other project layouts
We organize all our project sources under a src folder. Poetry already knows about our python path and where our sources, tests and resources live. One possible approach would be to allow deploying an app by copying dist tarball since poetry build can easily produce that (the poetry.lock / poetry export should still be used to resolve dependencies though).

Activity

  1. gshotwell commented on Mar 7, 2025

    @gshotwell

    +1 for this request. In particular uv seems to be standardizing around pyproject.toml. Since Connect allows installation using uv is seems like this should work on the Connect side of things, but is maybe not supported by the client.

  2. tdstein commented on Nov 10, 2026

    @tdstein
    Collaborator

    🤖 rsconnect-python now reads dependencies from pyproject.toml (--requirements-file pyproject.toml, #764) and uv.lock (--requirements-file uv.lock, #750). It also has deploy pyproject / write-manifest pyproject (#767, #782), which take the app mode and entrypoint from [tool.rsconnect]. Local packages in a src layout can be installed with -e ., which rsconnect now writes for you when the package is installed editable (#931). Poetry projects that declare dependencies in the standard [project] table work as-is, but the legacy [tool.poetry.dependencies] table is not read. Closing as completed. If you need something these don't cover, such as Poetry 1.x lockfiles, please reopen with details.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions