1- # os-3m -engine
1+ # os-m3 -engine
22
3- [ ![ Build Status] ( https://www.travis-ci.org/cfhamlet/os-3m -engine.svg?branch=master )] ( https://www.travis-ci.org/cfhamlet/os-3m -engine )
4- [ ![ codecov] ( https://codecov.io/gh/cfhamlet/os-3m -engine/branch/master/graph/badge.svg )] ( https://codecov.io/gh/cfhamlet/os-3m -engine )
5- [ ![ PyPI - Python Version] ( https://img.shields.io/pypi/pyversions/os-3m -engine.svg )] ( https://pypi.python.org/pypi/os-3m -engine )
6- [ ![ PyPI] ( https://img.shields.io/pypi/v/os-3m -engine.svg )] ( https://pypi.python.org/pypi/os-3m -engine )
3+ [ ![ Build Status] ( https://www.travis-ci.org/cfhamlet/os-m3 -engine.svg?branch=master )] ( https://www.travis-ci.org/cfhamlet/os-m3 -engine )
4+ [ ![ codecov] ( https://codecov.io/gh/cfhamlet/os-m3 -engine/branch/master/graph/badge.svg )] ( https://codecov.io/gh/cfhamlet/os-m3 -engine )
5+ [ ![ PyPI - Python Version] ( https://img.shields.io/pypi/pyversions/os-m3 -engine.svg )] ( https://pypi.python.org/pypi/os-m3 -engine )
6+ [ ![ PyPI] ( https://img.shields.io/pypi/v/os-m3 -engine.svg )] ( https://pypi.python.org/pypi/os-m3 -engine )
77
88Multi-thread engine for 3(or 2) stages job.
99
@@ -31,34 +31,34 @@ Something else need to know:
3131
3232# Install
3333
34- ` pip install os-3m -engine `
34+ ` pip install os-m3 -engine `
3535
3636# API
3737
3838* Create default engine, a typical 3-stage job:
3939
40- - frontend: `` os_3m_engine .ootb.StdinFrontend`` , read from stdin, send to transport stage
41- - transport: `` os_3m_engine .ootb.LogTransport`` , log data received from fronted, send to backend stage
42- - backend: `` os_3m_engine .ootb.LogBackend`` , log data received from transport
40+ - frontend: `` os_m3_engine .ootb.StdinFrontend`` , read from stdin, send to transport stage
41+ - transport: `` os_m3_engine .ootb.LogTransport`` , log data received from fronted, send to backend stage
42+ - backend: `` os_m3_engine .ootb.LogBackend`` , log data received from transport
4343
4444 ```
45- from os_3m_engine .launcher import create
45+ from os_m3_engine .launcher import create
4646
4747 engine = create()
4848 ```
4949
5050* Create engine with custom defined stage:
5151
5252 ```
53- from os_3m_engine .launcher import create
53+ from os_m3_engine .launcher import create
5454
5555 engine = create(transport_cls='transport_class_path_or_class')
5656 ```
5757
5858* Create engine with custom engine config:
5959
6060 ```
61- from os_3m_engine .launcher import create
61+ from os_m3_engine .launcher import create
6262
6363 config = WhateverOjbectYouWant
6464 config.thread_num = 10
@@ -77,7 +77,7 @@ Something else need to know:
7777
7878 ```
7979 from signal
80- from os_3m_engine .launcher import create
80+ from os_m3_engine .launcher import create
8181
8282 engine = create()
8383
@@ -91,11 +91,11 @@ Something else need to know:
9191
9292* Custom frontend class:
9393
94- - inherit from ``os_3m_engine .core.frontend.Frontend``
94+ - inherit from ``os_m3_engine .core.frontend.Frontend``
9595 - define ``produce`` method as generator
9696
9797 ```
98- from os_3m_engine .core.frontend import Frontend
98+ from os_m3_engine .core.frontend import Frontend
9999
100100 class CustomFrontend(Frontend):
101101 def produce(self):
@@ -104,11 +104,11 @@ Something else need to know:
104104
105105* Custom transport class:
106106
107- - inherit from ``os_3m_engine .core.transport.Transport``
107+ - inherit from ``os_m3_engine .core.transport.Transport``
108108 - define ``transport`` method, the only parameter is the data received, the return value will be sent to backend
109109
110110 ```
111- from os_3m_engine .core.transport import Transport
111+ from os_m3_engine .core.transport import Transport
112112
113113 class CustomTransport(Transport):
114114 def transport(self, data):
@@ -117,11 +117,11 @@ Something else need to know:
117117
118118* Custom backend class:
119119
120- - inherit from ``os_3m_engine .core.backend.Backend``
120+ - inherit from ``os_m3_engine .core.backend.Backend``
121121 - define ``process`` method, the only parameter is the data received, no need return
122122
123123 ```
124- from os_3m_engine .core.backend import Backend
124+ from os_m3_engine .core.backend import Backend
125125
126126 class CustomBackend(Backend):
127127 def process(self, data):
@@ -134,7 +134,7 @@ Something else need to know:
134134 - use ``self.config`` to get the config in stage class
135135
136136 ```
137- from os_3m_engine .launcher import create
137+ from os_m3_engine .launcher import create
138138
139139 config = WhateverOjbectYouWant
140140 engine = create(app_config=config)
@@ -148,7 +148,7 @@ Something else need to know:
148148
149149
150150 ```
151- from os_3m_engine .core.backend import Backend
151+ from os_m3_engine .core.backend import Backend
152152
153153 class CustomBackend(Backend):
154154
0 commit comments