Skip to main content

A Python package for using Dolt database via Python.

Project description


This is DoltPy, the Python API for Dolt. Python is the language of choice for data science and data engineering, and thus we thought it would be wise to publish an API for building automated workflows on top of Dolt and DoltHub, a collaboration platform for Dolt databases.


You need to install Dolt, which is documented here. It's easy for *nix users:

$ sudo bash -c 'curl -L | sudo bash'

We also distribute Dolt as a Homebrew formula:

$ brew install dolt

Finally, for Windows users our release page has .zip and .msi files.

Once Dolt is installed you can install Doltpy using pip:

$ pip install doltpy


Doltpy is broken up into modules.


This is the most important module. It effectively wraps the Dolt command-line-interface (CLI) that is exposed by the Go binary. The CLI is exposed more or less exactly as it is implemented, returning wrapper objects where appropriate. and doltpy.cli.write

These modules provide basic read and write interfaces for reading and writing a variety of tabular data formats, including:

  • CSV files
  • pandas.DataFrame
  • columns, that is dictionaries of lists, i.e. {'col': [...vals...], ...}
  • rows, that is lists of dictionaries, i.e. [{'col': val, ...}, ...]


This module provides tools for interacting with Dolt via a Python based SQL connector. The most important class is DoltSQLContext, which has concrete subclasses DoltSQLServerContext and DoltSQLEngineContext. DoltSQLServerContext is for users that want to write Python scripts that use and manage the Dolt SQL Server instance as a child process. DoltSQLEngineContext is for users who want to interact with a remote Dolt SQL Server.

These classes have equivalents of the read and write functions in and doltpy.cli.write for writing CSV files, pandas.DataFrame objects, rows, and columns.


This package provides tools for syncing data to and from Dolt, and other relational databases. Currently there is support for MySQL, Postgres, and Oracle. You can find a more detailed description of how to use SQL Sync tools here.


This module provides a set of tools for scripting ETL/ELT workflows. At Liquidata we use it internally to push datasets onto DoltHub.

More Information

As alluded to above, you can find a more detailed description of Doltpy here.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for doltpy, version 2.0.7
Filename, size File type Python version Upload date Hashes
Filename, size doltpy-2.0.7-py3-none-any.whl (31.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size doltpy-2.0.7.tar.gz (24.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page