2023-03-23T02:29:11,751 Created temporary directory: /tmp/pip-ephem-wheel-cache-vn4jnjso 2023-03-23T02:29:11,757 Created temporary directory: /tmp/pip-build-tracker-y00slivh 2023-03-23T02:29:11,758 Initialized build tracking at /tmp/pip-build-tracker-y00slivh 2023-03-23T02:29:11,758 Created build tracker: /tmp/pip-build-tracker-y00slivh 2023-03-23T02:29:11,758 Entered build tracker: /tmp/pip-build-tracker-y00slivh 2023-03-23T02:29:11,760 Created temporary directory: /tmp/pip-wheel-zx6yfwqi 2023-03-23T02:29:11,770 DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453 2023-03-23T02:29:11,776 Created temporary directory: /tmp/pip-ephem-wheel-cache-6hsuhloh 2023-03-23T02:29:11,829 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-03-23T02:29:11,836 2 location(s) to search for versions of apache-iotdb: 2023-03-23T02:29:11,836 * https://pypi.org/simple/apache-iotdb/ 2023-03-23T02:29:11,836 * https://www.piwheels.org/simple/apache-iotdb/ 2023-03-23T02:29:11,838 Fetching project page and analyzing links: https://pypi.org/simple/apache-iotdb/ 2023-03-23T02:29:11,839 Getting page https://pypi.org/simple/apache-iotdb/ 2023-03-23T02:29:11,843 Found index url https://pypi.org/simple 2023-03-23T02:29:12,085 Fetched page https://pypi.org/simple/apache-iotdb/ as application/vnd.pypi.simple.v1+json 2023-03-23T02:29:12,117 Found link https://files.pythonhosted.org/packages/76/14/d01b6281df00530c69bc8eae2074b9970bbe865a5e971b5cd2019e8b8250/apache-iotdb-0.9.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.9.0 2023-03-23T02:29:12,118 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/84/aa/fa9401ccadb89ddce7c2b8a03baee9dbb9913c52b5936d0ec7968cabf056/apache_iotdb-0.9.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,119 Found link https://files.pythonhosted.org/packages/01/fa/e65db378e4d8e07322ec175f37568bceb55ebb3c8397fa7b48e9f087c451/apache-iotdb-0.9.2.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.9.2 2023-03-23T02:29:12,120 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/43/8d/72fa03325e9281b613a0eabae9cc7c606ce0e8952bee0c3ca855e4579a1d/apache_iotdb-0.9.2-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,121 Found link https://files.pythonhosted.org/packages/34/95/030c2da665358de8ba950099b3b0397dca437fcde60d5d1730d0c451d5e3/apache-iotdb-0.9.3.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.9.3 2023-03-23T02:29:12,122 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/5c/d4/2e329baab32ad93730ba4b79df9b91f1d55d0d37428a5dbbe2dd4c9f3a9d/apache_iotdb-0.9.3-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,123 Found link https://files.pythonhosted.org/packages/1d/dc/138e08717f8c2e0e238f35d39b34af6cfc1c7a1332b6aa4689750f4fda26/apache-iotdb-0.10.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.10.0 2023-03-23T02:29:12,124 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/c3/76/46884f04945b6f02bbec4e06d83fafc16f326ca0f9b35b8c0141018990c0/apache_iotdb-0.10.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,125 Found link https://files.pythonhosted.org/packages/f6/4d/b229b9f309431e8164c9cd893431009a57efcaa059f58c1091d222601da3/apache-iotdb-0.10.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.10.1 2023-03-23T02:29:12,126 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/d6/87/2e003dcf87ffa8e73f48a62a107b989967e906670d905a05ae1c1349f396/apache_iotdb-0.10.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,128 Found link https://files.pythonhosted.org/packages/16/8b/2ec65fa81d5961bd927c02d6a209490bf325b2a164506cd3b12e846d7061/apache-iotdb-0.11.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.0 2023-03-23T02:29:12,128 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/47/c8/047703f7e8125b15361c766b90c6f1cbdbf797f84803f38b1732c1a386cb/apache_iotdb-0.11.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,130 Found link https://files.pythonhosted.org/packages/55/a1/ef100f67e0f26fbc1d19b84115b21de942e7b7e01803706d19f841ac06c1/apache-iotdb-0.11.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.1 2023-03-23T02:29:12,130 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/9f/9f/dce2d782c8b64700539039ef5d66f5f7a781689538c0a176cf56099ec9d1/apache_iotdb-0.11.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,132 Found link https://files.pythonhosted.org/packages/69/d5/f1b9ff293fe02eb1f1cb3cba13b5d9a4b547415ab0045b2a8a3612249e12/apache-iotdb-0.11.2.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.2 2023-03-23T02:29:12,132 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/2b/96/a5f0c63659cc8477c53d8a8321c07ea5a0bb2430abaaab477a6185bb43a1/apache_iotdb-0.11.2-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,133 Found link https://files.pythonhosted.org/packages/7d/cf/0d672a828527f59cdc66c078b0b8e356ca0a3191224a4363ce2256337d1c/apache-iotdb-0.11.3.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.3 2023-03-23T02:29:12,134 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/d2/c7/6709b26341e59788d05a297182aa3f96c692e85421c169f657e92c3b4765/apache_iotdb-0.11.3-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,135 Found link https://files.pythonhosted.org/packages/00/a1/5b1b8a2754f4b25420d9a4461b5e2b8573bb89b43054f9303ea0558df0de/apache-iotdb-0.11.4.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.4 2023-03-23T02:29:12,136 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/48/f4/a21fd4495f93c428de788a477665f1815b257568469c38108666125fff4b/apache_iotdb-0.11.4-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,137 Found link https://files.pythonhosted.org/packages/9e/16/bb2ef45f62e9866f1be97f04e2c581247d3b145e5d8a01b7c143023c6c45/apache-iotdb-0.12.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.0 2023-03-23T02:29:12,138 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/93/32/e051c3ce387e54b1f036995e92ff352895cf01a51b170752e906a7d42364/apache_iotdb-0.12.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,139 Found link https://files.pythonhosted.org/packages/20/0c/b39e9f362fb0a1a43cb0a05a5b2d9163815f0048575e0c071bbaa50070b8/apache-iotdb-0.12.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.1 2023-03-23T02:29:12,140 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/55/cf/219a0c3cd17537cebf6e67deeaa77b57741c9b40bcddbb7f59ac9b828401/apache_iotdb-0.12.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,142 Found link https://files.pythonhosted.org/packages/fd/64/d83ceaaab941dd78df38cd8c35d27028a27724c2535f0e6f01a48472aa28/apache-iotdb-0.12.2.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.2 2023-03-23T02:29:12,142 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/0b/33/60af46cbc25d7ecf9722bf311295cb0acbf2841f6eb3e3af7433ac3e199d/apache_iotdb-0.12.2-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,144 Found link https://files.pythonhosted.org/packages/24/7c/81a9dcfd218d4654b03d9079578659d6201aa4f9e9ccba328c0742e8e9c1/apache-iotdb-0.12.3.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.3 2023-03-23T02:29:12,144 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/9f/ae/e79cef98fa20cf977ea22b065fcff8d7b976922dd281f4a74a02b1a72b41/apache_iotdb-0.12.3-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,146 Found link https://files.pythonhosted.org/packages/9e/11/0d12f9b906b3aac1446c09e297bcdf3a0cdfb016aae1ec77effa214999de/apache-iotdb-0.12.4.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.4 2023-03-23T02:29:12,146 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/2b/cb/34f5d9137086d912e4518d751eca1ac9a8b908706c4b3176ca32911fabd2/apache_iotdb-0.12.4-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,148 Found link https://files.pythonhosted.org/packages/8a/52/93503eac47c1561edc21431f7154b694afad9d461e2af0fea36966953c24/apache-iotdb-0.12.5.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.5 2023-03-23T02:29:12,148 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/7a/30/1cd9bca76c1f4f9b4cd48d11f23103ade9c5a35410bbf0a8f5997bab51b0/apache_iotdb-0.12.5-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,150 Found link https://files.pythonhosted.org/packages/00/d9/19746ff8906cc2ac3c9326fbcbd244d2424f4aad5d7201843956d27dcb0b/apache-iotdb-0.12.6.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.6 2023-03-23T02:29:12,150 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/cf/7b/ab3acb96fd057e900f9aca1b030f4fb42caf4104000ab742ce19a1029b6f/apache_iotdb-0.12.6-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,152 Found link https://files.pythonhosted.org/packages/a6/cd/33de301e51132f8d0d79adc346d38685a6b871251846bad95b35ebf74ac9/apache-iotdb-0.13.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.0 2023-03-23T02:29:12,152 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/71/c1/3684d3b6e6eddda5fbe994e123c6bc6569409994a44b5d3e4b130554802a/apache_iotdb-0.13.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,153 Found link https://files.pythonhosted.org/packages/7e/3e/40f0d900e04598036cc65ae437a2ee9f4aa149860d434a6f4b291460582c/apache-iotdb-0.13.0.post1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.0.post1 2023-03-23T02:29:12,154 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/7c/f2/ef6f589910f1b850ad665d4958e2a26b5249bddc81d5f29a711e21a79dc1/apache_iotdb-0.13.0.post1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,156 Found link https://files.pythonhosted.org/packages/e5/47/3efce218f936953f6ee5e338748981137a5d30579578038a67063b1c10d8/apache-iotdb-0.13.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.1 2023-03-23T02:29:12,156 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/b7/1d/3074d8ab58366c99783fe0ed853472a21d69dfd2b80ca001281d170833e2/apache_iotdb-0.13.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,158 Found link https://files.pythonhosted.org/packages/6f/55/1bcfde81cb204d77387e7cadbf8c3510ec04a2b02fa8b26d04b8f5037bca/apache-iotdb-0.13.2.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.2 2023-03-23T02:29:12,158 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/94/0c/3a7d8a238d7c8771453889f8f03f9ebcd418839306e64f4ddea8c0baee81/apache_iotdb-0.13.2-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,160 Found link https://files.pythonhosted.org/packages/30/a0/0153c56e1af8653bfdcf47423949dd6b23e53882c9009acc25e661a44dbe/apache-iotdb-0.13.3.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.3 2023-03-23T02:29:12,160 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/a0/51/7e8405405f7f0ef8eabab31b4860cb747a8acfa53e30f56939c115b53db9/apache_iotdb-0.13.3-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,162 Found link https://files.pythonhosted.org/packages/42/eb/3d7ac8d794238b75997ff3f55db6e02436bfa558a8df4ea21e58bf8db6fd/apache-iotdb-0.13.5.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.5 2023-03-23T02:29:12,162 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/51/a3/9117edfd3d72a1d338b7cff8060e672dd7b39dfeb2ca0d6c22db51bf9b90/apache_iotdb-0.13.5-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,164 Found link https://files.pythonhosted.org/packages/bb/7d/24cefdcd57e96d496fd3492fc28b3d53da6ba0fc6ee69f99dddec1cf500c/apache-iotdb-0.14.0rc1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.14.0rc1 2023-03-23T02:29:12,164 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/6d/37/0e5a292ed1a695927cefec20d4ad01d3c7af78e691d5250f1646f318d4ef/apache_iotdb-0.14.0rc1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,166 Found link https://files.pythonhosted.org/packages/49/91/11702001bdc0af0266d5f4dd222b5f937684e8c08e5044735ade6748cd58/apache-iotdb-1.0.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 1.0.0 2023-03-23T02:29:12,166 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/3d/57/3019d5cf51e6198d5b7ee9e3c07a15efa7487e8b280b4b71cc521a6651e3/apache_iotdb-1.0.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,168 Found link https://files.pythonhosted.org/packages/0b/d7/475e11d05f2d4bc65f9b7d14691158489fbb7726a26cee5a016e94e6640a/apache-iotdb-1.0.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 1.0.1 2023-03-23T02:29:12,168 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/06/82/b658ff03f52072e1afde6bb9f1f1933427ef776a78e246965943fba552d8/apache_iotdb-1.0.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,169 Fetching project page and analyzing links: https://www.piwheels.org/simple/apache-iotdb/ 2023-03-23T02:29:12,170 Getting page https://www.piwheels.org/simple/apache-iotdb/ 2023-03-23T02:29:12,172 Found index url https://www.piwheels.org/simple 2023-03-23T02:29:12,406 Fetched page https://www.piwheels.org/simple/apache-iotdb/ as text/html 2023-03-23T02:29:12,428 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-1.0.1-py3-none-any.whl#sha256=9fc3d243ca97c88bd3ca1f5092686e3ab5c99a6e5206fd6a6c6fdaab15c796b6 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,428 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-1.0.0-py3-none-any.whl#sha256=85d0bb3ddb1c79359fec18e85c6d515dc3639752d77dea32c09c8afe0fefc906 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,429 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.14.0rc1-py3-none-any.whl#sha256=2f71e6b3443c4748717889729380082daa7bd8f9950d4c17909134372367bccc (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,429 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.3-py3-none-any.whl#sha256=c3be87cabc4d19ad9fd999f524ac8547b971adb4a304bf8874fdb56a6ecca371 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,430 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.2-py3-none-any.whl#sha256=136811be5cdfe045bc349a8f6c0b07117600185c0c7ada8353610179adde27ae (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,430 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.1-py3-none-any.whl#sha256=22668867268f1ea89b8205cbda30d0578aaa5ccfff0b552396e7059a95d3781a (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,431 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.0.post1-py3-none-any.whl#sha256=d53cf02df2cc507d9caf48167c52d69e24abab9800430de3ff8abf8159bff63b (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,431 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.0-py3-none-any.whl#sha256=67b7429e60cdd5e1e3a808592a87a591c028af62de8e2fec2535b4a3105f21b7 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,432 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.6-py3-none-any.whl#sha256=a4f679df0053b74f83de861277de12e030eb8601063b172ec44789118ba11400 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,433 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.5-py3-none-any.whl#sha256=06bb080be5b0469037e68db56a7feb10da911a396a47d598598d8d8c50d07419 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,433 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.4-py3-none-any.whl#sha256=af5fa8000dd449fb6d98420287b2049b5e68d268fa1529fa96955b5fe7637c13 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,434 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.3-py3-none-any.whl#sha256=eb77b047b61a087b286e01afea6ee9761c9e687479a4e551be085d82612ed220 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,434 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.2-py3-none-any.whl#sha256=bb7605db211272947ba451cdad35a2b4f554167361f0c08acedbfb0723ac7ab8 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,435 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.1-py3-none-any.whl#sha256=bc5ddc6b683bf26a0b9a8c47ada13d29918503664e9e1c3fdefae73121f3a327 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,435 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.0-py3-none-any.whl#sha256=061d9407266b9d100113fa2d11890a8d5d56f8b496305c5864f08a9af35fcc12 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,436 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.4-py3-none-any.whl#sha256=cf1ee85db62d31642b32742aba0a026a941b85cf4bb49ec48ef09b9e241f3bf5 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,436 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.3-py3-none-any.whl#sha256=55e9a0042694ba7fa482f733a1d548c0180bccf0e35e090b85d7b9050c95162b (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,437 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.2-py3-none-any.whl#sha256=762d5b0c5f82869237d5375d2a8774f99654c3b693d6f77bf6e9decc78b7fd5d (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,437 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.1-py3-none-any.whl#sha256=317a24e4870d587820f8d5be294e2e9a6ad09f70566ce4380506085c47b2fc0a (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,438 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.0-py3-none-any.whl#sha256=4771e87dd8d933815206c063014beff8eff4c8025353723ac67603f49a119224 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,438 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.10.1-py3-none-any.whl#sha256=b4b13fa0d6ed86fbcc1231cad3d220ee81b38452e87fea655641720f803d4c1d (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,439 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.10.0-py3-none-any.whl#sha256=388ade65f63cb37eef343e4f294cf3488b79894ff8061a7d9b2bf42277ded9de (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,439 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.9.3-py3-none-any.whl#sha256=b535b53a5182dc94116e67edb4a34c1efb007574273e2ff4ad72ebc3b4634326 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,440 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.9.2-py3-none-any.whl#sha256=b7fad95c7f041f18a621439aa3cd19fc79d76caa85a93967163566c10b7c6348 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,440 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.9.0-py3-none-any.whl#sha256=1feb6b731a9af26aac7a1e6fab74e85dd960562a1dca6e4c5c9d10234a570e82 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-03-23T02:29:12,441 Skipping link: not a file: https://www.piwheels.org/simple/apache-iotdb/ 2023-03-23T02:29:12,441 Skipping link: not a file: https://pypi.org/simple/apache-iotdb/ 2023-03-23T02:29:12,484 Given no hashes to check 1 links for project 'apache-iotdb': discarding no candidates 2023-03-23T02:29:12,515 Collecting apache-iotdb==0.13.5 2023-03-23T02:29:12,519 Created temporary directory: /tmp/pip-unpack-dnn0rk8j 2023-03-23T02:29:12,744 Downloading apache-iotdb-0.13.5.tar.gz (61 kB) 2023-03-23T02:29:13,026 Added apache-iotdb==0.13.5 from https://files.pythonhosted.org/packages/42/eb/3d7ac8d794238b75997ff3f55db6e02436bfa558a8df4ea21e58bf8db6fd/apache-iotdb-0.13.5.tar.gz to build tracker '/tmp/pip-build-tracker-y00slivh' 2023-03-23T02:29:13,035 Created temporary directory: /tmp/pip-build-env-u8_elk2g 2023-03-23T02:29:13,056 Installing build dependencies: started 2023-03-23T02:29:13,059 Running command pip subprocess to install build dependencies 2023-03-23T02:29:15,766 Using pip 23.0.1 from /home/piwheels/.local/lib/python3.7/site-packages/pip (python 3.7) 2023-03-23T02:29:17,003 DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453 2023-03-23T02:29:17,074 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-03-23T02:29:21,621 Collecting setuptools>=40.8.0 2023-03-23T02:29:21,876 Using cached https://www.piwheels.org/simple/setuptools/setuptools-67.6.0-py3-none-any.whl (1.1 MB) 2023-03-23T02:29:22,513 Collecting wheel 2023-03-23T02:29:22,549 Using cached https://www.piwheels.org/simple/wheel/wheel-0.40.0-py3-none-any.whl (64 kB) 2023-03-23T02:29:28,038 Installing collected packages: wheel, setuptools 2023-03-23T02:29:28,484 Creating /tmp/pip-build-env-u8_elk2g/overlay/bin 2023-03-23T02:29:28,488 changing mode of /tmp/pip-build-env-u8_elk2g/overlay/bin/wheel to 755 2023-03-23T02:29:32,729 Successfully installed setuptools-67.6.0 wheel-0.40.0 2023-03-23T02:29:33,722 Installing build dependencies: finished with status 'done' 2023-03-23T02:29:33,734 Getting requirements to build wheel: started 2023-03-23T02:29:33,736 Running command Getting requirements to build wheel 2023-03-23T02:29:34,900 2023-03-23T02:29:34,908 # Apache IoTDB 2023-03-23T02:29:34,909 [![Main Mac and Linux](https://github.com/apache/iotdb/actions/workflows/main-unix.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-unix.yml) 2023-03-23T02:29:34,909 [![Main Win](https://github.com/apache/iotdb/actions/workflows/main-win.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-win.yml) 2023-03-23T02:29:34,910 [![coveralls](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master) 2023-03-23T02:29:34,910 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2023-03-23T02:29:34,910 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2023-03-23T02:29:34,910 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2023-03-23T02:29:34,911 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2023-03-23T02:29:34,911 ![](https://img.shields.io/badge/platform-win10%20%7C%20macox%20%7C%20linux-yellow.svg) 2023-03-23T02:29:34,911 ![](https://img.shields.io/badge/java--language-1.8-blue.svg) 2023-03-23T02:29:34,912 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2023-03-23T02:29:34,913 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2023-03-23T02:29:34,913 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2023-03-23T02:29:34,913 architecture, high performance and rich feature set together with its deep integration with 2023-03-23T02:29:34,914 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2023-03-23T02:29:34,914 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2023-03-23T02:29:34,914 ## Python Native API 2023-03-23T02:29:34,915 ### Requirements 2023-03-23T02:29:34,916 You have to install thrift (>=0.13) before using the package. 2023-03-23T02:29:34,917 ### How to use (Example) 2023-03-23T02:29:34,917 First, download the latest package: `pip3 install apache-iotdb` 2023-03-23T02:29:34,918 *Notice: If you are installing Python API v0.13.0, DO NOT install by `pip install apache-iotdb==0.13.0`, use `pip install apache-iotdb==0.13.0.post1` instead!* 2023-03-23T02:29:34,919 You can get an example of using the package to read and write data at here: [Example](https://github.com/apache/iotdb/blob/master/client-py/SessionExample.py) 2023-03-23T02:29:34,919 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2023-03-23T02:29:34,920 (you need to add `import iotdb` in the head of the file) 2023-03-23T02:29:34,920 Or: 2023-03-23T02:29:34,921 ```python 2023-03-23T02:29:34,921 from iotdb.Session import Session 2023-03-23T02:29:34,922 ip = "127.0.0.1" 2023-03-23T02:29:34,922 port_ = "6667" 2023-03-23T02:29:34,922 username_ = "root" 2023-03-23T02:29:34,922 password_ = "root" 2023-03-23T02:29:34,923 session = Session(ip, port_, username_, password_) 2023-03-23T02:29:34,923 session.open(False) 2023-03-23T02:29:34,924 zone = session.get_time_zone() 2023-03-23T02:29:34,924 session.close() 2023-03-23T02:29:34,924 ``` 2023-03-23T02:29:34,925 ### Initialization 2023-03-23T02:29:34,926 * Initialize a Session 2023-03-23T02:29:34,926 ```python 2023-03-23T02:29:34,927 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2023-03-23T02:29:34,927 ``` 2023-03-23T02:29:34,928 * Open a session, with a parameter to specify whether to enable RPC compression 2023-03-23T02:29:34,928 ```python 2023-03-23T02:29:34,929 session.open(enable_rpc_compression=False) 2023-03-23T02:29:34,929 ``` 2023-03-23T02:29:34,930 Notice: this RPC compression status of client must comply with that of IoTDB server 2023-03-23T02:29:34,930 * Close a Session 2023-03-23T02:29:34,931 ```python 2023-03-23T02:29:34,931 session.close() 2023-03-23T02:29:34,931 ``` 2023-03-23T02:29:34,932 ### Data Definition Interface (DDL Interface) 2023-03-23T02:29:34,933 #### Storage Group Management 2023-03-23T02:29:34,933 * Set storage group 2023-03-23T02:29:34,934 ```python 2023-03-23T02:29:34,934 session.set_storage_group(group_name) 2023-03-23T02:29:34,935 ``` 2023-03-23T02:29:34,935 * Delete one or several storage groups 2023-03-23T02:29:34,936 ```python 2023-03-23T02:29:34,936 session.delete_storage_group(group_name) 2023-03-23T02:29:34,936 session.delete_storage_groups(group_name_lst) 2023-03-23T02:29:34,937 ``` 2023-03-23T02:29:34,937 #### Timeseries Management 2023-03-23T02:29:34,938 * Create one or multiple timeseries 2023-03-23T02:29:34,939 ```python 2023-03-23T02:29:34,939 session.create_time_series(ts_path, data_type, encoding, compressor, 2023-03-23T02:29:34,939 props=None, tags=None, attributes=None, alias=None) 2023-03-23T02:29:34,940 session.create_multi_time_series( 2023-03-23T02:29:34,940 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2023-03-23T02:29:34,941 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2023-03-23T02:29:34,941 ) 2023-03-23T02:29:34,941 ``` 2023-03-23T02:29:34,942 * Create aligned timeseries 2023-03-23T02:29:34,943 ```python 2023-03-23T02:29:34,943 session.create_aligned_time_series( 2023-03-23T02:29:34,943 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2023-03-23T02:29:34,944 ) 2023-03-23T02:29:34,944 ``` 2023-03-23T02:29:34,944 Attention: Alias of measurements are **not supported** currently. 2023-03-23T02:29:34,945 * Delete one or several timeseries 2023-03-23T02:29:34,946 ```python 2023-03-23T02:29:34,946 session.delete_time_series(paths_list) 2023-03-23T02:29:34,946 ``` 2023-03-23T02:29:34,947 * Check whether the specific timeseries exists 2023-03-23T02:29:34,948 ```python 2023-03-23T02:29:34,948 session.check_time_series_exists(path) 2023-03-23T02:29:34,948 ``` 2023-03-23T02:29:34,949 ### Data Manipulation Interface (DML Interface) 2023-03-23T02:29:34,949 #### Insert 2023-03-23T02:29:34,950 It is recommended to use insertTablet to help improve write efficiency. 2023-03-23T02:29:34,951 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2023-03-23T02:29:34,951 * **Better Write Performance** 2023-03-23T02:29:34,951 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2023-03-23T02:29:34,952 We have two implementations of Tablet in Python API. 2023-03-23T02:29:34,953 * Normal Tablet 2023-03-23T02:29:34,954 ```python 2023-03-23T02:29:34,954 values_ = [ 2023-03-23T02:29:34,954 [False, 10, 11, 1.1, 10011.1, "test01"], 2023-03-23T02:29:34,954 [True, 100, 11111, 1.25, 101.0, "test02"], 2023-03-23T02:29:34,955 [False, 100, 1, 188.1, 688.25, "test03"], 2023-03-23T02:29:34,955 [True, 0, 0, 0, 6.25, "test04"], 2023-03-23T02:29:34,955 ] 2023-03-23T02:29:34,956 timestamps_ = [1, 2, 3, 4] 2023-03-23T02:29:34,956 tablet_ = Tablet( 2023-03-23T02:29:34,956 device_id, measurements_, data_types_, values_, timestamps_ 2023-03-23T02:29:34,957 ) 2023-03-23T02:29:34,957 session.insert_tablet(tablet_) 2023-03-23T02:29:34,957 ``` 2023-03-23T02:29:34,958 * Numpy Tablet 2023-03-23T02:29:34,958 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2023-03-23T02:29:34,959 With less memory footprint and time cost of serialization, the insert performance will be better. 2023-03-23T02:29:34,959 **Notice** 2023-03-23T02:29:34,959 1. time and value columns in Tablet are ndarray. 2023-03-23T02:29:34,960 2. recommended to use the specific dtypes to each ndarray, see the example below 2023-03-23T02:29:34,960 (if not, the default dtypes are also ok). 2023-03-23T02:29:34,961 ```python 2023-03-23T02:29:34,961 import numpy as np 2023-03-23T02:29:34,961 data_types_ = [ 2023-03-23T02:29:34,962 TSDataType.BOOLEAN, 2023-03-23T02:29:34,962 TSDataType.INT32, 2023-03-23T02:29:34,962 TSDataType.INT64, 2023-03-23T02:29:34,963 TSDataType.FLOAT, 2023-03-23T02:29:34,963 TSDataType.DOUBLE, 2023-03-23T02:29:34,963 TSDataType.TEXT, 2023-03-23T02:29:34,963 ] 2023-03-23T02:29:34,964 np_values_ = [ 2023-03-23T02:29:34,964 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2023-03-23T02:29:34,964 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2023-03-23T02:29:34,965 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2023-03-23T02:29:34,965 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2023-03-23T02:29:34,966 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2023-03-23T02:29:34,966 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2023-03-23T02:29:34,966 ] 2023-03-23T02:29:34,966 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2023-03-23T02:29:34,967 np_tablet_ = NumpyTablet( 2023-03-23T02:29:34,967 "root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_ 2023-03-23T02:29:34,968 ) 2023-03-23T02:29:34,968 session.insert_tablet(np_tablet_) 2023-03-23T02:29:34,968 ``` 2023-03-23T02:29:34,969 * Insert multiple Tablets 2023-03-23T02:29:34,969 ```python 2023-03-23T02:29:34,970 session.insert_tablets(tablet_lst) 2023-03-23T02:29:34,970 ``` 2023-03-23T02:29:34,971 * Insert a Record 2023-03-23T02:29:34,971 ```python 2023-03-23T02:29:34,971 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2023-03-23T02:29:34,972 ``` 2023-03-23T02:29:34,973 * Insert multiple Records 2023-03-23T02:29:34,973 ```python 2023-03-23T02:29:34,974 session.insert_records( 2023-03-23T02:29:34,974 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2023-03-23T02:29:34,974 ) 2023-03-23T02:29:34,975 ``` 2023-03-23T02:29:34,975 * Insert multiple Records that belong to the same device. 2023-03-23T02:29:34,975 With type info the server has no need to do type inference, which leads a better performance 2023-03-23T02:29:34,976 ```python 2023-03-23T02:29:34,977 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2023-03-23T02:29:34,977 ``` 2023-03-23T02:29:34,978 #### Insert with type inference 2023-03-23T02:29:34,978 When the data is of String type, we can use the following interface to perform type inference based on the value of the value itself. For example, if value is "true" , it can be automatically inferred to be a boolean type. If value is "3.2" , it can be automatically inferred as a flout type. Without type information, server has to do type inference, which may cost some time. 2023-03-23T02:29:34,979 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2023-03-23T02:29:34,980 ```python 2023-03-23T02:29:34,980 session.insert_str_record(device_id, timestamp, measurements, string_values) 2023-03-23T02:29:34,981 ``` 2023-03-23T02:29:34,981 #### Insert of Aligned Timeseries 2023-03-23T02:29:34,982 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2023-03-23T02:29:34,982 * insert_aligned_record 2023-03-23T02:29:34,983 * insert_aligned_records 2023-03-23T02:29:34,983 * insert_aligned_records_of_one_device 2023-03-23T02:29:34,983 * insert_aligned_tablet 2023-03-23T02:29:34,984 * insert_aligned_tablets 2023-03-23T02:29:34,985 ### IoTDB-SQL Interface 2023-03-23T02:29:34,985 * Execute query statement 2023-03-23T02:29:34,986 ```python 2023-03-23T02:29:34,986 session.execute_query_statement(sql) 2023-03-23T02:29:34,986 ``` 2023-03-23T02:29:34,987 * Execute non query statement 2023-03-23T02:29:34,988 ```python 2023-03-23T02:29:34,988 session.execute_non_query_statement(sql) 2023-03-23T02:29:34,988 ``` 2023-03-23T02:29:34,989 ### Pandas Support 2023-03-23T02:29:34,990 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2023-03-23T02:29:34,990 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2023-03-23T02:29:34,991 Example: 2023-03-23T02:29:34,991 ```python 2023-03-23T02:29:34,992 from iotdb.Session import Session 2023-03-23T02:29:34,992 ip = "127.0.0.1" 2023-03-23T02:29:34,993 port_ = "6667" 2023-03-23T02:29:34,993 username_ = "root" 2023-03-23T02:29:34,993 password_ = "root" 2023-03-23T02:29:34,994 session = Session(ip, port_, username_, password_) 2023-03-23T02:29:34,994 session.open(False) 2023-03-23T02:29:34,994 result = session.execute_query_statement("SELECT * FROM root.*") 2023-03-23T02:29:34,995 # Transform to Pandas Dataset 2023-03-23T02:29:34,996 df = result.todf() 2023-03-23T02:29:34,996 session.close() 2023-03-23T02:29:34,997 # Now you can work with the dataframe 2023-03-23T02:29:34,998 df = ... 2023-03-23T02:29:34,998 ``` 2023-03-23T02:29:34,999 ### IoTDB Testcontainer 2023-03-23T02:29:35,000 The Test Support is based on the lib `testcontainers` (https://testcontainers-python.readthedocs.io/en/latest/index.html) which you need to install in your project if you want to use the feature. 2023-03-23T02:29:35,000 To start (and stop) an IoTDB Database in a Docker container simply do: 2023-03-23T02:29:35,001 ```python 2023-03-23T02:29:35,001 class MyTestCase(unittest.TestCase): 2023-03-23T02:29:35,001 def test_something(self): 2023-03-23T02:29:35,002 with IoTDBContainer() as c: 2023-03-23T02:29:35,002 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2023-03-23T02:29:35,002 session.open(False) 2023-03-23T02:29:35,003 result = session.execute_query_statement("SHOW TIMESERIES") 2023-03-23T02:29:35,003 print(result) 2023-03-23T02:29:35,003 session.close() 2023-03-23T02:29:35,004 ``` 2023-03-23T02:29:35,004 by default it will load the image `apache/iotdb:latest`, if you want a specific version just pass it like e.g. `IoTDBContainer("apache/iotdb:0.12.0")` to get version `0.12.0` running. 2023-03-23T02:29:35,005 ## Developers 2023-03-23T02:29:35,006 ### Introduction 2023-03-23T02:29:35,006 This is an example of how to connect to IoTDB with python, using the thrift rpc interfaces. Things are almost the same on Windows or Linux, but pay attention to the difference like path separator. 2023-03-23T02:29:35,007 ### Prerequisites 2023-03-23T02:29:35,008 Python3.7 or later is preferred. 2023-03-23T02:29:35,009 You have to install Thrift (0.11.0 or later) to compile our thrift file into python code. Below is the official tutorial of installation, eventually, you should have a thrift executable. 2023-03-23T02:29:35,009 ``` 2023-03-23T02:29:35,010 http://thrift.apache.org/docs/install/ 2023-03-23T02:29:35,010 ``` 2023-03-23T02:29:35,010 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2023-03-23T02:29:35,011 ```shell 2023-03-23T02:29:35,011 pip install -r requirements_dev.txt 2023-03-23T02:29:35,011 ``` 2023-03-23T02:29:35,013 ### Compile the thrift library and Debug 2023-03-23T02:29:35,013 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2023-03-23T02:29:35,014 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2023-03-23T02:29:35,014 This folder is ignored from git and should **never be pushed to git!** 2023-03-23T02:29:35,015 **Notice** Do not upload `iotdb/thrift` to the git repo. 2023-03-23T02:29:35,016 ### Session Client & Example 2023-03-23T02:29:35,017 We packed up the Thrift interface in `client-py/src/iotdb/Session.py` (similar with its Java counterpart), also provided an example file `client-py/src/SessionExample.py` of how to use the session module. please read it carefully. 2023-03-23T02:29:35,018 Or, another simple example: 2023-03-23T02:29:35,018 ```python 2023-03-23T02:29:35,019 from iotdb.Session import Session 2023-03-23T02:29:35,019 ip = "127.0.0.1" 2023-03-23T02:29:35,020 port_ = "6667" 2023-03-23T02:29:35,020 username_ = "root" 2023-03-23T02:29:35,020 password_ = "root" 2023-03-23T02:29:35,021 session = Session(ip, port_, username_, password_) 2023-03-23T02:29:35,021 session.open(False) 2023-03-23T02:29:35,021 zone = session.get_time_zone() 2023-03-23T02:29:35,022 session.close() 2023-03-23T02:29:35,022 ``` 2023-03-23T02:29:35,023 ### Tests 2023-03-23T02:29:35,024 Please add your custom tests in `tests` folder. 2023-03-23T02:29:35,025 To run all defined tests just type `pytest .` in the root folder. 2023-03-23T02:29:35,025 **Notice** Some tests need docker to be started on your system as a test instance is started in a docker container using [testcontainers](https://testcontainers-python.readthedocs.io/en/latest/index.html). 2023-03-23T02:29:35,026 ### Futher Tools 2023-03-23T02:29:35,027 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2023-03-23T02:29:35,028 Both can be run by `black .` or `flake8 .` respectively. 2023-03-23T02:29:35,029 ## Releasing 2023-03-23T02:29:35,029 To do a release just ensure that you have the right set of generated thrift files. 2023-03-23T02:29:35,030 Then run linting and auto-formatting. 2023-03-23T02:29:35,030 Then, ensure that all tests work (via `pytest .`). 2023-03-23T02:29:35,030 Then you are good to go to do a release! 2023-03-23T02:29:35,031 ### Preparing your environment 2023-03-23T02:29:35,032 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2023-03-23T02:29:35,033 ### Doing the Release 2023-03-23T02:29:35,034 There is a convenient script `release.sh` to do all steps for a release. 2023-03-23T02:29:35,034 Namely, these are 2023-03-23T02:29:35,035 * Remove all transient directories from last release (if exists) 2023-03-23T02:29:35,035 * (Re-)generate all generated sources via mvn 2023-03-23T02:29:35,036 * Run Linting (flake8) 2023-03-23T02:29:35,036 * Run Tests via pytest 2023-03-23T02:29:35,036 * Build 2023-03-23T02:29:35,037 * Release to pypi 2023-03-23T02:29:35,108 running egg_info 2023-03-23T02:29:35,119 writing apache_iotdb.egg-info/PKG-INFO 2023-03-23T02:29:35,124 writing dependency_links to apache_iotdb.egg-info/dependency_links.txt 2023-03-23T02:29:35,128 writing requirements to apache_iotdb.egg-info/requires.txt 2023-03-23T02:29:35,130 writing top-level names to apache_iotdb.egg-info/top_level.txt 2023-03-23T02:29:35,182 reading manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2023-03-23T02:29:35,187 adding license file 'LICENSE' 2023-03-23T02:29:35,195 writing manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2023-03-23T02:29:35,199 /tmp/pip-build-env-u8_elk2g/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'website' 2023-03-23T02:29:35,199 warnings.warn(msg) 2023-03-23T02:29:35,311 Getting requirements to build wheel: finished with status 'done' 2023-03-23T02:29:35,331 Created temporary directory: /tmp/pip-modern-metadata-1mdyfp_5 2023-03-23T02:29:35,337 Preparing metadata (pyproject.toml): started 2023-03-23T02:29:35,339 Running command Preparing metadata (pyproject.toml) 2023-03-23T02:29:36,655 2023-03-23T02:29:36,664 # Apache IoTDB 2023-03-23T02:29:36,664 [![Main Mac and Linux](https://github.com/apache/iotdb/actions/workflows/main-unix.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-unix.yml) 2023-03-23T02:29:36,665 [![Main Win](https://github.com/apache/iotdb/actions/workflows/main-win.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-win.yml) 2023-03-23T02:29:36,665 [![coveralls](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master) 2023-03-23T02:29:36,665 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2023-03-23T02:29:36,666 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2023-03-23T02:29:36,666 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2023-03-23T02:29:36,666 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2023-03-23T02:29:36,667 ![](https://img.shields.io/badge/platform-win10%20%7C%20macox%20%7C%20linux-yellow.svg) 2023-03-23T02:29:36,667 ![](https://img.shields.io/badge/java--language-1.8-blue.svg) 2023-03-23T02:29:36,667 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2023-03-23T02:29:36,668 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2023-03-23T02:29:36,669 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2023-03-23T02:29:36,669 architecture, high performance and rich feature set together with its deep integration with 2023-03-23T02:29:36,669 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2023-03-23T02:29:36,670 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2023-03-23T02:29:36,670 ## Python Native API 2023-03-23T02:29:36,671 ### Requirements 2023-03-23T02:29:36,671 You have to install thrift (>=0.13) before using the package. 2023-03-23T02:29:36,673 ### How to use (Example) 2023-03-23T02:29:36,673 First, download the latest package: `pip3 install apache-iotdb` 2023-03-23T02:29:36,674 *Notice: If you are installing Python API v0.13.0, DO NOT install by `pip install apache-iotdb==0.13.0`, use `pip install apache-iotdb==0.13.0.post1` instead!* 2023-03-23T02:29:36,675 You can get an example of using the package to read and write data at here: [Example](https://github.com/apache/iotdb/blob/master/client-py/SessionExample.py) 2023-03-23T02:29:36,675 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2023-03-23T02:29:36,676 (you need to add `import iotdb` in the head of the file) 2023-03-23T02:29:36,677 Or: 2023-03-23T02:29:36,677 ```python 2023-03-23T02:29:36,678 from iotdb.Session import Session 2023-03-23T02:29:36,678 ip = "127.0.0.1" 2023-03-23T02:29:36,679 port_ = "6667" 2023-03-23T02:29:36,679 username_ = "root" 2023-03-23T02:29:36,679 password_ = "root" 2023-03-23T02:29:36,680 session = Session(ip, port_, username_, password_) 2023-03-23T02:29:36,680 session.open(False) 2023-03-23T02:29:36,680 zone = session.get_time_zone() 2023-03-23T02:29:36,681 session.close() 2023-03-23T02:29:36,681 ``` 2023-03-23T02:29:36,681 ### Initialization 2023-03-23T02:29:36,682 * Initialize a Session 2023-03-23T02:29:36,683 ```python 2023-03-23T02:29:36,683 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2023-03-23T02:29:36,683 ``` 2023-03-23T02:29:36,684 * Open a session, with a parameter to specify whether to enable RPC compression 2023-03-23T02:29:36,684 ```python 2023-03-23T02:29:36,685 session.open(enable_rpc_compression=False) 2023-03-23T02:29:36,685 ``` 2023-03-23T02:29:36,686 Notice: this RPC compression status of client must comply with that of IoTDB server 2023-03-23T02:29:36,686 * Close a Session 2023-03-23T02:29:36,687 ```python 2023-03-23T02:29:36,687 session.close() 2023-03-23T02:29:36,688 ``` 2023-03-23T02:29:36,688 ### Data Definition Interface (DDL Interface) 2023-03-23T02:29:36,689 #### Storage Group Management 2023-03-23T02:29:36,690 * Set storage group 2023-03-23T02:29:36,690 ```python 2023-03-23T02:29:36,691 session.set_storage_group(group_name) 2023-03-23T02:29:36,691 ``` 2023-03-23T02:29:36,691 * Delete one or several storage groups 2023-03-23T02:29:36,692 ```python 2023-03-23T02:29:36,692 session.delete_storage_group(group_name) 2023-03-23T02:29:36,693 session.delete_storage_groups(group_name_lst) 2023-03-23T02:29:36,693 ``` 2023-03-23T02:29:36,693 #### Timeseries Management 2023-03-23T02:29:36,694 * Create one or multiple timeseries 2023-03-23T02:29:36,695 ```python 2023-03-23T02:29:36,695 session.create_time_series(ts_path, data_type, encoding, compressor, 2023-03-23T02:29:36,695 props=None, tags=None, attributes=None, alias=None) 2023-03-23T02:29:36,696 session.create_multi_time_series( 2023-03-23T02:29:36,696 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2023-03-23T02:29:36,696 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2023-03-23T02:29:36,697 ) 2023-03-23T02:29:36,697 ``` 2023-03-23T02:29:36,698 * Create aligned timeseries 2023-03-23T02:29:36,698 ```python 2023-03-23T02:29:36,699 session.create_aligned_time_series( 2023-03-23T02:29:36,699 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2023-03-23T02:29:36,699 ) 2023-03-23T02:29:36,699 ``` 2023-03-23T02:29:36,700 Attention: Alias of measurements are **not supported** currently. 2023-03-23T02:29:36,701 * Delete one or several timeseries 2023-03-23T02:29:36,701 ```python 2023-03-23T02:29:36,702 session.delete_time_series(paths_list) 2023-03-23T02:29:36,702 ``` 2023-03-23T02:29:36,702 * Check whether the specific timeseries exists 2023-03-23T02:29:36,703 ```python 2023-03-23T02:29:36,703 session.check_time_series_exists(path) 2023-03-23T02:29:36,704 ``` 2023-03-23T02:29:36,704 ### Data Manipulation Interface (DML Interface) 2023-03-23T02:29:36,705 #### Insert 2023-03-23T02:29:36,705 It is recommended to use insertTablet to help improve write efficiency. 2023-03-23T02:29:36,706 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2023-03-23T02:29:36,706 * **Better Write Performance** 2023-03-23T02:29:36,707 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2023-03-23T02:29:36,708 We have two implementations of Tablet in Python API. 2023-03-23T02:29:36,708 * Normal Tablet 2023-03-23T02:29:36,709 ```python 2023-03-23T02:29:36,709 values_ = [ 2023-03-23T02:29:36,709 [False, 10, 11, 1.1, 10011.1, "test01"], 2023-03-23T02:29:36,710 [True, 100, 11111, 1.25, 101.0, "test02"], 2023-03-23T02:29:36,710 [False, 100, 1, 188.1, 688.25, "test03"], 2023-03-23T02:29:36,710 [True, 0, 0, 0, 6.25, "test04"], 2023-03-23T02:29:36,711 ] 2023-03-23T02:29:36,711 timestamps_ = [1, 2, 3, 4] 2023-03-23T02:29:36,711 tablet_ = Tablet( 2023-03-23T02:29:36,712 device_id, measurements_, data_types_, values_, timestamps_ 2023-03-23T02:29:36,712 ) 2023-03-23T02:29:36,712 session.insert_tablet(tablet_) 2023-03-23T02:29:36,712 ``` 2023-03-23T02:29:36,713 * Numpy Tablet 2023-03-23T02:29:36,713 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2023-03-23T02:29:36,714 With less memory footprint and time cost of serialization, the insert performance will be better. 2023-03-23T02:29:36,714 **Notice** 2023-03-23T02:29:36,715 1. time and value columns in Tablet are ndarray. 2023-03-23T02:29:36,715 2. recommended to use the specific dtypes to each ndarray, see the example below 2023-03-23T02:29:36,715 (if not, the default dtypes are also ok). 2023-03-23T02:29:36,716 ```python 2023-03-23T02:29:36,716 import numpy as np 2023-03-23T02:29:36,717 data_types_ = [ 2023-03-23T02:29:36,717 TSDataType.BOOLEAN, 2023-03-23T02:29:36,717 TSDataType.INT32, 2023-03-23T02:29:36,718 TSDataType.INT64, 2023-03-23T02:29:36,718 TSDataType.FLOAT, 2023-03-23T02:29:36,718 TSDataType.DOUBLE, 2023-03-23T02:29:36,719 TSDataType.TEXT, 2023-03-23T02:29:36,719 ] 2023-03-23T02:29:36,719 np_values_ = [ 2023-03-23T02:29:36,720 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2023-03-23T02:29:36,720 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2023-03-23T02:29:36,720 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2023-03-23T02:29:36,720 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2023-03-23T02:29:36,721 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2023-03-23T02:29:36,721 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2023-03-23T02:29:36,721 ] 2023-03-23T02:29:36,722 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2023-03-23T02:29:36,722 np_tablet_ = NumpyTablet( 2023-03-23T02:29:36,722 "root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_ 2023-03-23T02:29:36,723 ) 2023-03-23T02:29:36,723 session.insert_tablet(np_tablet_) 2023-03-23T02:29:36,723 ``` 2023-03-23T02:29:36,724 * Insert multiple Tablets 2023-03-23T02:29:36,725 ```python 2023-03-23T02:29:36,725 session.insert_tablets(tablet_lst) 2023-03-23T02:29:36,725 ``` 2023-03-23T02:29:36,726 * Insert a Record 2023-03-23T02:29:36,726 ```python 2023-03-23T02:29:36,727 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2023-03-23T02:29:36,727 ``` 2023-03-23T02:29:36,728 * Insert multiple Records 2023-03-23T02:29:36,728 ```python 2023-03-23T02:29:36,729 session.insert_records( 2023-03-23T02:29:36,729 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2023-03-23T02:29:36,729 ) 2023-03-23T02:29:36,729 ``` 2023-03-23T02:29:36,730 * Insert multiple Records that belong to the same device. 2023-03-23T02:29:36,730 With type info the server has no need to do type inference, which leads a better performance 2023-03-23T02:29:36,731 ```python 2023-03-23T02:29:36,732 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2023-03-23T02:29:36,732 ``` 2023-03-23T02:29:36,733 #### Insert with type inference 2023-03-23T02:29:36,733 When the data is of String type, we can use the following interface to perform type inference based on the value of the value itself. For example, if value is "true" , it can be automatically inferred to be a boolean type. If value is "3.2" , it can be automatically inferred as a flout type. Without type information, server has to do type inference, which may cost some time. 2023-03-23T02:29:36,734 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2023-03-23T02:29:36,735 ```python 2023-03-23T02:29:36,735 session.insert_str_record(device_id, timestamp, measurements, string_values) 2023-03-23T02:29:36,735 ``` 2023-03-23T02:29:36,736 #### Insert of Aligned Timeseries 2023-03-23T02:29:36,737 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2023-03-23T02:29:36,737 * insert_aligned_record 2023-03-23T02:29:36,738 * insert_aligned_records 2023-03-23T02:29:36,738 * insert_aligned_records_of_one_device 2023-03-23T02:29:36,738 * insert_aligned_tablet 2023-03-23T02:29:36,739 * insert_aligned_tablets 2023-03-23T02:29:36,740 ### IoTDB-SQL Interface 2023-03-23T02:29:36,741 * Execute query statement 2023-03-23T02:29:36,742 ```python 2023-03-23T02:29:36,742 session.execute_query_statement(sql) 2023-03-23T02:29:36,742 ``` 2023-03-23T02:29:36,743 * Execute non query statement 2023-03-23T02:29:36,744 ```python 2023-03-23T02:29:36,744 session.execute_non_query_statement(sql) 2023-03-23T02:29:36,744 ``` 2023-03-23T02:29:36,745 ### Pandas Support 2023-03-23T02:29:36,746 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2023-03-23T02:29:36,746 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2023-03-23T02:29:36,747 Example: 2023-03-23T02:29:36,747 ```python 2023-03-23T02:29:36,748 from iotdb.Session import Session 2023-03-23T02:29:36,748 ip = "127.0.0.1" 2023-03-23T02:29:36,749 port_ = "6667" 2023-03-23T02:29:36,749 username_ = "root" 2023-03-23T02:29:36,749 password_ = "root" 2023-03-23T02:29:36,749 session = Session(ip, port_, username_, password_) 2023-03-23T02:29:36,750 session.open(False) 2023-03-23T02:29:36,750 result = session.execute_query_statement("SELECT * FROM root.*") 2023-03-23T02:29:36,751 # Transform to Pandas Dataset 2023-03-23T02:29:36,751 df = result.todf() 2023-03-23T02:29:36,751 session.close() 2023-03-23T02:29:36,752 # Now you can work with the dataframe 2023-03-23T02:29:36,752 df = ... 2023-03-23T02:29:36,753 ``` 2023-03-23T02:29:36,753 ### IoTDB Testcontainer 2023-03-23T02:29:36,754 The Test Support is based on the lib `testcontainers` (https://testcontainers-python.readthedocs.io/en/latest/index.html) which you need to install in your project if you want to use the feature. 2023-03-23T02:29:36,755 To start (and stop) an IoTDB Database in a Docker container simply do: 2023-03-23T02:29:36,755 ```python 2023-03-23T02:29:36,755 class MyTestCase(unittest.TestCase): 2023-03-23T02:29:36,756 def test_something(self): 2023-03-23T02:29:36,756 with IoTDBContainer() as c: 2023-03-23T02:29:36,756 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2023-03-23T02:29:36,757 session.open(False) 2023-03-23T02:29:36,757 result = session.execute_query_statement("SHOW TIMESERIES") 2023-03-23T02:29:36,757 print(result) 2023-03-23T02:29:36,758 session.close() 2023-03-23T02:29:36,758 ``` 2023-03-23T02:29:36,758 by default it will load the image `apache/iotdb:latest`, if you want a specific version just pass it like e.g. `IoTDBContainer("apache/iotdb:0.12.0")` to get version `0.12.0` running. 2023-03-23T02:29:36,759 ## Developers 2023-03-23T02:29:36,760 ### Introduction 2023-03-23T02:29:36,760 This is an example of how to connect to IoTDB with python, using the thrift rpc interfaces. Things are almost the same on Windows or Linux, but pay attention to the difference like path separator. 2023-03-23T02:29:36,762 ### Prerequisites 2023-03-23T02:29:36,762 Python3.7 or later is preferred. 2023-03-23T02:29:36,763 You have to install Thrift (0.11.0 or later) to compile our thrift file into python code. Below is the official tutorial of installation, eventually, you should have a thrift executable. 2023-03-23T02:29:36,764 ``` 2023-03-23T02:29:36,764 http://thrift.apache.org/docs/install/ 2023-03-23T02:29:36,764 ``` 2023-03-23T02:29:36,765 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2023-03-23T02:29:36,765 ```shell 2023-03-23T02:29:36,765 pip install -r requirements_dev.txt 2023-03-23T02:29:36,766 ``` 2023-03-23T02:29:36,767 ### Compile the thrift library and Debug 2023-03-23T02:29:36,767 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2023-03-23T02:29:36,768 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2023-03-23T02:29:36,768 This folder is ignored from git and should **never be pushed to git!** 2023-03-23T02:29:36,769 **Notice** Do not upload `iotdb/thrift` to the git repo. 2023-03-23T02:29:36,771 ### Session Client & Example 2023-03-23T02:29:36,771 We packed up the Thrift interface in `client-py/src/iotdb/Session.py` (similar with its Java counterpart), also provided an example file `client-py/src/SessionExample.py` of how to use the session module. please read it carefully. 2023-03-23T02:29:36,772 Or, another simple example: 2023-03-23T02:29:36,773 ```python 2023-03-23T02:29:36,773 from iotdb.Session import Session 2023-03-23T02:29:36,774 ip = "127.0.0.1" 2023-03-23T02:29:36,774 port_ = "6667" 2023-03-23T02:29:36,774 username_ = "root" 2023-03-23T02:29:36,775 password_ = "root" 2023-03-23T02:29:36,775 session = Session(ip, port_, username_, password_) 2023-03-23T02:29:36,775 session.open(False) 2023-03-23T02:29:36,776 zone = session.get_time_zone() 2023-03-23T02:29:36,776 session.close() 2023-03-23T02:29:36,776 ``` 2023-03-23T02:29:36,778 ### Tests 2023-03-23T02:29:36,778 Please add your custom tests in `tests` folder. 2023-03-23T02:29:36,779 To run all defined tests just type `pytest .` in the root folder. 2023-03-23T02:29:36,780 **Notice** Some tests need docker to be started on your system as a test instance is started in a docker container using [testcontainers](https://testcontainers-python.readthedocs.io/en/latest/index.html). 2023-03-23T02:29:36,781 ### Futher Tools 2023-03-23T02:29:36,781 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2023-03-23T02:29:36,782 Both can be run by `black .` or `flake8 .` respectively. 2023-03-23T02:29:36,783 ## Releasing 2023-03-23T02:29:36,784 To do a release just ensure that you have the right set of generated thrift files. 2023-03-23T02:29:36,784 Then run linting and auto-formatting. 2023-03-23T02:29:36,784 Then, ensure that all tests work (via `pytest .`). 2023-03-23T02:29:36,785 Then you are good to go to do a release! 2023-03-23T02:29:36,786 ### Preparing your environment 2023-03-23T02:29:36,786 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2023-03-23T02:29:36,788 ### Doing the Release 2023-03-23T02:29:36,788 There is a convenient script `release.sh` to do all steps for a release. 2023-03-23T02:29:36,789 Namely, these are 2023-03-23T02:29:36,789 * Remove all transient directories from last release (if exists) 2023-03-23T02:29:36,790 * (Re-)generate all generated sources via mvn 2023-03-23T02:29:36,790 * Run Linting (flake8) 2023-03-23T02:29:36,790 * Run Tests via pytest 2023-03-23T02:29:36,791 * Build 2023-03-23T02:29:36,791 * Release to pypi 2023-03-23T02:29:36,792 running dist_info 2023-03-23T02:29:36,829 creating /tmp/pip-modern-metadata-1mdyfp_5/apache_iotdb.egg-info 2023-03-23T02:29:36,839 writing /tmp/pip-modern-metadata-1mdyfp_5/apache_iotdb.egg-info/PKG-INFO 2023-03-23T02:29:36,845 writing dependency_links to /tmp/pip-modern-metadata-1mdyfp_5/apache_iotdb.egg-info/dependency_links.txt 2023-03-23T02:29:36,850 writing requirements to /tmp/pip-modern-metadata-1mdyfp_5/apache_iotdb.egg-info/requires.txt 2023-03-23T02:29:36,852 writing top-level names to /tmp/pip-modern-metadata-1mdyfp_5/apache_iotdb.egg-info/top_level.txt 2023-03-23T02:29:36,856 writing manifest file '/tmp/pip-modern-metadata-1mdyfp_5/apache_iotdb.egg-info/SOURCES.txt' 2023-03-23T02:29:36,911 reading manifest file '/tmp/pip-modern-metadata-1mdyfp_5/apache_iotdb.egg-info/SOURCES.txt' 2023-03-23T02:29:36,915 adding license file 'LICENSE' 2023-03-23T02:29:36,923 writing manifest file '/tmp/pip-modern-metadata-1mdyfp_5/apache_iotdb.egg-info/SOURCES.txt' 2023-03-23T02:29:36,925 creating '/tmp/pip-modern-metadata-1mdyfp_5/apache_iotdb-0.13.5.dist-info' 2023-03-23T02:29:37,124 /tmp/pip-build-env-u8_elk2g/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'website' 2023-03-23T02:29:37,124 warnings.warn(msg) 2023-03-23T02:29:37,248 Preparing metadata (pyproject.toml): finished with status 'done' 2023-03-23T02:29:37,266 Source in /tmp/pip-wheel-zx6yfwqi/apache-iotdb_c68287cfee6e40df9d6bed42de4b67ac has version 0.13.5, which satisfies requirement apache-iotdb==0.13.5 from https://files.pythonhosted.org/packages/42/eb/3d7ac8d794238b75997ff3f55db6e02436bfa558a8df4ea21e58bf8db6fd/apache-iotdb-0.13.5.tar.gz 2023-03-23T02:29:37,268 Removed apache-iotdb==0.13.5 from https://files.pythonhosted.org/packages/42/eb/3d7ac8d794238b75997ff3f55db6e02436bfa558a8df4ea21e58bf8db6fd/apache-iotdb-0.13.5.tar.gz from build tracker '/tmp/pip-build-tracker-y00slivh' 2023-03-23T02:29:37,284 Created temporary directory: /tmp/pip-unpack-xcoi84e6 2023-03-23T02:29:37,286 Building wheels for collected packages: apache-iotdb 2023-03-23T02:29:37,294 Created temporary directory: /tmp/pip-wheel-1s9cm38z 2023-03-23T02:29:37,295 Destination directory: /tmp/pip-wheel-1s9cm38z 2023-03-23T02:29:37,300 Building wheel for apache-iotdb (pyproject.toml): started 2023-03-23T02:29:37,302 Running command Building wheel for apache-iotdb (pyproject.toml) 2023-03-23T02:29:38,365 2023-03-23T02:29:38,373 # Apache IoTDB 2023-03-23T02:29:38,374 [![Main Mac and Linux](https://github.com/apache/iotdb/actions/workflows/main-unix.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-unix.yml) 2023-03-23T02:29:38,375 [![Main Win](https://github.com/apache/iotdb/actions/workflows/main-win.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-win.yml) 2023-03-23T02:29:38,375 [![coveralls](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master) 2023-03-23T02:29:38,375 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2023-03-23T02:29:38,376 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2023-03-23T02:29:38,376 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2023-03-23T02:29:38,376 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2023-03-23T02:29:38,377 ![](https://img.shields.io/badge/platform-win10%20%7C%20macox%20%7C%20linux-yellow.svg) 2023-03-23T02:29:38,377 ![](https://img.shields.io/badge/java--language-1.8-blue.svg) 2023-03-23T02:29:38,377 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2023-03-23T02:29:38,379 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2023-03-23T02:29:38,379 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2023-03-23T02:29:38,379 architecture, high performance and rich feature set together with its deep integration with 2023-03-23T02:29:38,379 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2023-03-23T02:29:38,380 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2023-03-23T02:29:38,380 ## Python Native API 2023-03-23T02:29:38,381 ### Requirements 2023-03-23T02:29:38,382 You have to install thrift (>=0.13) before using the package. 2023-03-23T02:29:38,383 ### How to use (Example) 2023-03-23T02:29:38,383 First, download the latest package: `pip3 install apache-iotdb` 2023-03-23T02:29:38,384 *Notice: If you are installing Python API v0.13.0, DO NOT install by `pip install apache-iotdb==0.13.0`, use `pip install apache-iotdb==0.13.0.post1` instead!* 2023-03-23T02:29:38,385 You can get an example of using the package to read and write data at here: [Example](https://github.com/apache/iotdb/blob/master/client-py/SessionExample.py) 2023-03-23T02:29:38,385 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2023-03-23T02:29:38,386 (you need to add `import iotdb` in the head of the file) 2023-03-23T02:29:38,387 Or: 2023-03-23T02:29:38,387 ```python 2023-03-23T02:29:38,388 from iotdb.Session import Session 2023-03-23T02:29:38,388 ip = "127.0.0.1" 2023-03-23T02:29:38,388 port_ = "6667" 2023-03-23T02:29:38,389 username_ = "root" 2023-03-23T02:29:38,389 password_ = "root" 2023-03-23T02:29:38,389 session = Session(ip, port_, username_, password_) 2023-03-23T02:29:38,390 session.open(False) 2023-03-23T02:29:38,390 zone = session.get_time_zone() 2023-03-23T02:29:38,390 session.close() 2023-03-23T02:29:38,391 ``` 2023-03-23T02:29:38,391 ### Initialization 2023-03-23T02:29:38,392 * Initialize a Session 2023-03-23T02:29:38,393 ```python 2023-03-23T02:29:38,393 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2023-03-23T02:29:38,393 ``` 2023-03-23T02:29:38,394 * Open a session, with a parameter to specify whether to enable RPC compression 2023-03-23T02:29:38,394 ```python 2023-03-23T02:29:38,395 session.open(enable_rpc_compression=False) 2023-03-23T02:29:38,395 ``` 2023-03-23T02:29:38,396 Notice: this RPC compression status of client must comply with that of IoTDB server 2023-03-23T02:29:38,396 * Close a Session 2023-03-23T02:29:38,397 ```python 2023-03-23T02:29:38,397 session.close() 2023-03-23T02:29:38,397 ``` 2023-03-23T02:29:38,398 ### Data Definition Interface (DDL Interface) 2023-03-23T02:29:38,399 #### Storage Group Management 2023-03-23T02:29:38,399 * Set storage group 2023-03-23T02:29:38,400 ```python 2023-03-23T02:29:38,400 session.set_storage_group(group_name) 2023-03-23T02:29:38,401 ``` 2023-03-23T02:29:38,401 * Delete one or several storage groups 2023-03-23T02:29:38,402 ```python 2023-03-23T02:29:38,402 session.delete_storage_group(group_name) 2023-03-23T02:29:38,403 session.delete_storage_groups(group_name_lst) 2023-03-23T02:29:38,403 ``` 2023-03-23T02:29:38,403 #### Timeseries Management 2023-03-23T02:29:38,404 * Create one or multiple timeseries 2023-03-23T02:29:38,404 ```python 2023-03-23T02:29:38,405 session.create_time_series(ts_path, data_type, encoding, compressor, 2023-03-23T02:29:38,405 props=None, tags=None, attributes=None, alias=None) 2023-03-23T02:29:38,406 session.create_multi_time_series( 2023-03-23T02:29:38,406 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2023-03-23T02:29:38,406 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2023-03-23T02:29:38,407 ) 2023-03-23T02:29:38,407 ``` 2023-03-23T02:29:38,408 * Create aligned timeseries 2023-03-23T02:29:38,408 ```python 2023-03-23T02:29:38,408 session.create_aligned_time_series( 2023-03-23T02:29:38,409 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2023-03-23T02:29:38,409 ) 2023-03-23T02:29:38,409 ``` 2023-03-23T02:29:38,410 Attention: Alias of measurements are **not supported** currently. 2023-03-23T02:29:38,411 * Delete one or several timeseries 2023-03-23T02:29:38,411 ```python 2023-03-23T02:29:38,411 session.delete_time_series(paths_list) 2023-03-23T02:29:38,412 ``` 2023-03-23T02:29:38,412 * Check whether the specific timeseries exists 2023-03-23T02:29:38,413 ```python 2023-03-23T02:29:38,413 session.check_time_series_exists(path) 2023-03-23T02:29:38,414 ``` 2023-03-23T02:29:38,414 ### Data Manipulation Interface (DML Interface) 2023-03-23T02:29:38,415 #### Insert 2023-03-23T02:29:38,415 It is recommended to use insertTablet to help improve write efficiency. 2023-03-23T02:29:38,416 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2023-03-23T02:29:38,416 * **Better Write Performance** 2023-03-23T02:29:38,417 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2023-03-23T02:29:38,418 We have two implementations of Tablet in Python API. 2023-03-23T02:29:38,418 * Normal Tablet 2023-03-23T02:29:38,419 ```python 2023-03-23T02:29:38,419 values_ = [ 2023-03-23T02:29:38,419 [False, 10, 11, 1.1, 10011.1, "test01"], 2023-03-23T02:29:38,420 [True, 100, 11111, 1.25, 101.0, "test02"], 2023-03-23T02:29:38,420 [False, 100, 1, 188.1, 688.25, "test03"], 2023-03-23T02:29:38,420 [True, 0, 0, 0, 6.25, "test04"], 2023-03-23T02:29:38,421 ] 2023-03-23T02:29:38,421 timestamps_ = [1, 2, 3, 4] 2023-03-23T02:29:38,421 tablet_ = Tablet( 2023-03-23T02:29:38,422 device_id, measurements_, data_types_, values_, timestamps_ 2023-03-23T02:29:38,422 ) 2023-03-23T02:29:38,422 session.insert_tablet(tablet_) 2023-03-23T02:29:38,422 ``` 2023-03-23T02:29:38,423 * Numpy Tablet 2023-03-23T02:29:38,423 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2023-03-23T02:29:38,424 With less memory footprint and time cost of serialization, the insert performance will be better. 2023-03-23T02:29:38,425 **Notice** 2023-03-23T02:29:38,425 1. time and value columns in Tablet are ndarray. 2023-03-23T02:29:38,425 2. recommended to use the specific dtypes to each ndarray, see the example below 2023-03-23T02:29:38,426 (if not, the default dtypes are also ok). 2023-03-23T02:29:38,426 ```python 2023-03-23T02:29:38,426 import numpy as np 2023-03-23T02:29:38,427 data_types_ = [ 2023-03-23T02:29:38,427 TSDataType.BOOLEAN, 2023-03-23T02:29:38,427 TSDataType.INT32, 2023-03-23T02:29:38,428 TSDataType.INT64, 2023-03-23T02:29:38,428 TSDataType.FLOAT, 2023-03-23T02:29:38,428 TSDataType.DOUBLE, 2023-03-23T02:29:38,429 TSDataType.TEXT, 2023-03-23T02:29:38,429 ] 2023-03-23T02:29:38,429 np_values_ = [ 2023-03-23T02:29:38,430 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2023-03-23T02:29:38,430 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2023-03-23T02:29:38,430 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2023-03-23T02:29:38,431 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2023-03-23T02:29:38,431 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2023-03-23T02:29:38,431 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2023-03-23T02:29:38,431 ] 2023-03-23T02:29:38,432 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2023-03-23T02:29:38,432 np_tablet_ = NumpyTablet( 2023-03-23T02:29:38,432 "root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_ 2023-03-23T02:29:38,433 ) 2023-03-23T02:29:38,433 session.insert_tablet(np_tablet_) 2023-03-23T02:29:38,433 ``` 2023-03-23T02:29:38,434 * Insert multiple Tablets 2023-03-23T02:29:38,435 ```python 2023-03-23T02:29:38,435 session.insert_tablets(tablet_lst) 2023-03-23T02:29:38,435 ``` 2023-03-23T02:29:38,436 * Insert a Record 2023-03-23T02:29:38,436 ```python 2023-03-23T02:29:38,437 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2023-03-23T02:29:38,437 ``` 2023-03-23T02:29:38,438 * Insert multiple Records 2023-03-23T02:29:38,438 ```python 2023-03-23T02:29:38,439 session.insert_records( 2023-03-23T02:29:38,439 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2023-03-23T02:29:38,439 ) 2023-03-23T02:29:38,439 ``` 2023-03-23T02:29:38,440 * Insert multiple Records that belong to the same device. 2023-03-23T02:29:38,440 With type info the server has no need to do type inference, which leads a better performance 2023-03-23T02:29:38,441 ```python 2023-03-23T02:29:38,442 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2023-03-23T02:29:38,442 ``` 2023-03-23T02:29:38,443 #### Insert with type inference 2023-03-23T02:29:38,443 When the data is of String type, we can use the following interface to perform type inference based on the value of the value itself. For example, if value is "true" , it can be automatically inferred to be a boolean type. If value is "3.2" , it can be automatically inferred as a flout type. Without type information, server has to do type inference, which may cost some time. 2023-03-23T02:29:38,444 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2023-03-23T02:29:38,445 ```python 2023-03-23T02:29:38,445 session.insert_str_record(device_id, timestamp, measurements, string_values) 2023-03-23T02:29:38,445 ``` 2023-03-23T02:29:38,446 #### Insert of Aligned Timeseries 2023-03-23T02:29:38,447 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2023-03-23T02:29:38,448 * insert_aligned_record 2023-03-23T02:29:38,448 * insert_aligned_records 2023-03-23T02:29:38,449 * insert_aligned_records_of_one_device 2023-03-23T02:29:38,449 * insert_aligned_tablet 2023-03-23T02:29:38,449 * insert_aligned_tablets 2023-03-23T02:29:38,451 ### IoTDB-SQL Interface 2023-03-23T02:29:38,451 * Execute query statement 2023-03-23T02:29:38,452 ```python 2023-03-23T02:29:38,452 session.execute_query_statement(sql) 2023-03-23T02:29:38,452 ``` 2023-03-23T02:29:38,453 * Execute non query statement 2023-03-23T02:29:38,454 ```python 2023-03-23T02:29:38,454 session.execute_non_query_statement(sql) 2023-03-23T02:29:38,454 ``` 2023-03-23T02:29:38,455 ### Pandas Support 2023-03-23T02:29:38,456 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2023-03-23T02:29:38,456 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2023-03-23T02:29:38,457 Example: 2023-03-23T02:29:38,457 ```python 2023-03-23T02:29:38,458 from iotdb.Session import Session 2023-03-23T02:29:38,458 ip = "127.0.0.1" 2023-03-23T02:29:38,458 port_ = "6667" 2023-03-23T02:29:38,459 username_ = "root" 2023-03-23T02:29:38,459 password_ = "root" 2023-03-23T02:29:38,459 session = Session(ip, port_, username_, password_) 2023-03-23T02:29:38,460 session.open(False) 2023-03-23T02:29:38,460 result = session.execute_query_statement("SELECT * FROM root.*") 2023-03-23T02:29:38,460 # Transform to Pandas Dataset 2023-03-23T02:29:38,461 df = result.todf() 2023-03-23T02:29:38,461 session.close() 2023-03-23T02:29:38,462 # Now you can work with the dataframe 2023-03-23T02:29:38,462 df = ... 2023-03-23T02:29:38,462 ``` 2023-03-23T02:29:38,463 ### IoTDB Testcontainer 2023-03-23T02:29:38,464 The Test Support is based on the lib `testcontainers` (https://testcontainers-python.readthedocs.io/en/latest/index.html) which you need to install in your project if you want to use the feature. 2023-03-23T02:29:38,465 To start (and stop) an IoTDB Database in a Docker container simply do: 2023-03-23T02:29:38,465 ```python 2023-03-23T02:29:38,465 class MyTestCase(unittest.TestCase): 2023-03-23T02:29:38,466 def test_something(self): 2023-03-23T02:29:38,466 with IoTDBContainer() as c: 2023-03-23T02:29:38,466 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2023-03-23T02:29:38,467 session.open(False) 2023-03-23T02:29:38,467 result = session.execute_query_statement("SHOW TIMESERIES") 2023-03-23T02:29:38,467 print(result) 2023-03-23T02:29:38,467 session.close() 2023-03-23T02:29:38,468 ``` 2023-03-23T02:29:38,468 by default it will load the image `apache/iotdb:latest`, if you want a specific version just pass it like e.g. `IoTDBContainer("apache/iotdb:0.12.0")` to get version `0.12.0` running. 2023-03-23T02:29:38,469 ## Developers 2023-03-23T02:29:38,470 ### Introduction 2023-03-23T02:29:38,471 This is an example of how to connect to IoTDB with python, using the thrift rpc interfaces. Things are almost the same on Windows or Linux, but pay attention to the difference like path separator. 2023-03-23T02:29:38,472 ### Prerequisites 2023-03-23T02:29:38,472 Python3.7 or later is preferred. 2023-03-23T02:29:38,473 You have to install Thrift (0.11.0 or later) to compile our thrift file into python code. Below is the official tutorial of installation, eventually, you should have a thrift executable. 2023-03-23T02:29:38,473 ``` 2023-03-23T02:29:38,474 http://thrift.apache.org/docs/install/ 2023-03-23T02:29:38,474 ``` 2023-03-23T02:29:38,475 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2023-03-23T02:29:38,475 ```shell 2023-03-23T02:29:38,476 pip install -r requirements_dev.txt 2023-03-23T02:29:38,476 ``` 2023-03-23T02:29:38,477 ### Compile the thrift library and Debug 2023-03-23T02:29:38,478 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2023-03-23T02:29:38,478 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2023-03-23T02:29:38,479 This folder is ignored from git and should **never be pushed to git!** 2023-03-23T02:29:38,479 **Notice** Do not upload `iotdb/thrift` to the git repo. 2023-03-23T02:29:38,481 ### Session Client & Example 2023-03-23T02:29:38,482 We packed up the Thrift interface in `client-py/src/iotdb/Session.py` (similar with its Java counterpart), also provided an example file `client-py/src/SessionExample.py` of how to use the session module. please read it carefully. 2023-03-23T02:29:38,483 Or, another simple example: 2023-03-23T02:29:38,483 ```python 2023-03-23T02:29:38,483 from iotdb.Session import Session 2023-03-23T02:29:38,484 ip = "127.0.0.1" 2023-03-23T02:29:38,484 port_ = "6667" 2023-03-23T02:29:38,485 username_ = "root" 2023-03-23T02:29:38,485 password_ = "root" 2023-03-23T02:29:38,485 session = Session(ip, port_, username_, password_) 2023-03-23T02:29:38,486 session.open(False) 2023-03-23T02:29:38,486 zone = session.get_time_zone() 2023-03-23T02:29:38,486 session.close() 2023-03-23T02:29:38,487 ``` 2023-03-23T02:29:38,488 ### Tests 2023-03-23T02:29:38,488 Please add your custom tests in `tests` folder. 2023-03-23T02:29:38,489 To run all defined tests just type `pytest .` in the root folder. 2023-03-23T02:29:38,490 **Notice** Some tests need docker to be started on your system as a test instance is started in a docker container using [testcontainers](https://testcontainers-python.readthedocs.io/en/latest/index.html). 2023-03-23T02:29:38,491 ### Futher Tools 2023-03-23T02:29:38,491 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2023-03-23T02:29:38,492 Both can be run by `black .` or `flake8 .` respectively. 2023-03-23T02:29:38,493 ## Releasing 2023-03-23T02:29:38,494 To do a release just ensure that you have the right set of generated thrift files. 2023-03-23T02:29:38,494 Then run linting and auto-formatting. 2023-03-23T02:29:38,494 Then, ensure that all tests work (via `pytest .`). 2023-03-23T02:29:38,494 Then you are good to go to do a release! 2023-03-23T02:29:38,496 ### Preparing your environment 2023-03-23T02:29:38,496 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2023-03-23T02:29:38,498 ### Doing the Release 2023-03-23T02:29:38,498 There is a convenient script `release.sh` to do all steps for a release. 2023-03-23T02:29:38,499 Namely, these are 2023-03-23T02:29:38,499 * Remove all transient directories from last release (if exists) 2023-03-23T02:29:38,500 * (Re-)generate all generated sources via mvn 2023-03-23T02:29:38,500 * Run Linting (flake8) 2023-03-23T02:29:38,500 * Run Tests via pytest 2023-03-23T02:29:38,500 * Build 2023-03-23T02:29:38,501 * Release to pypi 2023-03-23T02:29:38,598 running bdist_wheel 2023-03-23T02:29:38,674 running build 2023-03-23T02:29:38,674 running build_py 2023-03-23T02:29:38,693 creating build 2023-03-23T02:29:38,694 creating build/lib 2023-03-23T02:29:38,695 creating build/lib/tests 2023-03-23T02:29:38,697 copying tests/test_dataframe.py -> build/lib/tests 2023-03-23T02:29:38,701 copying tests/test_session.py -> build/lib/tests 2023-03-23T02:29:38,707 copying tests/test_todf.py -> build/lib/tests 2023-03-23T02:29:38,711 copying tests/test_aligned_timeseries.py -> build/lib/tests 2023-03-23T02:29:38,716 copying tests/tablet_performance_comparison.py -> build/lib/tests 2023-03-23T02:29:38,720 copying tests/__init__.py -> build/lib/tests 2023-03-23T02:29:38,724 copying tests/test_numpy_tablet.py -> build/lib/tests 2023-03-23T02:29:38,729 copying tests/test_delete_data.py -> build/lib/tests 2023-03-23T02:29:38,733 copying tests/test_tablet.py -> build/lib/tests 2023-03-23T02:29:38,739 creating build/lib/iotdb 2023-03-23T02:29:38,740 copying iotdb/Session.py -> build/lib/iotdb 2023-03-23T02:29:38,749 copying iotdb/__init__.py -> build/lib/iotdb 2023-03-23T02:29:38,752 copying iotdb/IoTDBContainer.py -> build/lib/iotdb 2023-03-23T02:29:38,758 creating build/lib/iotdb/utils 2023-03-23T02:29:38,759 copying iotdb/utils/SessionDataSet.py -> build/lib/iotdb/utils 2023-03-23T02:29:38,764 copying iotdb/utils/BitMap.py -> build/lib/iotdb/utils 2023-03-23T02:29:38,767 copying iotdb/utils/NumpyTablet.py -> build/lib/iotdb/utils 2023-03-23T02:29:38,771 copying iotdb/utils/RowRecord.py -> build/lib/iotdb/utils 2023-03-23T02:29:38,775 copying iotdb/utils/Field.py -> build/lib/iotdb/utils 2023-03-23T02:29:38,779 copying iotdb/utils/IoTDBConstants.py -> build/lib/iotdb/utils 2023-03-23T02:29:38,783 copying iotdb/utils/IoTDBRpcDataSet.py -> build/lib/iotdb/utils 2023-03-23T02:29:38,787 copying iotdb/utils/__init__.py -> build/lib/iotdb/utils 2023-03-23T02:29:38,791 copying iotdb/utils/Tablet.py -> build/lib/iotdb/utils 2023-03-23T02:29:38,796 creating build/lib/iotdb/thrift 2023-03-23T02:29:38,797 copying iotdb/thrift/__init__.py -> build/lib/iotdb/thrift 2023-03-23T02:29:38,802 creating build/lib/iotdb/thrift/rpc 2023-03-23T02:29:38,803 copying iotdb/thrift/rpc/ttypes.py -> build/lib/iotdb/thrift/rpc 2023-03-23T02:29:38,821 copying iotdb/thrift/rpc/__init__.py -> build/lib/iotdb/thrift/rpc 2023-03-23T02:29:38,824 copying iotdb/thrift/rpc/TSIService.py -> build/lib/iotdb/thrift/rpc 2023-03-23T02:29:38,844 copying iotdb/thrift/rpc/constants.py -> build/lib/iotdb/thrift/rpc 2023-03-23T02:29:38,889 installing to build/bdist.linux-armv7l/wheel 2023-03-23T02:29:38,890 running install 2023-03-23T02:29:38,948 running install_lib 2023-03-23T02:29:38,965 creating build/bdist.linux-armv7l 2023-03-23T02:29:38,966 creating build/bdist.linux-armv7l/wheel 2023-03-23T02:29:38,969 creating build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:38,971 copying build/lib/tests/test_dataframe.py -> build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:38,976 copying build/lib/tests/test_session.py -> build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:38,981 copying build/lib/tests/test_todf.py -> build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:38,985 copying build/lib/tests/test_aligned_timeseries.py -> build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:38,990 copying build/lib/tests/tablet_performance_comparison.py -> build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:38,994 copying build/lib/tests/__init__.py -> build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:38,998 copying build/lib/tests/test_numpy_tablet.py -> build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:39,002 copying build/lib/tests/test_delete_data.py -> build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:39,006 copying build/lib/tests/test_tablet.py -> build/bdist.linux-armv7l/wheel/tests 2023-03-23T02:29:39,012 creating build/bdist.linux-armv7l/wheel/iotdb 2023-03-23T02:29:39,014 copying build/lib/iotdb/Session.py -> build/bdist.linux-armv7l/wheel/iotdb 2023-03-23T02:29:39,022 creating build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,025 copying build/lib/iotdb/utils/SessionDataSet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,029 copying build/lib/iotdb/utils/BitMap.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,033 copying build/lib/iotdb/utils/NumpyTablet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,038 copying build/lib/iotdb/utils/RowRecord.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,042 copying build/lib/iotdb/utils/Field.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,047 copying build/lib/iotdb/utils/IoTDBConstants.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,051 copying build/lib/iotdb/utils/IoTDBRpcDataSet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,057 copying build/lib/iotdb/utils/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,061 copying build/lib/iotdb/utils/Tablet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-03-23T02:29:39,065 copying build/lib/iotdb/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb 2023-03-23T02:29:39,069 copying build/lib/iotdb/IoTDBContainer.py -> build/bdist.linux-armv7l/wheel/iotdb 2023-03-23T02:29:39,074 creating build/bdist.linux-armv7l/wheel/iotdb/thrift 2023-03-23T02:29:39,076 creating build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-03-23T02:29:39,079 copying build/lib/iotdb/thrift/rpc/ttypes.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-03-23T02:29:39,096 copying build/lib/iotdb/thrift/rpc/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-03-23T02:29:39,100 copying build/lib/iotdb/thrift/rpc/TSIService.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-03-23T02:29:39,125 copying build/lib/iotdb/thrift/rpc/constants.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-03-23T02:29:39,128 copying build/lib/iotdb/thrift/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift 2023-03-23T02:29:39,131 running install_egg_info 2023-03-23T02:29:39,188 running egg_info 2023-03-23T02:29:39,197 writing apache_iotdb.egg-info/PKG-INFO 2023-03-23T02:29:39,201 writing dependency_links to apache_iotdb.egg-info/dependency_links.txt 2023-03-23T02:29:39,204 writing requirements to apache_iotdb.egg-info/requires.txt 2023-03-23T02:29:39,206 writing top-level names to apache_iotdb.egg-info/top_level.txt 2023-03-23T02:29:39,230 reading manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2023-03-23T02:29:39,235 adding license file 'LICENSE' 2023-03-23T02:29:39,243 writing manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2023-03-23T02:29:39,246 Copying apache_iotdb.egg-info to build/bdist.linux-armv7l/wheel/apache_iotdb-0.13.5-py3.7.egg-info 2023-03-23T02:29:39,265 running install_scripts 2023-03-23T02:29:39,302 creating build/bdist.linux-armv7l/wheel/apache_iotdb-0.13.5.dist-info/WHEEL 2023-03-23T02:29:39,307 creating '/tmp/pip-wheel-1s9cm38z/.tmp-yhu6yfh2/apache_iotdb-0.13.5-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-03-23T02:29:39,315 adding 'iotdb/IoTDBContainer.py' 2023-03-23T02:29:39,326 adding 'iotdb/Session.py' 2023-03-23T02:29:39,330 adding 'iotdb/__init__.py' 2023-03-23T02:29:39,333 adding 'iotdb/thrift/__init__.py' 2023-03-23T02:29:39,363 adding 'iotdb/thrift/rpc/TSIService.py' 2023-03-23T02:29:39,372 adding 'iotdb/thrift/rpc/__init__.py' 2023-03-23T02:29:39,375 adding 'iotdb/thrift/rpc/constants.py' 2023-03-23T02:29:39,405 adding 'iotdb/thrift/rpc/ttypes.py' 2023-03-23T02:29:39,414 adding 'iotdb/utils/BitMap.py' 2023-03-23T02:29:39,418 adding 'iotdb/utils/Field.py' 2023-03-23T02:29:39,420 adding 'iotdb/utils/IoTDBConstants.py' 2023-03-23T02:29:39,425 adding 'iotdb/utils/IoTDBRpcDataSet.py' 2023-03-23T02:29:39,429 adding 'iotdb/utils/NumpyTablet.py' 2023-03-23T02:29:39,444 adding 'iotdb/utils/RowRecord.py' 2023-03-23T02:29:39,447 adding 'iotdb/utils/SessionDataSet.py' 2023-03-23T02:29:39,450 adding 'iotdb/utils/Tablet.py' 2023-03-23T02:29:39,453 adding 'iotdb/utils/__init__.py' 2023-03-23T02:29:39,457 adding 'tests/__init__.py' 2023-03-23T02:29:39,461 adding 'tests/tablet_performance_comparison.py' 2023-03-23T02:29:39,465 adding 'tests/test_aligned_timeseries.py' 2023-03-23T02:29:39,468 adding 'tests/test_dataframe.py' 2023-03-23T02:29:39,471 adding 'tests/test_delete_data.py' 2023-03-23T02:29:39,474 adding 'tests/test_numpy_tablet.py' 2023-03-23T02:29:39,479 adding 'tests/test_session.py' 2023-03-23T02:29:39,482 adding 'tests/test_tablet.py' 2023-03-23T02:29:39,485 adding 'tests/test_todf.py' 2023-03-23T02:29:39,490 adding 'apache_iotdb-0.13.5.dist-info/LICENSE' 2023-03-23T02:29:39,495 adding 'apache_iotdb-0.13.5.dist-info/METADATA' 2023-03-23T02:29:39,498 adding 'apache_iotdb-0.13.5.dist-info/WHEEL' 2023-03-23T02:29:39,499 adding 'apache_iotdb-0.13.5.dist-info/top_level.txt' 2023-03-23T02:29:39,502 adding 'apache_iotdb-0.13.5.dist-info/RECORD' 2023-03-23T02:29:39,508 removing build/bdist.linux-armv7l/wheel 2023-03-23T02:29:39,532 /tmp/pip-build-env-u8_elk2g/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'website' 2023-03-23T02:29:39,532 warnings.warn(msg) 2023-03-23T02:29:39,664 Building wheel for apache-iotdb (pyproject.toml): finished with status 'done' 2023-03-23T02:29:39,680 Created wheel for apache-iotdb: filename=apache_iotdb-0.13.5-py3-none-any.whl size=79735 sha256=e25dac25664b9ff8313cbb697f634269ef857ec9217d3256b893c43c8b0c151f 2023-03-23T02:29:39,682 Stored in directory: /tmp/pip-ephem-wheel-cache-6hsuhloh/wheels/e8/9f/59/95691f6baa5c34b0e2eb3ffba85fafc41045471a8dd460edd8 2023-03-23T02:29:39,715 Successfully built apache-iotdb 2023-03-23T02:29:39,728 Removed build tracker: '/tmp/pip-build-tracker-y00slivh'