Skip to main content

Modular event-centric python library made for simplification typical stream applications development with python type system strong exploitation.

Project description

typed-blocks

Modular event-centric python library made for simplification typical stream applications development with python type system strong exploitation.

from dataclasses import dataclass

from blocks import App, source, processor


@dataclass
class E:
    x: int


@dataclass
class E2:
    y: int


@source
def generator() -> E:
    return E(1)


@processor
def printer(e: E) -> E2:
    print('1', e)
    return E2(e.x)


@processor
def printer2(e: E2) -> None:
    print('2', e)


blocks = (generator(), printer(), printer2())
App(blocks).run(once=True)

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

typed-blocks-0.9.3.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

typed_blocks-0.9.3-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

Details for the file typed-blocks-0.9.3.tar.gz.

File metadata

  • Download URL: typed-blocks-0.9.3.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for typed-blocks-0.9.3.tar.gz
Algorithm Hash digest
SHA256 1ac6dc0512b3d8a53eec00beae5f149b88a81cc3ddcc683236737dd668e63d0b
MD5 8cc8a1b6ca12a37a2ec9300125167cb1
BLAKE2b-256 d31ba4393e8964b9bc7c356c3b024b0bb11d162b85c2111a90fdc813eba51e03

See more details on using hashes here.

File details

Details for the file typed_blocks-0.9.3-py3-none-any.whl.

File metadata

  • Download URL: typed_blocks-0.9.3-py3-none-any.whl
  • Upload date:
  • Size: 37.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for typed_blocks-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dba256c967341df75c0d827df8f23d2d74cec3425ae0db31fdcaffa000b93ad4
MD5 71157d2e9a384327441a0ecdfde22341
BLAKE2b-256 6bd3e731fd9a7ebf57e746f5f4a753ae9d8957c780b0ea357a80885a6d79fc21

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