oxen.remote_repo
get_repo
name
-str
Name of the repository in the format ‘namespace/repo_name’.host
-str
The host to connect to. Defaults to ‘hub.oxen.ai’
create_repo
name
-str
Name of the repository in the format ‘namespace/repo_name’.description
-str
Description of the repository. Only applicable to OxenHub.is_public
-bool
Whether the repository is public or private. Only applicable to OxenHub.host
-str
The host to connect to. Defaults to ‘hub.oxen.ai’scheme
-str
The scheme to use for the remote url. Default: ‘https’files
-List[Tuple[str, str]]
A list of tuples containing the path to the file and the contents of the file that you would like to seed the repository with.
RemoteRepo Objects
Examples
Add & Commit Files
Adding and committing a file to a remote workspace.Downloading Specific Files
Grab a specific file revision and load it into pandas.__init__
repo_id
-str
Name of the repository in the format ‘namespace/repo_name’. For example ‘ox/chatbot’host
-str
The host to connect to. Defaults to ‘hub.oxen.ai’revision
-str
The branch name or commit id to checkout. Defaults to ‘main’scheme
-str
The scheme to use for the remote url. Default: ‘https’
create
empty
-bool
Whether to create an empty repo or not. Default: Falseis_public
-bool
Whether the repository is public or private. Default: False
exists
delete
checkout
revision
-str
The name of the branch or commit id to checkout.create
-bool
Whether to create a new branch if it doesn’t exist. Default: False
ls
directory
-str
The directory to list. If None, will list the root directory.page_num
-int
The page number to return. Default: 1page_size
-int
The number of items to return per page. Default: 100
scan
directory
-str
The directory to list. If None, will list the root directorypage_size
-int
The number of items to return per page. Default: 100
download
src
-str
The path to the remote filedst
-str | None
The path to the local file. If None, will download to the same path assrc
revision
-str | None
The branch or commit id to download. Defaults toself.revision
add
src
-str
The path to the local file to uploaddst
-str | None
The directory to upload the file to. If None, will upload to the root directory.branch
-str | None
The branch to upload the file to. Defaults toself.revision
status
commit
upload
src
-str
The path to the local file to uploadfile_name
-str | None
The name of the file to upload. If None, will use the name of the file insrc
dst_dir
-str | None
The directory to upload the file to. If None, will upload to the root directory.branch
-str | None
The branch to upload the file to. Defaults toself.revision
metadata
file_exists
path
-str
The path to the file to checkrevision
-str
The revision to check against, defaults toself.revision
file_has_changes
local_path
-str
The local path to the file to checkremote_path
-str
The remote path to the file to check, will default tolocal_path
if not providedrevision
-str
The revision to check against, defaults toself.revision
log
branch_exists
name
-str
The name of the branch to check
branch
branches
list_workspaces
get_branch
branch
-str
The name of the branch to return
create_branch
branch
-str
The name to assign to the created branch
create_checkout_branch
branch
-str
The name to assign to the created branch
merge
base_branch
-str
The base branch to merge intohead_branch
-str
The head branch to merge