Open
Conversation
Member
tuteng
commented
Apr 1, 2021
- Add example for python function
…streamnative/examples into feature/add-example-for-python-function
| └── serde.py | ||
| ``` | ||
|
|
||
| In python, if a folder contains `__init__` file, we call it a package, python_function and pyserde are both packages. Compressing `python_function` directory will generate `python_function.zip`. |
There was a problem hiding this comment.
Suggested change
| In python, if a folder contains `__init__` file, we call it a package, python_function and pyserde are both packages. Compressing `python_function` directory will generate `python_function.zip`. | |
| In Python, if a folder contains `__init__` file, it is a package. In this project structure, the `python_function` and `pyserde` are both packages. Compressing `python_function` directory generates the `python_function.zip` file. |
Huanli-Meng
reviewed
Apr 2, 2021
Contributor
Huanli-Meng
left a comment
There was a problem hiding this comment.
Leave my comment. PTAL.
| @@ -0,0 +1,47 @@ | |||
| # python-function | |||
|
|
|||
| This is an example of how to use the python function. | |||
Contributor
There was a problem hiding this comment.
Suggested change
| This is an example of how to use the python function. | |
| This example describes how to use the Python function. |
|
|
||
| This is an example of how to use the python function. | ||
|
|
||
| ## Project Structure |
Contributor
There was a problem hiding this comment.
Suggested change
| ## Project Structure | |
| ## Project structure |
| In python, if a folder contains `__init__` file, we call it a package, python_function and pyserde are both packages. Compressing `python_function` directory will generate `python_function.zip`. | ||
|
|
||
| ## How to use | ||
|
|
Contributor
There was a problem hiding this comment.
This section describes how to use the Python function.
|
|
||
| ## How to use | ||
|
|
||
| ### Start pulsar standalone |
Contributor
There was a problem hiding this comment.
Suggested change
| ### Start pulsar standalone | |
| ### Start Pulsar in standalone mode |
| ## How to use | ||
|
|
||
| ### Start pulsar standalone | ||
|
|
Contributor
There was a problem hiding this comment.
This example shows how to start Pulsar in Docker.
| bin/pulsar standalone | ||
| ``` | ||
|
|
||
| ### Start python function by use zip package |
Contributor
There was a problem hiding this comment.
Suggested change
| ### Start python function by use zip package | |
| ### Start Python function | |
| This example shows how to start Python function through a ZIP package. |
| --output-serde-classname python_function.pyserde.serde.CustomSerDe \ | ||
| --output output-topic-3 | ||
| ``` | ||
| Replace `YOUR-PATH` with your file path. |
Contributor
There was a problem hiding this comment.
Suggested change
| Replace `YOUR-PATH` with your file path. | |
| Replace the `YOUR-PATH` parameter with your file path. |
| ``` | ||
| Replace `YOUR-PATH` with your file path. | ||
|
|
||
| ### Run produce and consume |
Contributor
There was a problem hiding this comment.
Suggested change
| ### Run produce and consume | |
| ### Run producer and consumer | |
| This example shows how to run a producer and a consumer. |
Anonymitaet
reviewed
Apr 2, 2021
| @@ -0,0 +1,47 @@ | |||
| # python-function | |||
There was a problem hiding this comment.
Suggested change
| # python-function | |
| # Python function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.