Read a Remote Repository
If a remote repository already exists, you simply have to pass in the namespace/name of the remote repository you want to instantiate.Create a Remote Repository
If you do not already have a remote repository, you can create one directly from Pyhton. You may want to start with an empty remote repository and add your data later.README.md
file to the repository with an initial commit. If you want to create an empty repository without adding a README.md
you can pass empty=True
to the create
method.
File Exploration
To see the files in the remote repository you can usels
.
ls
method.
Note: the directories are paginated so you will need to use the page_num
parameter to view the next page of results.
There are also total_pages
, page_number
, and total_entries
attributes that give you information about the pagination.
Downloading Data
You can download subsets of the data if you do not need the entire data repository for your job.Checkout a Branch
If you have a data on a separate branch that you want to view you can checkout a branch by passing the branch name to thecheckout
method.
Python
Create a New Branch
Thecheckout
method also allows you to create a new branch if the branch does not exist.
Python
View Branches
To see all the branches in the remote repository you can use thebranches
method.
Python
Point Local to Remote
Remote repositories are identified by a remote URL. This is the URL that you can use to clone the repository.Python
Python
Python