databooks


Namedatabooks JSON
Version 1.3.10 PyPI version JSON
download
home_pagehttps://datarootsio.github.io/databooks/
SummaryA CLI tool to resolve git conflicts and remove metadata in notebooks.
upload_time2023-10-03 12:26:07
maintainer
docs_urlNone
authorMurilo Cunha
requires_python>=3.7,<4.0
licenseMIT
keywords jupyter-notebooks cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://datarootsio.github.io/databooks/"><img alt="logo" src="https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/logo.png"></a>
</p>
<p align="center">
  <a href="https://dataroots.io"><img alt="Maintained by dataroots" src="https://dataroots.io/maintained-rnd.svg" /></a>
  <a href="https://pypi.org/project/databooks/"><img alt="Python versions" src="https://img.shields.io/pypi/pyversions/databooks" /></a>
  <a href="https://pypi.org/project/databooks/"><img alt="PiPy" src="https://img.shields.io/pypi/v/databooks" /></a>
  <a href="https://pepy.tech/project/databooks"><img alt="Downloads" src="https://pepy.tech/badge/databooks" /></a>
  <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg" /></a>
  <a href="http://mypy-lang.org/"><img alt="Mypy checked" src="https://img.shields.io/badge/mypy-checked-1f5082.svg" /></a>
  <a href="https://pepy.tech/project/databooks"><img alt="Codecov" src="https://codecov.io/github/datarootsio/databooks/main/graph/badge.svg" /></a>
  <a href="https://github.com/datarootsio/databooks/actions"><img alt="test" src="https://github.com/datarootsio/databooks/actions/workflows/test.yml/badge.svg" /></a>
</p>


`databooks` is a package to ease the collaboration between data scientists using
[Jupyter notebooks](https://jupyter.org/), by reducing the number of git conflicts between
different notebooks and resolution of git conflicts when encountered.

The key features include:

- CLI tool
  - Clear notebook metadata
  - Resolve git conflicts
- Simple to use
- Simple API for using modelling and comparing notebooks using [Pydantic](https://pydantic-docs.helpmanual.io/)

## Requirements

`databooks` is built on top of:

- Python 3.7+
- [Typer](https://typer.tiangolo.com/)
- [Rich](https://rich.readthedocs.io/en/latest/)
- [Pydantic](https://pydantic-docs.helpmanual.io/)
- [GitPython](https://gitpython.readthedocs.io/en/stable/tutorial.html)
- [Tomli](https://github.com/hukkin/tomli)

## Installation

```
pip install databooks
```

## Usage

### Clear metadata

Simply specify the paths for notebook files to remove metadata. By doing so, we can
already avoid many of the conflicts.

```console
$ databooks meta [OPTIONS] PATHS...
```

![databooks meta demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-meta.gif)

### Fix git conflicts for notebooks

Specify the paths for notebook files with conflicts to be fixed. Then, `databooks` finds
the source notebooks that caused the conflicts and compares them (so no JSON manipulation!)

```console
$ databooks fix [OPTIONS] PATHS...
```

![databooks fix demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-fix.gif)

### Assert notebook metadata

Specify paths of notebooks to be checked, an expression or recipe of what you'd like to
enforce. `databooks` will run your checks and raise errors if any notebook does not
comply with the desired metadata values. This advanced feature allows users to enforce
cell tags, sequential cell execution, maximum number of cells, among many other things!

Check out our [docs](https://databooks.dev/latest/usage/overview/#databooks-assert) for more!

```console
$ databooks assert [OPTIONS] PATHS...
```

![databooks assert demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-assert.gif)

### Show rich notebook

Instead of launching Jupyter and opening the browser to inspect notebooks, have a quick
look at them in the terminal. All you need is to specify the path(s) of the notebook(s).

```console
$ databooks show [OPTIONS] PATHS...
```

![databooks show demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-show.gif)

### Show rich notebook diffs

Similar to git diff, but for notebooks! Show a rich diff of the notebooks in the
terminal. Works for comparing git index with the current working directory, comparing
branches or blobs.

```console
$ databooks diff [OPTIONS] [REF_BASE] [REF_REMOTE] [PATHS]...
```

![databooks diff demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-diff.gif)

## License

This project is licensed under the terms of the MIT license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://datarootsio.github.io/databooks/",
    "name": "databooks",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "jupyter-notebooks,cli",
    "author": "Murilo Cunha",
    "author_email": "murilo@dataroots.io",
    "download_url": "https://files.pythonhosted.org/packages/f6/10/3371b9f4e8f07f9fbaf87a30cf1eec8ccf66a1cd14f1fffe5fc0d7ef2b6b/databooks-1.3.10.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a href=\"https://datarootsio.github.io/databooks/\"><img alt=\"logo\" src=\"https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/logo.png\"></a>\n</p>\n<p align=\"center\">\n  <a href=\"https://dataroots.io\"><img alt=\"Maintained by dataroots\" src=\"https://dataroots.io/maintained-rnd.svg\" /></a>\n  <a href=\"https://pypi.org/project/databooks/\"><img alt=\"Python versions\" src=\"https://img.shields.io/pypi/pyversions/databooks\" /></a>\n  <a href=\"https://pypi.org/project/databooks/\"><img alt=\"PiPy\" src=\"https://img.shields.io/pypi/v/databooks\" /></a>\n  <a href=\"https://pepy.tech/project/databooks\"><img alt=\"Downloads\" src=\"https://pepy.tech/badge/databooks\" /></a>\n  <a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" /></a>\n  <a href=\"http://mypy-lang.org/\"><img alt=\"Mypy checked\" src=\"https://img.shields.io/badge/mypy-checked-1f5082.svg\" /></a>\n  <a href=\"https://pepy.tech/project/databooks\"><img alt=\"Codecov\" src=\"https://codecov.io/github/datarootsio/databooks/main/graph/badge.svg\" /></a>\n  <a href=\"https://github.com/datarootsio/databooks/actions\"><img alt=\"test\" src=\"https://github.com/datarootsio/databooks/actions/workflows/test.yml/badge.svg\" /></a>\n</p>\n\n\n`databooks` is a package to ease the collaboration between data scientists using\n[Jupyter notebooks](https://jupyter.org/), by reducing the number of git conflicts between\ndifferent notebooks and resolution of git conflicts when encountered.\n\nThe key features include:\n\n- CLI tool\n  - Clear notebook metadata\n  - Resolve git conflicts\n- Simple to use\n- Simple API for using modelling and comparing notebooks using [Pydantic](https://pydantic-docs.helpmanual.io/)\n\n## Requirements\n\n`databooks` is built on top of:\n\n- Python 3.7+\n- [Typer](https://typer.tiangolo.com/)\n- [Rich](https://rich.readthedocs.io/en/latest/)\n- [Pydantic](https://pydantic-docs.helpmanual.io/)\n- [GitPython](https://gitpython.readthedocs.io/en/stable/tutorial.html)\n- [Tomli](https://github.com/hukkin/tomli)\n\n## Installation\n\n```\npip install databooks\n```\n\n## Usage\n\n### Clear metadata\n\nSimply specify the paths for notebook files to remove metadata. By doing so, we can\nalready avoid many of the conflicts.\n\n```console\n$ databooks meta [OPTIONS] PATHS...\n```\n\n![databooks meta demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-meta.gif)\n\n### Fix git conflicts for notebooks\n\nSpecify the paths for notebook files with conflicts to be fixed. Then, `databooks` finds\nthe source notebooks that caused the conflicts and compares them (so no JSON manipulation!)\n\n```console\n$ databooks fix [OPTIONS] PATHS...\n```\n\n![databooks fix demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-fix.gif)\n\n### Assert notebook metadata\n\nSpecify paths of notebooks to be checked, an expression or recipe of what you'd like to\nenforce. `databooks` will run your checks and raise errors if any notebook does not\ncomply with the desired metadata values. This advanced feature allows users to enforce\ncell tags, sequential cell execution, maximum number of cells, among many other things!\n\nCheck out our [docs](https://databooks.dev/latest/usage/overview/#databooks-assert) for more!\n\n```console\n$ databooks assert [OPTIONS] PATHS...\n```\n\n![databooks assert demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-assert.gif)\n\n### Show rich notebook\n\nInstead of launching Jupyter and opening the browser to inspect notebooks, have a quick\nlook at them in the terminal. All you need is to specify the path(s) of the notebook(s).\n\n```console\n$ databooks show [OPTIONS] PATHS...\n```\n\n![databooks show demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-show.gif)\n\n### Show rich notebook diffs\n\nSimilar to git diff, but for notebooks! Show a rich diff of the notebooks in the\nterminal. Works for comparing git index with the current working directory, comparing\nbranches or blobs.\n\n```console\n$ databooks diff [OPTIONS] [REF_BASE] [REF_REMOTE] [PATHS]...\n```\n\n![databooks diff demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-diff.gif)\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A CLI tool to resolve git conflicts and remove metadata in notebooks.",
    "version": "1.3.10",
    "project_urls": {
        "Homepage": "https://datarootsio.github.io/databooks/",
        "Repository": "https://github.com/datarootsio/databooks/"
    },
    "split_keywords": [
        "jupyter-notebooks",
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b5788a3a87734eb9e9515afc686d0cf78509d17a55ab87d55304aab7b7121d3",
                "md5": "adafc4409b164e388286f3b5d09d2bfc",
                "sha256": "24533a82039bac3f987fe4d22a2cc3056f62f734c16b33b2b32be5dcd575b9ae"
            },
            "downloads": -1,
            "filename": "databooks-1.3.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "adafc4409b164e388286f3b5d09d2bfc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 31422,
            "upload_time": "2023-10-03T12:26:05",
            "upload_time_iso_8601": "2023-10-03T12:26:05.637662Z",
            "url": "https://files.pythonhosted.org/packages/5b/57/88a3a87734eb9e9515afc686d0cf78509d17a55ab87d55304aab7b7121d3/databooks-1.3.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f6103371b9f4e8f07f9fbaf87a30cf1eec8ccf66a1cd14f1fffe5fc0d7ef2b6b",
                "md5": "649c969ed4c18a90386e3da7d45f0fe5",
                "sha256": "325f709cbcc55c43607bdfa0489fb832406c094547f959aaa649a2dae42d7351"
            },
            "downloads": -1,
            "filename": "databooks-1.3.10.tar.gz",
            "has_sig": false,
            "md5_digest": "649c969ed4c18a90386e3da7d45f0fe5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 26260,
            "upload_time": "2023-10-03T12:26:07",
            "upload_time_iso_8601": "2023-10-03T12:26:07.232338Z",
            "url": "https://files.pythonhosted.org/packages/f6/10/3371b9f4e8f07f9fbaf87a30cf1eec8ccf66a1cd14f1fffe5fc0d7ef2b6b/databooks-1.3.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-03 12:26:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "datarootsio",
    "github_project": "databooks",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "databooks"
}
        
Elapsed time: 0.12653s