diff --git a/tubemq-client-twins/tubemq-client-python/README.md b/tubemq-client-twins/tubemq-client-python/README.md new file mode 100644 index 00000000000..7d9fea1955d --- /dev/null +++ b/tubemq-client-twins/tubemq-client-python/README.md @@ -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). \ No newline at end of file diff --git a/tubemq-client-twins/tubemq-client-python/src/python/example/README.md b/tubemq-client-twins/tubemq-client-python/src/python/example/README.md new file mode 100644 index 00000000000..dc8c29181fb --- /dev/null +++ b/tubemq-client-twins/tubemq-client-python/src/python/example/README.md @@ -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). \ No newline at end of file diff --git a/tubemq-client-twins/tubemq-client-python/src/python/example/client.conf b/tubemq-client-twins/tubemq-client-python/src/python/example/consumer/client.conf similarity index 100% rename from tubemq-client-twins/tubemq-client-python/src/python/example/client.conf rename to tubemq-client-twins/tubemq-client-python/src/python/example/consumer/client.conf diff --git a/tubemq-client-twins/tubemq-client-python/src/python/example/test_consumer.py b/tubemq-client-twins/tubemq-client-python/src/python/example/consumer/test_consumer.py similarity index 100% rename from tubemq-client-twins/tubemq-client-python/src/python/example/test_consumer.py rename to tubemq-client-twins/tubemq-client-python/src/python/example/consumer/test_consumer.py