Getting Started
API Basics
API Reference
Other Topics
A Package is a Runhouse primitive for sharing code between various systems (ex: s3, cluster, local).
Builds an instance of Package
.
name (str, optional) – Name to assign the package resource.
install_method (str, optional) – Method for installing the package.
Options: [pip
, conda
, reqs
, local
]
install_str (str, optional) – Additional arguments to install.
path (str, optional) – URL of the package to install.
system (str, optional) – File system or cluster on which the package lives.
Currently this must a cluster or one of: [file
, s3
, gs
].
load_from_den (bool, optional) – Whether to try loading the Package from Den. (Default: True
)
dryrun (bool, optional) – Whether to create the Package if it doesn’t exist, or load the Package
object as a dryrun. (Default: False
)
The resulting package.
Example
>>> import runhouse as rh >>> reloaded_package = rh.package(name="my-package") >>> local_package = rh.package(path="local/folder/path", install_method="local")
Builds an instance of GitPackage
.
name (str, optional) – Name to assign the package resource.
git_url (str, optional) – The GitHub URL of the package to install.
revision (str, optional) – Version of the Git package to install.
install_method (str, optional) – Method for installing the package. If left blank, defaults to local installation.
install_str (str, optional) – Additional arguments to add to installation command.
load_from_den (bool, optional) – Whether to try loading the package from Den. (Default: True
)
dryrun (bool, optional) – Whether to load the Package object as a dryrun, or create the Package if
it doesn’t exist. (Default: False
)
The resulting GitHub Package.
Example
>>> rh.git_package(git_url='https://github.com/runhouse/runhouse.git', >>> install_method='pip', revision='v0.0.1')
- __init__(name: str | None = None, install_method: str | None = None, install_target: str | Folder | None = None, install_args: str | None = None, preferred_version: str | None = None, dryrun: bool = False, **kwargs)[source]
Runhouse Package resource.
Note
To create a git package, please use the factory method
package()
.
Load or construct resource from config.
config (Dict) – Resource config.
dryrun (bool, optional) – Whether to construct resource or load as dryrun (Default: False
)
Split a requirements string into a install method and the rest of the string.
- __init__(name: str | None = None, git_url: str | None = None, install_method: str | None = None, install_args: str | None = None, revision: str | None = None, dryrun: bool = False, **kwargs)[source]
Runhouse Github Package resource.
Note
To create a git package, please use the factory method
git_package()
orpackage()
.
Load or construct resource from config.
config (Dict) – Resource config.
dryrun (bool, optional) – Whether to construct resource or load as dryrun (Default: False
)