Github Workflow | PyPI Version | PyPI Downloads | CodeCov |
---|---|---|---|
TDengine connector for Python enables python programs to access TDengine, using an API which is compliant with the Python DB API 2.0 (PEP-249). It contains two modules:
- The
taos
module. It uses TDengine C client library for client server communications. - The
taosrest
module. It wraps TDengine RESTful API to Python DB API 2.0 (PEP-249). With this module, you do not need to install the TDengine C client library.
You can use pip
to install the connector from PyPI:
pip3 install taospy
Or with git url:
pip3 install git+https://github.com/taosdata/taos-connector-python.git
Note: taospy v2.7.2 requirs Python 3.6+. The early versions of taospy from v2.5.0 to v2.7.1 require Python 3.7+.
# taos-ws-py depends taospy
pip3 install taospy
pip3 install taos-ws-py
Note: The taosws module is provided by taos-ws-py package separately from v2.7.2. It is part of early version of taospy. taos-ws-py requires Python 3.7+.
taosrest
is designed to use with taosAdapter. If your TDengine version is older than v2.4.0.0, taosAdapter may not be available.
We use MIT license for Python connector.
1. Precondictions
2. Building & Install
Download the repository code and execute the following in root directory:
pip3 install ./
or install in editable mode (i.e. "develop mode")
pip3 install -e ./
3. Testing
Refer to the examples in ./tests/
1. Precondictions
TDengine
enviroment, install refer to HerePython3
enviroment, install refer to HereRust
build enviroment, install refer to Here- Install
maturin
withpip3 install maturin
2. Building & Install
Download the repository code and execute the following in root directory:
# enter source code folder
cd taos-ws-py
# build
python3 -m maturin build --strip
# install repalce xxx with real generated filename
pip3 install ./target/wheels/taos_ws_py-xxx.whl
3. Testing
Refer to the examples in ./tests/