1
- # BorkPipeline
1
+ # PipelineChain
2
2
3
- [](https://github.com/borkweb/borkpipeline /actions?query=branch%3Amain)
3
+ [](https://github.com/borkweb/pipelinechain /actions?query=branch%3Amain)
4
4
5
5
A Pipeline / [Chain of Responsibility](https://refactoring.guru/design-patterns/chain-of-responsibility) design pattern implementation based on [Laravel's Pipeline implementation](https://github.com/illuminate/pipeline/blob/master/Pipeline.python).
6
6
@@ -58,7 +58,7 @@ flowchart LR
58
58
Install PyPipeline via pip:
59
59
60
60
```bash
61
- pip install borkpipeline
61
+ pip install pipelinechain
62
62
```
63
63
64
64
## Getting started
@@ -90,7 +90,7 @@ flowchart LR
90
90
```
91
91
92
92
```python
93
- from borkpipeline.pipeline import Pipeline
93
+ from pipelinechain import Pipeline
94
94
95
95
# Create a new pipeline instance.
96
96
pipeline = Pipeline()
@@ -126,7 +126,7 @@ flowchart LR
126
126
```
127
127
128
128
```python
129
- from borkpipeline.pipeline import Pipeline
129
+ from pipelinechain import Pipeline
130
130
131
131
# Create a new pipeline instance.
132
132
pipeline = Pipeline()
@@ -169,7 +169,7 @@ flowchart LR
169
169
```
170
170
171
171
```python
172
- from borkpipeline.pipeline import Pipeline
172
+ from pipelinechain import Pipeline
173
173
174
174
pipeline = Pipeline()
175
175
@@ -226,7 +226,7 @@ flowchart LR
226
226
```
227
227
228
228
```python
229
- from borkpipeline.pipeline import Pipeline
229
+ from pipelinechain import Pipeline
230
230
231
231
pipeline = Pipeline().through([TitlePipe(), StripPipe()])
232
232
result = pipeline.send(' hello world ').then_return()
@@ -272,7 +272,7 @@ flowchart LR
272
272
```
273
273
274
274
```python
275
- from borkpipeline.pipeline import Pipeline
275
+ from pipelinechain import Pipeline
276
276
277
277
pipeline = Pipeline().via('execute').through([StripPipe(), ReversePipe()])
278
278
result = pipeline.send(' hello ').then_return()
@@ -288,7 +288,7 @@ can do this with a `return` statement!
288
288
#### Example pipeline
289
289
290
290
```python
291
- from borkpipeline.pipeline import Pipeline
291
+ from pipelinechain import Pipeline
292
292
293
293
def check_content(passable, next_pipe):
294
294
if 'stop' in passable:
@@ -326,7 +326,7 @@ flowchart LR
326
326
```
327
327
328
328
```python
329
- from borkpipeline.pipeline import Pipeline
329
+ from pipelinechain import Pipeline
330
330
331
331
pipeline = Pipeline().through([str.strip, str.upper])
332
332
result = pipeline.send(' hello world ').then(lambda x: len(x))
0 commit comments