oxen.remote_repo
get_repo
name-strName of the repository in the format ‘namespace/repo_name’.host-strThe host to connect to. Defaults to ‘hub.oxen.ai’
create_repo
name-strName of the repository in the format ‘namespace/repo_name’.description-strDescription of the repository. Only applicable to OxenHub.is_public-boolWhether the repository is public or private. Only applicable to OxenHub.host-strThe host to connect to. Defaults to ‘hub.oxen.ai’scheme-strThe 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-strName of the repository in the format ‘namespace/repo_name’. For example ‘ox/chatbot’host-strThe host to connect to. Defaults to ‘hub.oxen.ai’revision-strThe branch name or commit id to checkout. Defaults to ‘main’scheme-strThe scheme to use for the remote url. Default: ‘https’
create
empty-boolWhether to create an empty repo or not. Default: Falseis_public-boolWhether the repository is public or private. Default: False
exists
delete
checkout
revision-strThe name of the branch or commit id to checkout.create-boolWhether to create a new branch if it doesn’t exist. Default: False
ls
directory-strThe directory to list. If None, will list the root directory.page_num-intThe page number to return. Default: 1page_size-intThe number of items to return per page. Default: 100
scan
directory-strThe directory to list. If None, will list the root directorypage_size-intThe number of items to return per page. Default: 100
download
src-strThe path to the remote filedst-str | NoneThe path to the local file. If None, will download to the same path assrcrevision-str | NoneThe branch or commit id to download. Defaults toself.revision
add
src-strThe path to the local file to uploaddst-str | NoneThe directory to upload the file to. If None, will upload to the root directory.branch-str | NoneThe branch to upload the file to. Defaults toself.revision
status
commit
upload
src-strThe path to the local file to uploadfile_name-str | NoneThe name of the file to upload. If None, will use the name of the file insrcdst_dir-str | NoneThe directory to upload the file to. If None, will upload to the root directory.branch-str | NoneThe branch to upload the file to. Defaults toself.revision
metadata
file_exists
path-strThe path to the file to checkrevision-strThe revision to check against, defaults toself.revision
file_has_changes
local_path-strThe local path to the file to checkremote_path-strThe remote path to the file to check, will default tolocal_pathif not providedrevision-strThe revision to check against, defaults toself.revision
log
branch_exists
name-strThe name of the branch to check
branch
branches
list_workspaces
get_branch
branch-strThe name of the branch to return
create_branch
branch-strThe name to assign to the created branch
create_checkout_branch
branch-strThe name to assign to the created branch
merge
base_branch-strThe base branch to merge intohead_branch-strThe head branch to merge