| Name | sequence-edits JSON |
| Version |
0.1.9
JSON |
| download |
| home_page | None |
| Summary | Compressed representation of sequence edits |
| upload_time | 2024-08-13 21:07:39 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.10 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# Sequence Edits
> Compressed representation of sequence edits
## Edits
```python
class Skip:
id: int
tag = 'skip'
class Insert:
idx: int
value: T
tag = 'insert'
Edit = Skip | Insert
```
All edits are applied w.r.t. the original list. So, order of edits only affects the order in which values are insterted to a same index.
## Usage
```python
import sequence_edits as se
edits = [
se.Insert(idx=1, value='the'),
se.Skip(idx=4)
]
xs = ['And', 'earth', 'was', 'without', 'no', 'form']
list(se.apply(edits, xs))
# ['And', 'the', 'earth', 'was', 'without', 'form']
```
Raw data
{
"_id": null,
"home_page": null,
"name": "sequence-edits",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Marcel Claramunt <marcel@moveread.com>",
"download_url": "https://files.pythonhosted.org/packages/3c/27/26ff50b35107effaa5e55b643ca4d7ab649cb8a69c85a6101ff25437637c/sequence_edits-0.1.9.tar.gz",
"platform": null,
"description": "# Sequence Edits\n\n> Compressed representation of sequence edits\n\n\n## Edits\n\n```python\nclass Skip:\n id: int\n tag = 'skip'\n\nclass Insert:\n idx: int\n value: T\n tag = 'insert'\n\nEdit = Skip | Insert\n```\n\nAll edits are applied w.r.t. the original list. So, order of edits only affects the order in which values are insterted to a same index.\n\n## Usage\n\n```python\nimport sequence_edits as se\n\nedits = [\n se.Insert(idx=1, value='the'),\n se.Skip(idx=4)\n]\nxs = ['And', 'earth', 'was', 'without', 'no', 'form']\nlist(se.apply(edits, xs))\n# ['And', 'the', 'earth', 'was', 'without', 'form']\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Compressed representation of sequence edits",
"version": "0.1.9",
"project_urls": {
"repo": "https://github.com/moveread/sequence-edits.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5cd7463a2afb3ea7f9ba46094fc3d28fc64bb293e4a9d9d97b28d62c3558d4aa",
"md5": "320fa46d62ef2e1abd242f73b29fdd9a",
"sha256": "19006b4f4a64656bc5525699994e4a4037c7390baf0d1df118d26ae8326db9e1"
},
"downloads": -1,
"filename": "sequence_edits-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "320fa46d62ef2e1abd242f73b29fdd9a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3058,
"upload_time": "2024-08-13T21:07:38",
"upload_time_iso_8601": "2024-08-13T21:07:38.337260Z",
"url": "https://files.pythonhosted.org/packages/5c/d7/463a2afb3ea7f9ba46094fc3d28fc64bb293e4a9d9d97b28d62c3558d4aa/sequence_edits-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3c2726ff50b35107effaa5e55b643ca4d7ab649cb8a69c85a6101ff25437637c",
"md5": "7fce406ef89f0014f7abd64a194487b3",
"sha256": "0e42609602fa54802edc53ee1634f170e67485b277bb5c04238d25e9550890f3"
},
"downloads": -1,
"filename": "sequence_edits-0.1.9.tar.gz",
"has_sig": false,
"md5_digest": "7fce406ef89f0014f7abd64a194487b3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 2515,
"upload_time": "2024-08-13T21:07:39",
"upload_time_iso_8601": "2024-08-13T21:07:39.295228Z",
"url": "https://files.pythonhosted.org/packages/3c/27/26ff50b35107effaa5e55b643ca4d7ab649cb8a69c85a6101ff25437637c/sequence_edits-0.1.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-13 21:07:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "moveread",
"github_project": "sequence-edits",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "sequence-edits"
}