pycrdt-sticky-xml


Namepycrdt-sticky-xml JSON
Version 0.12.28 PyPI version JSON
download
home_pageNone
SummaryPython bindings for Yrs with sticky_index support for XML types
upload_time2025-07-16 01:51:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords crdt xml sticky-index collaborative-editing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pycrdt-sticky-xml

A fork of [pycrdt](https://github.com/y-crdt/pycrdt) that adds sticky_index support for XML types (XmlElement and XmlText).

## What's New

This fork extends the original pycrdt library by adding `sticky_index` functionality to XML types:

- **XmlElement.sticky_index()**: Create sticky indices for XML element children
- **XmlText.sticky_index()**: Create sticky indices within XML text content

## Installation

```bash
pip install pycrdt-sticky-xml
```

## Usage

```python
from pycrdt_sticky_xml import Doc, XmlFragment, XmlElement, XmlText, Assoc

# Create a document with XML content
doc = Doc()
frag = doc.get("content", type=XmlFragment)

# Add XML text
text = XmlText("Hello World")
frag.children.append(text)

# Create a sticky index at position 5
idx = text.sticky_index(5, Assoc.AFTER)

# Insert text before the sticky position
text.insert(0, "Say ")

# The sticky index maintains its semantic position
print(idx.get_index())  # Now points to position 9 (after "Say Hello")
```

## Features

- All features from the original pycrdt
- Sticky indices for XmlElement children
- Sticky indices for XmlText content
- Full compatibility with Yrs collaborative editing

## Original Project

This is a fork of [pycrdt](https://github.com/y-crdt/pycrdt). All credit for the core functionality goes to the original authors.

## License

MIT License (same as original pycrdt)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pycrdt-sticky-xml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "crdt, xml, sticky-index, collaborative-editing",
    "author": null,
    "author_email": "David Brochart <david.brochart@gmail.com>, Joshua Lawrence <josh@velvetfs.com>",
    "download_url": "https://files.pythonhosted.org/packages/67/c9/fd0cb7eea4a796c00f42d1e7edb88214b5beb9cd0cb9233c195050306d2f/pycrdt_sticky_xml-0.12.28.tar.gz",
    "platform": null,
    "description": "# pycrdt-sticky-xml\n\nA fork of [pycrdt](https://github.com/y-crdt/pycrdt) that adds sticky_index support for XML types (XmlElement and XmlText).\n\n## What's New\n\nThis fork extends the original pycrdt library by adding `sticky_index` functionality to XML types:\n\n- **XmlElement.sticky_index()**: Create sticky indices for XML element children\n- **XmlText.sticky_index()**: Create sticky indices within XML text content\n\n## Installation\n\n```bash\npip install pycrdt-sticky-xml\n```\n\n## Usage\n\n```python\nfrom pycrdt_sticky_xml import Doc, XmlFragment, XmlElement, XmlText, Assoc\n\n# Create a document with XML content\ndoc = Doc()\nfrag = doc.get(\"content\", type=XmlFragment)\n\n# Add XML text\ntext = XmlText(\"Hello World\")\nfrag.children.append(text)\n\n# Create a sticky index at position 5\nidx = text.sticky_index(5, Assoc.AFTER)\n\n# Insert text before the sticky position\ntext.insert(0, \"Say \")\n\n# The sticky index maintains its semantic position\nprint(idx.get_index())  # Now points to position 9 (after \"Say Hello\")\n```\n\n## Features\n\n- All features from the original pycrdt\n- Sticky indices for XmlElement children\n- Sticky indices for XmlText content\n- Full compatibility with Yrs collaborative editing\n\n## Original Project\n\nThis is a fork of [pycrdt](https://github.com/y-crdt/pycrdt). All credit for the core functionality goes to the original authors.\n\n## License\n\nMIT License (same as original pycrdt)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python bindings for Yrs with sticky_index support for XML types",
    "version": "0.12.28",
    "project_urls": {
        "Bug Tracker": "https://github.com/yourusername/pycrdt-sticky-xml/issues",
        "Homepage": "https://github.com/yourusername/pycrdt-sticky-xml",
        "Original Project": "https://github.com/y-crdt/pycrdt"
    },
    "split_keywords": [
        "crdt",
        " xml",
        " sticky-index",
        " collaborative-editing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ea0b84023ecb52dfcbb3531222fa4eaeffd64099e4cccc806a836b9f7f8ae960",
                "md5": "b22ab83ffd3b005560d367fe69a55227",
                "sha256": "cc28edbf82dfc345459d2b1e9d8cf25d49fe7696be1c019041e425afab0574a5"
            },
            "downloads": -1,
            "filename": "pycrdt_sticky_xml-0.12.28-cp312-cp312-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "b22ab83ffd3b005560d367fe69a55227",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 849982,
            "upload_time": "2025-07-16T01:51:30",
            "upload_time_iso_8601": "2025-07-16T01:51:30.414091Z",
            "url": "https://files.pythonhosted.org/packages/ea/0b/84023ecb52dfcbb3531222fa4eaeffd64099e4cccc806a836b9f7f8ae960/pycrdt_sticky_xml-0.12.28-cp312-cp312-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "67c9fd0cb7eea4a796c00f42d1e7edb88214b5beb9cd0cb9233c195050306d2f",
                "md5": "7bc0f3382fb00723d1fa8ea997e29b5d",
                "sha256": "30b211dbf3be0f98f2b6d6b0ff4f7cbe64b3842eedd6bb321b9e47a56e98b1df"
            },
            "downloads": -1,
            "filename": "pycrdt_sticky_xml-0.12.28.tar.gz",
            "has_sig": false,
            "md5_digest": "7bc0f3382fb00723d1fa8ea997e29b5d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 136801,
            "upload_time": "2025-07-16T01:51:31",
            "upload_time_iso_8601": "2025-07-16T01:51:31.779895Z",
            "url": "https://files.pythonhosted.org/packages/67/c9/fd0cb7eea4a796c00f42d1e7edb88214b5beb9cd0cb9233c195050306d2f/pycrdt_sticky_xml-0.12.28.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-16 01:51:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "pycrdt-sticky-xml",
    "github_not_found": true,
    "lcname": "pycrdt-sticky-xml"
}
        
Elapsed time: 0.89134s