Skip to main content

The official TDengine Python WebSocket connector

Project description

The official TDengine Python websocket connector

GitHub Actions Workflow Status codecov GitHub commit activity PyPI GitHub License PyPI
Twitter Follow YouTube Channel Discord Community LinkedIn StackOverflow

Table of Contents

1. Introduction

taospy is the official Python Connector for TDengine, allowing Python developers to develop applications that access the TDengine database. It supports functions such as data writing, querying, subscription, schemaless writing, and parameter binding.

The API for taospy is compliant with the Python DB API 2.0 (PEP-249). It contains two modules:

  1. The taos module. It uses TDengine C client library for client server communications.
  2. 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.

2. Documentation

  • To use Python Connector, please check Developer Guide, which includes how an application can introduce the Python Connector , as well as examples of data writing, querying, schemaless writing, parameter binding, and data subscription.
  • For other reference information, please check Reference Manual, which includes version history, data types, example programs, API descriptions, and FAQs.
  • This quick guide is mainly for developers who like to contribute/build/test the Python Connector by themselves. To learn about TDengine, you can visit the official documentation.

3. Prerequisites

  • Python runtime environment (taospy: Python >= 3.6.2, taos-ws-py: Python >= 3.7)
  • TDengine has been deployed locally. For specific steps, please refer to Deploy TDengine, and taosd and taosAdapter have been started.

4. Build

Download the repository code and execute the following in root directory to build develop environment:

maturin build

5. Testing

5.1 Test Execution

The Python Connector testing framework is pytest.

The testing directory for taos-ws-py is located in the root directory: taos-ws-py/tests/ .

The test code has been written into one bash file. You can open and view the detailed testing process.

The following command runs all test cases on Linux platform:

# for taos-ws-py
bash ./test_taos-ws-py.sh

5.2 Test Case Addition

You can add new test files or add test cases in existing test files that comply with pytest standards

5.3 Performance Testing

Performance testing is in progress.

6. CI/CD

7. Submitting Issues

We welcome the submission of GitHub Issue. When submitting, please provide the following information:

  • Problem description, whether it always occurs, and it's best to include a detailed call stack.
  • Python Connector version.
  • Python Connection parameters (username and password not required).
  • TDengine server version.

8. Submitting PRs

We welcome developers to contribute to this project. When submitting PRs, please follow these steps:

  1. Fork this project, refer to (how to fork a repo).
  2. Create a new branch from the main branch with a meaningful branch name (git checkout -b my_branch). Do not modify the main branch directly.
  3. Modify the code, ensure all unit tests pass, and add new unit tests to verify the changes.
  4. Push the changes to the remote branch (git push origin my_branch).
  5. Create a Pull Request on GitHub (how to create a pull request).
  6. After submitting the PR, you can find your PR through the Pull Request. Click on the corresponding link to see if the CI for your PR has passed. If it has passed, it will display "All checks have passed". Regardless of whether the CI passes or not, you can click "Show all checks" -> "Details" to view the detailed test case logs.
  7. After submitting the PR, if CI passes, you can find your PR on the codecov page to check the test coverage.

9. References

10. License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

taos_ws_py-0.7.0-cp37-abi3-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.7+Windows x86-64

taos_ws_py-0.7.0-cp37-abi3-manylinux_2_31_riscv64.whl (4.3 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.31+ riscv64

taos_ws_py-0.7.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

taos_ws_py-0.7.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.0 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARMv7l

taos_ws_py-0.7.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

taos_ws_py-0.7.0-cp37-abi3-macosx_10_12_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.7+macOS 10.12+ x86-64

taos_ws_py-0.7.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (8.1 MB view details)

Uploaded CPython 3.7+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file taos_ws_py-0.7.0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for taos_ws_py-0.7.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 57c304510102f09538ac92b0ba8d81fec300b01e5ea4583411cf8b09869eb843
MD5 4d27eeba3c5f914beeba30d89eb5eed4
BLAKE2b-256 715fdd061aafe2d2439fa8aa203cb0a8f5d9fb3fa41b07d494bdf8632530b6aa

See more details on using hashes here.

File details

Details for the file taos_ws_py-0.7.0-cp37-abi3-manylinux_2_31_riscv64.whl.

File metadata

File hashes

Hashes for taos_ws_py-0.7.0-cp37-abi3-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 aea6e705d0601efaace35da81b582f4875f0b15000f020b10f595d62785f0eb6
MD5 b836350aaea13aac6477bc521b424619
BLAKE2b-256 f43a0798bc633a65c5bb09046f1d6fac18bd821129d3e1feed249a6368c648ad

See more details on using hashes here.

File details

Details for the file taos_ws_py-0.7.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for taos_ws_py-0.7.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 724595be039f5f6974c6fd1a41aa68098ce9c338801560cfdcf6e7fd7268046b
MD5 f3c642a718d6f952a03687993d5d5b29
BLAKE2b-256 2ffa609ca52d32fe76d3533f3924dcf946a64cb39d02a17e44e10a34ac9e317d

See more details on using hashes here.

File details

Details for the file taos_ws_py-0.7.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for taos_ws_py-0.7.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9ad7d0bfcf9fbc3073835c986269f88b75c5922defdf238ad3a899f2973ed82f
MD5 41a7a43a474a4fa2af199c84c49d0568
BLAKE2b-256 960a3d13657299513cef684fac70a2898ba6e53b1bcea71e0bad9f61873bb9c8

See more details on using hashes here.

File details

Details for the file taos_ws_py-0.7.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for taos_ws_py-0.7.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2ff9f5b9514a466ae25f777ff5ec6acaa0cb425e48eb652a4d904a949154811c
MD5 b38347f19ce6e1fb788ebc2a9bc92144
BLAKE2b-256 0eaae845fe032c806f87e8b53a7ab117787059e21efccc2a8439fa0436c07052

See more details on using hashes here.

File details

Details for the file taos_ws_py-0.7.0-cp37-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for taos_ws_py-0.7.0-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 196baa53682950f53a3e60db4e1a45efdb260cd3da6ddb16ec8b7d970d9fe4fe
MD5 a50beafed42d79623aa5efb13417775d
BLAKE2b-256 48ada4a0d68f00f5c3ca766f81f6d15744db129bb25470898eb887ecc6ca789e

See more details on using hashes here.

File details

Details for the file taos_ws_py-0.7.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for taos_ws_py-0.7.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 c989c6c66b8ee2f8c4180203a0eeb42a4c8eb3bfeb798bd8463f9456895a6bfb
MD5 09c95790d7a3708d4312bcf5eaf959f7
BLAKE2b-256 99a588bfb460f0089435b0438148d209a18b5d059a2bac392bd2436edb340c31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page