Skip to main content

makinage-logo Maki Nage

Stream Processing Made Easy

https://badge.fury.io/py/makinage.svg Github WorkFlows Documentation

Maki Nage is a Python stream processing library and framework. It provides expressive and extensible APIs. Maki Nage speeds up the development of stream applications. It can be used to process stream and batch data. More than that, it allows to develop an application with batch data, and deploy it as a Kafka micro-service.

Read the doc to learn more.

https://github.com/maki-nage/makinage/raw/master/asset/graph.png

Main Features

  • Expressive and Extensible APIs: Maki-Nage is based on ReactiveX.

  • Deployment Ready: Maki-Nage uses Kafka to scale the workload, and be resilient to errors.

  • Unifies Batch and Stream processing: The same APIs work on both sources of data.

  • Flexible: Start working on your laptop, continue on a server, deploy on a cluster.

  • ML Streaming Serving: Serve your machine learning model as a Kafka micro-service.

Installation

Maki Nage is available on PyPI:

pip install makinage

Getting started

Write your data transforms

import rx
import rxsci as rs

def rolling_mean():
    return rx.pipe(
        rs.data.roll(window=3, stride=3, pipeline=rx.pipe(
            rs.math.mean(reduce=True),
        )),
    )

Test your code on batch data

You can test your code from any python data or CSV file.

data = [1, 2, 3, 4, 5, 6, 7]

rx.from_(data).pipe(
    rs.state.with_memory_store(rx.pipe(
        rolling_mean(),
    )),
).subscribe(
    on_next=print
)
2.0
5.0

Deploy your code as a Kafka micro-service

To deploy the code, package it as a function:

def my_app(config, data):
    roll_mean = rx.from_(data).pipe(
        rs.state.with_memory_store(rx.pipe(
            rolling_mean(),
        )),
    )

    return roll_mean,

Create a configuration file:

application:
    name: my_app
kafka:
    endpoint: "localhost"
topics:
    - name: data
    - name: features
operators:
    compute_features:
        factory: my_app:my_app
        sources:
            - data
        sinks:
            - features

And start it!

makinage --config myconfig.yaml

Serve Machine Learning Models

Maki Nage contains a model serving tool. With it, serving a machine learning model in streaming mode just requires a configuration file:

application:
    name: my_model_serving
Kafka:
    endpoint: "localhost"
topics:
- name: data
  encoder: makinage.encoding.json
- name: model
  encoder: makinage.encoding.none
  start_from: last
- name: predict
  encoder: makinage.encoding.json
operators:
  serve:
    factory: makinage.serve:serve
    sources:
      - model
      - data
    sinks:
      - predict
config:
  serve: {}

And then serving the model it done the same way than any makinage application:

makinage --config config.serve.yaml

Some pre and post processing steps are possible if input features or predictions must be modified before/after the inference:

https://github.com/maki-nage/makinage/raw/master/asset/serve.png

Read the book to learn more.

Publications

License

Maki Nage is publised under the MIT License.

Metadata

Release files for makinage 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for makinage 0.8.0
File Size Uploaded Provenance
makinage-0.8.0.tar.gz 19.1 kB Without provenance Details

Release files / makinage-0.8.0.tar.gz

Download URL makinage-0.8.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
392229ea08090a18dcb582ae5615672f3bc11fe748c5653421c3acc24d7b53a2
BLAKE2b-256 checksum
How to use checksums
b51dff9fbe443ea98047cba38f932b6b58a5c75b65cebd06e822ffa6f0405292
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for makinage 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page