# Seira Craft
A Python package to help craft and manipulate sequences.
## Installation
```bash
pip install seira-craft
```
or
```bash
poetry add seira-craft
```
## Usage
### Basic Example
```python
from datetime import datetime
from seira_craft.default import DefaultCrafter
from seira_craft.seira import Sequence
from dataclasses import dataclass
@dataclass
class Segment:
start: datetime
end: datetime
val: str
def copy(self):
return Segment(self.start, self.end, self.val)
crafter = DefaultCrafter[Segment]()
seq = Sequence[Segment](crafter)
seq.insert(Segment(
start=datetime(2023, 1, 1, 1),
end=datetime(2023, 1, 1, 2),
val="First Interval"
))
seq.insert(Segment(
start=datetime(2023, 1, 1, 1, 30),
end=datetime(2023, 1, 1, 2, 30),
val="Second Interval"
))
print(seq.sequence())
```
## License
MIT License. See [LICENSE](LICENSE) for more details.
Raw data
{
"_id": null,
"home_page": "https://github.com/gedemagt/seira-craft",
"name": "seira-craft",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "sequence,interval",
"author": "Jesper Halkj\u00e6r Jensen",
"author_email": "mail@jeshj.com",
"download_url": "https://files.pythonhosted.org/packages/c2/a9/5507ec3531cf47d2892083685bce5cdccf8d91a96bcae2974b21b21f124c/seira_craft-0.0.5.tar.gz",
"platform": null,
"description": "# Seira Craft\n\nA Python package to help craft and manipulate sequences.\n\n## Installation\n\n```bash\npip install seira-craft\n```\nor\n```bash\npoetry add seira-craft\n```\n\n## Usage\n\n### Basic Example\n\n```python\nfrom datetime import datetime\n\nfrom seira_craft.default import DefaultCrafter\nfrom seira_craft.seira import Sequence\nfrom dataclasses import dataclass\n\n\n@dataclass\nclass Segment:\n start: datetime\n end: datetime\n val: str\n\n def copy(self):\n return Segment(self.start, self.end, self.val)\n\n\ncrafter = DefaultCrafter[Segment]()\nseq = Sequence[Segment](crafter)\n\nseq.insert(Segment(\n start=datetime(2023, 1, 1, 1), \n end=datetime(2023, 1, 1, 2),\n val=\"First Interval\"\n))\n\nseq.insert(Segment(\n start=datetime(2023, 1, 1, 1, 30), \n end=datetime(2023, 1, 1, 2, 30),\n val=\"Second Interval\"\n))\n\nprint(seq.sequence())\n```\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for more details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A python package to help craft and manipulate sequences.",
"version": "0.0.5",
"project_urls": {
"Homepage": "https://github.com/gedemagt/seira-craft",
"Repository": "https://github.com/gedemagt/seira-craft"
},
"split_keywords": [
"sequence",
"interval"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f3a251bf3d46cb35b87da96201a1574c8132e29b7ba4559446a81103dbeab44a",
"md5": "79eb184a14cc055925e827316399ae34",
"sha256": "11317a60e153ef2b1b20b8d1a77668cbd240c4c2bf9634c98630b33e04ff8f95"
},
"downloads": -1,
"filename": "seira_craft-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "79eb184a14cc055925e827316399ae34",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 4987,
"upload_time": "2023-08-13T20:08:40",
"upload_time_iso_8601": "2023-08-13T20:08:40.297737Z",
"url": "https://files.pythonhosted.org/packages/f3/a2/51bf3d46cb35b87da96201a1574c8132e29b7ba4559446a81103dbeab44a/seira_craft-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c2a95507ec3531cf47d2892083685bce5cdccf8d91a96bcae2974b21b21f124c",
"md5": "4cea02687224a4d19370def1e3bd8f29",
"sha256": "bc0a25b0d62b8174893646a20b17db1aa54bbafaf7268aba99678c3bfff1af82"
},
"downloads": -1,
"filename": "seira_craft-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "4cea02687224a4d19370def1e3bd8f29",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 3740,
"upload_time": "2023-08-13T20:08:41",
"upload_time_iso_8601": "2023-08-13T20:08:41.779630Z",
"url": "https://files.pythonhosted.org/packages/c2/a9/5507ec3531cf47d2892083685bce5cdccf8d91a96bcae2974b21b21f124c/seira_craft-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-13 20:08:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gedemagt",
"github_project": "seira-craft",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "seira-craft"
}