Name | jupyter-ydoc JSON |
Version |
2.0.1
JSON |
| download |
home_page | |
Summary | Document structures for collaborative editing using Ypy |
upload_time | 2023-12-26 16:06:42 |
maintainer | |
docs_url | None |
author | |
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": "",
"name": "jupyter-ydoc",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "jupyter,ypy",
"author": "",
"author_email": "Jupyter Development Team <jupyter@googlegroups.com>",
"download_url": "https://files.pythonhosted.org/packages/51/31/efad19f331c5ed226a743480184a4001bf6f9c81242c6f9be1498924f304/jupyter_ydoc-2.0.1.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.0.1",
"project_urls": {
"Homepage": "https://jupyter.org",
"Source": "https://github.com/jupyter-server/jupyter_ydoc"
},
"split_keywords": [
"jupyter",
"ypy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "789be6af945cfc7b065bc704f54465b0c480d2d08f3a5118d1b3e115d41b4f6c",
"md5": "ab545a33154b7cb0391a839716b4df64",
"sha256": "dd917fd281f1cfed5816a659aec7165fa5aedea3e4ae148783426c4be93cf1f9"
},
"downloads": -1,
"filename": "jupyter_ydoc-2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ab545a33154b7cb0391a839716b4df64",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 10564,
"upload_time": "2023-12-26T16:06:39",
"upload_time_iso_8601": "2023-12-26T16:06:39.973495Z",
"url": "https://files.pythonhosted.org/packages/78/9b/e6af945cfc7b065bc704f54465b0c480d2d08f3a5118d1b3e115d41b4f6c/jupyter_ydoc-2.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5131efad19f331c5ed226a743480184a4001bf6f9c81242c6f9be1498924f304",
"md5": "a23156aa01a6f7720c148bfeacbfc204",
"sha256": "716dda8cb8af881fec2fbc88aea3fb0d3bb24bbeb80a99a8aff2e01d089d5b0d"
},
"downloads": -1,
"filename": "jupyter_ydoc-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "a23156aa01a6f7720c148bfeacbfc204",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 954635,
"upload_time": "2023-12-26T16:06:42",
"upload_time_iso_8601": "2023-12-26T16:06:42.664279Z",
"url": "https://files.pythonhosted.org/packages/51/31/efad19f331c5ed226a743480184a4001bf6f9c81242c6f9be1498924f304/jupyter_ydoc-2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-26 16:06:42",
"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"
}