CSV
Last updated
Last updated
DoltHub provides a CSV API for fetching table data as CSVs. You can request a CSV for an individual table or a zip of all table CSVs at a specified commit or branch.
Please make sure to send your requests to https://www.dolthub.com
instead of https://dolthub.com
.
We will use an example DoltHub database, and the Python requests
library to explore it in the Python console.
One Table
Download the table incidents
from main
branch:
Download the table incidents
at a commit hash:
All Tables
Download a ZIP file of all database tables from the main
branch:
Download a ZIP file of all database tables at a commit hash:
You can use the token in the header when downloading CSVs from a private database.
API tokens can be used to authenticate calls to the CSV API over Basic . This is useful for downloading data from private databases.