doltpy


Namedoltpy JSON
Version 2.0.14 PyPI version JSON
download
home_pagehttps://github.com/dolthub/doltpy
SummaryA Python package for using Dolt database via Python.
upload_time2023-01-30 23:11:27
maintainer
docs_urlNone
authorOscar Batori
requires_python>=3.6.1,<4.0
license
keywords dolt liquidata dolthub etl elt mlops
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://docs.dolthub.com/sql-reference/supported-clients/clients#python). Use the exposed Dolt [stored procedures](https://docs.dolthub.com/sql-reference/version-control/dolt-sql-procedures) or [system tables](https://docs.dolthub.com/sql-reference/version-control/dolt-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](https://github.com/dolthub/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](https://www.dolthub.com/), a collaboration platform for Dolt databases.

## Installation
You need to install Dolt, which is documented [here](https://docs.dolthub.com/introduction/installation). 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](https://github.com/dolthub/doltcli)

#### `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](https://docs.dolthub.com/guides/sql-sync).

### `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](https://docs.dolthub.com/guides/python/doltpy).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dolthub/doltpy",
    "name": "doltpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6.1,<4.0",
    "maintainer_email": "",
    "keywords": "Dolt,Liquidata,DoltHub,ETL,ELT,MLOps",
    "author": "Oscar Batori",
    "author_email": "oscar@dolthub.com",
    "download_url": "https://files.pythonhosted.org/packages/75/96/46f3a16beb0265ed75e8bcc3cde6f83e2be7efebcac6953bb3205bc6e7f8/doltpy-2.0.14.tar.gz",
    "platform": null,
    "description": "# Current State - Deprecated\n\nDoltPy 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](https://docs.dolthub.com/sql-reference/supported-clients/clients#python). Use the exposed Dolt [stored procedures](https://docs.dolthub.com/sql-reference/version-control/dolt-sql-procedures) or [system tables](https://docs.dolthub.com/sql-reference/version-control/dolt-system-tables) to access version control functionality. Popular libraries like Pandas all support MySQL connectivity.\n\nDolt MySQL client support works in any language, not just Python. Thus, it is more time efficient for us to focus on that interface.\n\n## DoltPy\nThis is DoltPy, the Python API for [Dolt](https://github.com/dolthub/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](https://www.dolthub.com/), a collaboration platform for Dolt databases.\n\n## Installation\nYou need to install Dolt, which is documented [here](https://docs.dolthub.com/introduction/installation). It's easy for *nix users:\n```\n$ sudo bash -c 'curl -L https://github.com/liquidata-inc/dolt/releases/latest/download/install.sh | sudo bash'\n```\nWe also distribute Dolt as a Homebrew formula:\n```\n$ brew install dolt\n```\nFinally, for Windows users our release page has `.zip` and `.msi` files.\n\nOnce Dolt is installed you can install Doltpy using `pip`:\n```\n$ pip install doltpy\n```\n\n## Overview\nDoltpy is broken up into modules. \n\n### `doltpy.cli`\nThis 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.\n\nIt's implementation has moved to a separate repository [here](https://github.com/dolthub/doltcli)\n\n#### `doltpy.cli.read` and `doltpy.cli.write`\nThese modules provide basic read and write interfaces for reading and writing a variety of tabular data formats, including:\n- CSV files\n- `pandas.DataFrame`\n- columns, that is dictionaries of lists, i.e. `{'col': [...vals...], ...}`\n- rows, that is lists of dictionaries, i.e. `[{'col': val, ...}, ...]`\n\n### `doltpy.sql`\nThis 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.\n\nThese 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.\n\n#### `doltpy.sql.sql_sync`\nThis 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](https://docs.dolthub.com/guides/sql-sync).\n\n### `doltpy.etl`\nThis module provides a set of tools for scripting ETL/ELT workflows. At Liquidata we use it internally to push datasets onto DoltHub.\n\n## More Information\nAs alluded to above, you can find a more detailed description of Doltpy [here](https://docs.dolthub.com/guides/python/doltpy).\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Python package for using Dolt database via Python.",
    "version": "2.0.14",
    "split_keywords": [
        "dolt",
        "liquidata",
        "dolthub",
        "etl",
        "elt",
        "mlops"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87ec9a7188967b521c251fbfd6efcb17e39215a41c4a99ba6df56a7e6dca4e0f",
                "md5": "ed5624bbc18d3a5729dec42bbe024035",
                "sha256": "0edf3f0fb03edf9b639d538b623318f28857566e10e44ccdbab85d028827bcfe"
            },
            "downloads": -1,
            "filename": "doltpy-2.0.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ed5624bbc18d3a5729dec42bbe024035",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6.1,<4.0",
            "size": 553635,
            "upload_time": "2023-01-30T23:11:24",
            "upload_time_iso_8601": "2023-01-30T23:11:24.991611Z",
            "url": "https://files.pythonhosted.org/packages/87/ec/9a7188967b521c251fbfd6efcb17e39215a41c4a99ba6df56a7e6dca4e0f/doltpy-2.0.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "759646f3a16beb0265ed75e8bcc3cde6f83e2be7efebcac6953bb3205bc6e7f8",
                "md5": "3b0b5d310600844a915a3c4e127a2c65",
                "sha256": "8edf22c680db9866e56b5fb4fd09b59c39e2e75001ae36e3e02b60d786a956e8"
            },
            "downloads": -1,
            "filename": "doltpy-2.0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "3b0b5d310600844a915a3c4e127a2c65",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6.1,<4.0",
            "size": 549108,
            "upload_time": "2023-01-30T23:11:27",
            "upload_time_iso_8601": "2023-01-30T23:11:27.309280Z",
            "url": "https://files.pythonhosted.org/packages/75/96/46f3a16beb0265ed75e8bcc3cde6f83e2be7efebcac6953bb3205bc6e7f8/doltpy-2.0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-30 23:11:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "dolthub",
    "github_project": "doltpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "doltpy"
}
        
Elapsed time: 0.22105s