Name | jupyter-ydoc JSON |
Version |
2.1.3
JSON |
| download |
home_page | None |
Summary | Document structures for collaborative editing using Ypy |
upload_time | 2024-10-18 07:07:01 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | BSD 3-Clause License |
keywords |
jupyter
ypy
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![Build Status](https://github.com/jupyter-server/jupyter_ydoc/workflows/Tests/badge.svg)](https://github.com/jupyter-server/jupyter_ydoc/actions)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI](https://img.shields.io/pypi/v/jupyter-ydoc)](https://pypi.org/project/jupyter-ydoc/)
[![npm (scoped)](https://img.shields.io/npm/v/@jupyter/ydoc)](https://www.npmjs.com/package/@jupyter/ydoc)
# jupyter_ydoc
`jupyter_ydoc` provides [Ypy](https://github.com/y-crdt/ypy)-based data structures for various
documents used in the Jupyter ecosystem. Built-in documents include:
- `YBlob`: a generic immutable binary document.
- `YUnicode`: a generic UTF8-encoded text document (`YFile` is an alias to `YUnicode`).
- `YNotebook`: a Jupyter notebook document.
These documents are registered via an entry point under the `"jupyter_ydoc"` group as `"blob"`,
`"unicode"` (or `"file"`), and `"notebook"`, respectively. You can access them as follows:
```py
from jupyter_ydoc import ydocs
print(ydocs)
# {
# 'blob': <class 'jupyter_ydoc.yblob.YBlob'>,
# 'file': <class 'jupyter_ydoc.yfile.YFile'>,
# 'notebook': <class 'jupyter_ydoc.ynotebook.YNotebook'>,
# 'unicode': <class 'jupyter_ydoc.yunicode.YUnicode'>
# }
```
Which is just a shortcut to:
```py
import pkg_resources
ydocs = {ep.name: ep.load() for ep in pkg_resources.iter_entry_points(group="jupyter_ydoc")}
```
Or directly import them:
```py
from jupyter_ydoc import YBlob, YUnicode, YNotebook
```
The `"jupyter_ydoc"` entry point group can be populated with your own documents, e.g. by adding the
following to your package's `pyproject.toml`:
```
[project.entry-points.jupyter_ydoc]
my_document = "my_package.my_file:MyDocumentClass"
```
Raw data
{
"_id": null,
"home_page": null,
"name": "jupyter-ydoc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "jupyter, ypy",
"author": null,
"author_email": "Jupyter Development Team <jupyter@googlegroups.com>",
"download_url": "https://files.pythonhosted.org/packages/a6/23/e36a1acf55f6791222461d8842ae38b281e44d3f0bb88c85de16d2bcbf2d/jupyter_ydoc-2.1.3.tar.gz",
"platform": null,
"description": "[![Build Status](https://github.com/jupyter-server/jupyter_ydoc/workflows/Tests/badge.svg)](https://github.com/jupyter-server/jupyter_ydoc/actions)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![PyPI](https://img.shields.io/pypi/v/jupyter-ydoc)](https://pypi.org/project/jupyter-ydoc/)\n[![npm (scoped)](https://img.shields.io/npm/v/@jupyter/ydoc)](https://www.npmjs.com/package/@jupyter/ydoc)\n\n# jupyter_ydoc\n\n`jupyter_ydoc` provides [Ypy](https://github.com/y-crdt/ypy)-based data structures for various\ndocuments used in the Jupyter ecosystem. Built-in documents include:\n- `YBlob`: a generic immutable binary document.\n- `YUnicode`: a generic UTF8-encoded text document (`YFile` is an alias to `YUnicode`).\n- `YNotebook`: a Jupyter notebook document.\n\nThese documents are registered via an entry point under the `\"jupyter_ydoc\"` group as `\"blob\"`,\n`\"unicode\"` (or `\"file\"`), and `\"notebook\"`, respectively. You can access them as follows:\n\n```py\nfrom jupyter_ydoc import ydocs\n\nprint(ydocs)\n# {\n# 'blob': <class 'jupyter_ydoc.yblob.YBlob'>,\n# 'file': <class 'jupyter_ydoc.yfile.YFile'>,\n# 'notebook': <class 'jupyter_ydoc.ynotebook.YNotebook'>,\n# 'unicode': <class 'jupyter_ydoc.yunicode.YUnicode'>\n# }\n```\n\nWhich is just a shortcut to:\n\n```py\nimport pkg_resources\n\nydocs = {ep.name: ep.load() for ep in pkg_resources.iter_entry_points(group=\"jupyter_ydoc\")}\n```\n\nOr directly import them:\n```py\nfrom jupyter_ydoc import YBlob, YUnicode, YNotebook\n```\n\nThe `\"jupyter_ydoc\"` entry point group can be populated with your own documents, e.g. by adding the\nfollowing to your package's `pyproject.toml`:\n\n```\n[project.entry-points.jupyter_ydoc]\nmy_document = \"my_package.my_file:MyDocumentClass\"\n```\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "Document structures for collaborative editing using Ypy",
"version": "2.1.3",
"project_urls": {
"Homepage": "https://jupyter.org",
"Source": "https://github.com/jupyter-server/jupyter_ydoc"
},
"split_keywords": [
"jupyter",
" ypy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f15ffbd36a7d5c3492f06957c26cf2b2bcbc2bc5c64b56f1b925a13700ba3655",
"md5": "4d0f040dfe5c330f3038ebae01e16f84",
"sha256": "4cf405bb3b2e3c7d64a0a1b431fa1c33ffe6d510d35ecec75070a84c1bab4259"
},
"downloads": -1,
"filename": "jupyter_ydoc-2.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4d0f040dfe5c330f3038ebae01e16f84",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 11037,
"upload_time": "2024-10-18T07:06:59",
"upload_time_iso_8601": "2024-10-18T07:06:59.897259Z",
"url": "https://files.pythonhosted.org/packages/f1/5f/fbd36a7d5c3492f06957c26cf2b2bcbc2bc5c64b56f1b925a13700ba3655/jupyter_ydoc-2.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a623e36a1acf55f6791222461d8842ae38b281e44d3f0bb88c85de16d2bcbf2d",
"md5": "3c3a7bcf3e27b1214b14d7fd645f5152",
"sha256": "80830d501f48ca1f03d3eb3452371c607ff5c5703278a2e03e2af54765d0dd74"
},
"downloads": -1,
"filename": "jupyter_ydoc-2.1.3.tar.gz",
"has_sig": false,
"md5_digest": "3c3a7bcf3e27b1214b14d7fd645f5152",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 955367,
"upload_time": "2024-10-18T07:07:01",
"upload_time_iso_8601": "2024-10-18T07:07:01.762174Z",
"url": "https://files.pythonhosted.org/packages/a6/23/e36a1acf55f6791222461d8842ae38b281e44d3f0bb88c85de16d2bcbf2d/jupyter_ydoc-2.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-18 07:07:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jupyter-server",
"github_project": "jupyter_ydoc",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "jupyter-ydoc"
}