Skip to content

Create a supported "high level" programmatic API for pip #3121

Closed
@pfmoore

Description

@pfmoore

This has come up a few times recently now that pip is available in a standard Python install.

Maybe we should formally support a programmatic API for pip that allows the high-level command line operations pip supports to be run from within a Python interpreter? That may simply mean blessing (and documenting) pip.main() as a supported API.

There may be some odd corner cases to take care with, if we're considering people running pip.main() from within a persistent interpreter (e.g. IPython or Idle). I'm thinking of cases where sys.modules caches something you're upgrading, for example. But that may just need documentation saying that those things need an interpreter restart, at least as a starting point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: public apiPublic API stuffauto-lockedOutdated issues that have been locked by automation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions