Metadata-Version: 2.1
Name: typed-blocks
Version: 0.9.3
Summary: Modular event-centric python library made for simplification typical stream applications development with python type system strong exploitation.
Home-page: https://github.com/severstal-digital/typed-blocks
Author: Daniil Zubakin
Author-email: <daniilzubakin@gmail.com>
License: Apache-2.0 License
Project-URL: Bug Tracker, https://github.com/severstal-digital/typed-blocks/issues
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: full
Requires-Dist: wunderkafka ; extra == 'full'
Requires-Dist: schedule (~=1.1.0) ; extra == 'full'
Requires-Dist: redis (~=4.0.2) ; extra == 'full'
Requires-Dist: types-redis (~=3.5.17) ; extra == 'full'
Requires-Dist: psycopg2-binary (~=2.9.2) ; extra == 'full'
Provides-Extra: kafka
Requires-Dist: wunderkafka ; extra == 'kafka'
Provides-Extra: postgres
Requires-Dist: psycopg2-binary (~=2.9.2) ; extra == 'postgres'
Provides-Extra: redis
Requires-Dist: redis (~=4.0.2) ; extra == 'redis'
Requires-Dist: types-redis (~=3.5.17) ; extra == 'redis'
Provides-Extra: schedule
Requires-Dist: schedule (~=1.1.0) ; extra == 'schedule'

# typed-blocks

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

```python
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)
```

