Name | jupyter-ydoc JSON |
Version |
3.0.2
JSON |
| download |
home_page | None |
Summary | Document structures for collaborative editing using Ypy |
upload_time | 2024-12-02 17:06:17 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | BSD 3-Clause License |
keywords |
jupyter
pycrdt
yjs
|
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 [pycrdt](https://github.com/jupyter-server/pycrdt)-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
from importlib.metadata import entry_points
# for Python < 3.10, install importlib_metadata and do:
# from importlib_metadata import entry_points
ydocs = {ep.name: ep.load() for ep in 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.8",
"maintainer_email": null,
"keywords": "jupyter, pycrdt, yjs",
"author": null,
"author_email": "Jupyter Development Team <jupyter@googlegroups.com>",
"download_url": "https://files.pythonhosted.org/packages/a8/7b/bcd792dbbb6ab6d2db7fb20d924803d6facb340dc66501344d0882c7454d/jupyter_ydoc-3.0.2.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 [pycrdt](https://github.com/jupyter-server/pycrdt)-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\nfrom importlib.metadata import entry_points\n# for Python < 3.10, install importlib_metadata and do:\n# from importlib_metadata import entry_points\n\nydocs = {ep.name: ep.load() for ep in 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": "3.0.2",
"project_urls": {
"Homepage": "https://jupyter.org",
"Source": "https://github.com/jupyter-server/jupyter_ydoc"
},
"split_keywords": [
"jupyter",
" pycrdt",
" yjs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "097dcda7ac40a2ea172716354b2c451327cf0ca0060f000b6cef6d0486e3b083",
"md5": "81b0107f7e7826af9bf4857293c2237b",
"sha256": "76ed83ecd95e6eae1c21941235a6e4c7daff9639341821b8668f5060719eda61"
},
"downloads": -1,
"filename": "jupyter_ydoc-3.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "81b0107f7e7826af9bf4857293c2237b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11106,
"upload_time": "2024-12-02T17:06:15",
"upload_time_iso_8601": "2024-12-02T17:06:15.458443Z",
"url": "https://files.pythonhosted.org/packages/09/7d/cda7ac40a2ea172716354b2c451327cf0ca0060f000b6cef6d0486e3b083/jupyter_ydoc-3.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a87bbcd792dbbb6ab6d2db7fb20d924803d6facb340dc66501344d0882c7454d",
"md5": "b9f534fbe330de95cd1e9da7c2a22035",
"sha256": "d5f1d5bc3ec9579e587469496cd33d6f2a69e18e74329e130c231410ba1c31d0"
},
"downloads": -1,
"filename": "jupyter_ydoc-3.0.2.tar.gz",
"has_sig": false,
"md5_digest": "b9f534fbe330de95cd1e9da7c2a22035",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 956836,
"upload_time": "2024-12-02T17:06:17",
"upload_time_iso_8601": "2024-12-02T17:06:17.764153Z",
"url": "https://files.pythonhosted.org/packages/a8/7b/bcd792dbbb6ab6d2db7fb20d924803d6facb340dc66501344d0882c7454d/jupyter_ydoc-3.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-02 17:06:17",
"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"
}