Skip to main content

A concurrent streaming package

Project description

A concurrent streaming package

  • Dataflow based functional syntax.
  • Implicitly parallelism for both async and non-async functions.
  • Composable for both flows and tasks.
  • Extensible with middlewares.

Example

from aiosaber import *
@task
def add(self, num):
    for i in range(100000):
        num += 1
    return num

@task
async def multiply(num1, num2):
    return num1 * num2

@flow
def sub_flow(num):
    return add(num) | map_(lambda x: x ** 2) | add

@flow
def my_flow(num):
    [sub_flow(num), sub_flow(num)] | multiply | view

num_ch = Channel.values(*list(range(100)))
f = my_flow(num_ch)
asyncio.run(f.start())

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

aiosaber-0.0.1.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

aiosaber-0.0.1-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file aiosaber-0.0.1.tar.gz.

File metadata

  • Download URL: aiosaber-0.0.1.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for aiosaber-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f5cc2e603543a0fe719084924dc215388858ca57540162ac3608bdf54dec39c4
MD5 5ed7dbe11e552f1e95c5369a3d11c2b0
BLAKE2b-256 c994aa0fa6c852fd1bd959596b3029cb3f87f9ecdb3c646573eff99293898ff2

See more details on using hashes here.

File details

Details for the file aiosaber-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: aiosaber-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for aiosaber-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e04559c8d6955f3b7f7a88db4eee4e94bf37a2104c45b69d282083104851dec
MD5 c62f33f958af4076ec632a27262cfcf9
BLAKE2b-256 981facd4089f68fcc8e19da3e4f8369b502117491f0b3211340d84fbf8bf0ed7

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