Skip to main content

Current State - Deprecated

DoltPy was created in an era where Dolt was a command-line tool. We've worked very hard to make Dolt a MySQL compatible database. To use Dolt with Python, start a Dolt SQL server using dolt sql-server and connect with any Python MySQL client. Use the exposed Dolt stored procedures or system tables to access version control functionality. Popular libraries like Pandas all support MySQL connectivity.

Dolt MySQL client support works in any language, not just Python. Thus, it is more time efficient for us to focus on that interface.

DoltPy

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.

Installation

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

$ sudo bash -c 'curl -L https://github.com/liquidata-inc/dolt/releases/latest/download/install.sh | 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

Overview

Doltpy is broken up into modules.

doltpy.cli

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.

It's implementation has moved to a separate repository here

doltpy.cli.read 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, ...}, ...]

doltpy.sql

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 doltpy.cli.read and doltpy.cli.write for writing CSV files, pandas.DataFrame objects, rows, and columns.

doltpy.sql.sql_sync

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.

doltpy.etl

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.

Metadata

Release files for doltpy 2.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doltpy 2.0.14
File Size Uploaded
doltpy-2.0.14.tar.gz 549.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for doltpy 2.0.14
File Interpreter ABI Platform
doltpy-2.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / doltpy-2.0.14.tar.gz

Download URL doltpy-2.0.14.tar.gz
Size 549.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8edf22c680db9866e56b5fb4fd09b59c39e2e75001ae36e3e02b60d786a956e8
BLAKE2b-256 checksum
How to use checksums
759646f3a16beb0265ed75e8bcc3cde6f83e2be7efebcac6953bb3205bc6e7f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.8.16 Linux/5.15.0-1031-azure

Release files / doltpy-2.0.14-py3-none-any.whl

Download URL doltpy-2.0.14-py3-none-any.whl
Size 553.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0edf3f0fb03edf9b639d538b623318f28857566e10e44ccdbab85d028827bcfe
BLAKE2b-256 checksum
How to use checksums
87ec9a7188967b521c251fbfd6efcb17e39215a41c4a99ba6df56a7e6dca4e0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.8.16 Linux/5.15.0-1031-azure

Release history Release notifications | RSS feed

This release

2.0.14 This release

2 release files

2.0.12

2 release files

2.0.11

2 release files

2.0.10

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.1.10

1 release file

1.1.9

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.20

1 release file

1.0.19

1 release file

1.0.18

1 release file

1.0.17

1 release file

1.0.16

1 release file

1.0.15

1 release file

1.0.14

1 release file

1.0.13

1 release file

1.0.12

1 release file

1.0.11

1 release file

1.0.10

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.2

1 release file

0.0.1

1 release file

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page