Skip to main content

A python package to help craft and manipulate sequences.

Project description

Siera Craft

Siera Craft is a Python package to help craft and manipulate sequences.

Installation

Using pip

pip install siera-craft

Using poetry

poetry add siera-craft

Usage

Basic Example

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 for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seira_craft-0.0.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

seira_craft-0.0.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file seira_craft-0.0.3.tar.gz.

File metadata

  • Download URL: seira_craft-0.0.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1042-azure

File hashes

Hashes for seira_craft-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d2aeb0a715155eba944da65926060e37daeef1409e7ff440b7cd5a247e71427f
MD5 fd5303218b441c806b3d74a96fcade51
BLAKE2b-256 cb74847b60fcd68ab42176f950500a7a1d6827ef541dfdf2e989dc0913941b62

See more details on using hashes here.

File details

Details for the file seira_craft-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: seira_craft-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1042-azure

File hashes

Hashes for seira_craft-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ed2a2e86b68f214b6f16532efeaa0ddf51869104184a652c50ca1f21e8c14cee
MD5 8340b99e020e8b7ee9d129d50d8c5015
BLAKE2b-256 cf932342a52a3c670d5c7dacfabd37f030343a1edc2e0f14f67fad575314bb35

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page