diff --git a/src/posit/connect/packages.py b/src/posit/connect/packages.py index 178ca4c5..3cdf92dc 100644 --- a/src/posit/connect/packages.py +++ b/src/posit/connect/packages.py @@ -142,6 +142,22 @@ def __init__(self, ctx, path): def _create_instance(self, path, /, **attributes): return Package(self._ctx, **attributes) + class _Fetch(TypedDict, total=False): + language: Required[Literal["python", "r"]] + """Programming language ecosystem, options are 'python' and 'r'""" + + name: Required[str] + """The package name""" + + version: Required[str] + """The package version""" + + @overload + def fetch(self, **conditions: Unpack[_Fetch]): ... + + @overload + def fetch(self, **conditions): ... + def fetch(self, **conditions) -> Generator["Package"]: # todo - add pagination support to ActiveSequence url = self._ctx.url + self._path