Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TUBEMQ-383] add readme for installation and example #301

Merged
merged 1 commit into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions tubemq-client-twins/tubemq-client-python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
### TubeMQ Python Client
TubeMQ Python Client library is a wrapper over the existing [C++ client library](https://github.com/apache/incubator-tubemq/tree/master/tubemq-client-twins/tubemq-client-cpp/) and exposes all of the same features.

#### Install from source
##### install python-devel
- build and install C++ client SDK
build C++ client SDK from source, and install:
1, copy `tubemq` include directory to `/usr/local/include/`
2, copy `libtubemq_rel.a` to `/usr/local/lib`
 

- install python-devel
```
yum install python-devel -y
```
- install required dependency
```
pip install -r requirements.txt
```

- install client
```
pip install ./
```

#### Examples
##### Producer example
##### Consumer example
Consumer example is [available](https://github.com/apache/incubator-tubemq/tree/master/tubemq-client-twins/tubemq-client-python/src/python/example/consumer).
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### TubeMQ Python Client Example
- Consumer example
Consume example reference to [C++ test_consumer](https://github.com/apache/incubator-tubemq/tree/master/tubemq-client-twins/tubemq-client-cpp/example/consumer),
and all methods exposed based on [pybind11](https://pybind11.readthedocs.io/en/stable/basics.html).