Skip to main content

The official TDengine Python connector

Project description

TDengine Python Connector

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

English | 简体中文

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:

pip3 install -e ./ 

5. Testing

5.1 Test Execution

The Python Connector testing framework is pytest
The testing directory for taospy is located in the root directory: tests/
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 taospy
bash ./test_taospy.sh
# 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


Release history Release notifications | RSS feed

Download files

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

Source Distribution

taospy-2.8.3.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

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

taospy-2.8.3-py3-none-any.whl (55.4 kB view details)

Uploaded Python 3

File details

Details for the file taospy-2.8.3.tar.gz.

File metadata

  • Download URL: taospy-2.8.3.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.10.12 Linux/6.8.0-1031-azure

File hashes

Hashes for taospy-2.8.3.tar.gz
Algorithm Hash digest
SHA256 f95a40087ab83ad047827198158abedd2b04fb1076e12c5e67c81a9e2ebf041a
MD5 eec71a00567a5bd8c0ab11f0231366f8
BLAKE2b-256 82728b4440721e975ef55089280f33f449c9ed1e7315142b1a1c49dac93bd7e9

See more details on using hashes here.

File details

Details for the file taospy-2.8.3-py3-none-any.whl.

File metadata

  • Download URL: taospy-2.8.3-py3-none-any.whl
  • Upload date:
  • Size: 55.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.10.12 Linux/6.8.0-1031-azure

File hashes

Hashes for taospy-2.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 df4f739acb9afdbd8e71b18ba4719245576b34412aa9f1c57ba5862a6a854831
MD5 fc6748a2e65160363aed13726b6ad0fc
BLAKE2b-256 d9df2ff0a1ce8c5ee9b138783ffe8383d137916d5eed475d2ca876cfa0f4ed9a

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