2022-12-19T11:24:15,845 Created temporary directory: /tmp/pip-ephem-wheel-cache-hyb9c6zg 2022-12-19T11:24:15,850 Created temporary directory: /tmp/pip-build-tracker-2949ve9y 2022-12-19T11:24:15,850 Initialized build tracking at /tmp/pip-build-tracker-2949ve9y 2022-12-19T11:24:15,851 Created build tracker: /tmp/pip-build-tracker-2949ve9y 2022-12-19T11:24:15,851 Entered build tracker: /tmp/pip-build-tracker-2949ve9y 2022-12-19T11:24:15,852 Created temporary directory: /tmp/pip-wheel-m3c4b5fm 2022-12-19T11:24:15,861 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 2022-12-19T11:24:15,866 Created temporary directory: /tmp/pip-ephem-wheel-cache-i53cn7ro 2022-12-19T11:24:15,921 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2022-12-19T11:24:15,928 2 location(s) to search for versions of apache-iotdb: 2022-12-19T11:24:15,928 * https://pypi.org/simple/apache-iotdb/ 2022-12-19T11:24:15,928 * https://www.piwheels.org/simple/apache-iotdb/ 2022-12-19T11:24:15,929 Fetching project page and analyzing links: https://pypi.org/simple/apache-iotdb/ 2022-12-19T11:24:15,930 Getting page https://pypi.org/simple/apache-iotdb/ 2022-12-19T11:24:15,934 Found index url https://pypi.org/simple 2022-12-19T11:24:16,173 Fetched page https://pypi.org/simple/apache-iotdb/ as application/vnd.pypi.simple.v1+json 2022-12-19T11:24:16,198 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 2022-12-19T11:24:16,199 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) 2022-12-19T11:24:16,200 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 2022-12-19T11:24:16,201 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) 2022-12-19T11:24:16,202 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 2022-12-19T11:24:16,203 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) 2022-12-19T11:24:16,204 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 2022-12-19T11:24:16,205 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) 2022-12-19T11:24:16,206 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 2022-12-19T11:24:16,207 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) 2022-12-19T11:24:16,208 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 2022-12-19T11:24:16,209 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) 2022-12-19T11:24:16,211 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 2022-12-19T11:24:16,211 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) 2022-12-19T11:24:16,212 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 2022-12-19T11:24:16,213 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) 2022-12-19T11:24:16,214 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 2022-12-19T11:24:16,215 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) 2022-12-19T11:24:16,216 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 2022-12-19T11:24:16,217 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) 2022-12-19T11:24:16,218 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 2022-12-19T11:24:16,219 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) 2022-12-19T11:24:16,220 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 2022-12-19T11:24:16,221 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) 2022-12-19T11:24:16,222 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 2022-12-19T11:24:16,223 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) 2022-12-19T11:24:16,224 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 2022-12-19T11:24:16,225 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) 2022-12-19T11:24:16,226 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 2022-12-19T11:24:16,227 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) 2022-12-19T11:24:16,229 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 2022-12-19T11:24:16,229 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) 2022-12-19T11:24:16,231 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 2022-12-19T11:24:16,231 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) 2022-12-19T11:24:16,233 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 2022-12-19T11:24:16,233 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) 2022-12-19T11:24:16,235 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 2022-12-19T11:24:16,235 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) 2022-12-19T11:24:16,237 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 2022-12-19T11:24:16,237 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) 2022-12-19T11:24:16,239 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 2022-12-19T11:24:16,239 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) 2022-12-19T11:24:16,241 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 2022-12-19T11:24:16,241 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) 2022-12-19T11:24:16,243 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 2022-12-19T11:24:16,243 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) 2022-12-19T11:24:16,245 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 2022-12-19T11:24:16,245 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) 2022-12-19T11:24:16,246 Fetching project page and analyzing links: https://www.piwheels.org/simple/apache-iotdb/ 2022-12-19T11:24:16,247 Getting page https://www.piwheels.org/simple/apache-iotdb/ 2022-12-19T11:24:16,249 Found index url https://www.piwheels.org/simple 2022-12-19T11:24:16,580 Fetched page https://www.piwheels.org/simple/apache-iotdb/ as text/html 2022-12-19T11:24:16,600 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) 2022-12-19T11:24:16,600 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) 2022-12-19T11:24:16,601 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) 2022-12-19T11:24:16,601 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) 2022-12-19T11:24:16,602 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) 2022-12-19T11:24:16,603 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) 2022-12-19T11:24:16,603 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) 2022-12-19T11:24:16,604 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) 2022-12-19T11:24:16,604 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) 2022-12-19T11:24:16,605 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) 2022-12-19T11:24:16,605 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) 2022-12-19T11:24:16,606 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) 2022-12-19T11:24:16,606 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) 2022-12-19T11:24:16,607 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) 2022-12-19T11:24:16,607 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) 2022-12-19T11:24:16,608 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) 2022-12-19T11:24:16,609 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) 2022-12-19T11:24:16,609 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) 2022-12-19T11:24:16,610 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) 2022-12-19T11:24:16,610 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) 2022-12-19T11:24:16,611 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) 2022-12-19T11:24:16,611 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) 2022-12-19T11:24:16,612 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) 2022-12-19T11:24:16,612 Skipping link: not a file: https://www.piwheels.org/simple/apache-iotdb/ 2022-12-19T11:24:16,613 Skipping link: not a file: https://pypi.org/simple/apache-iotdb/ 2022-12-19T11:24:16,654 Given no hashes to check 1 links for project 'apache-iotdb': discarding no candidates 2022-12-19T11:24:16,684 Collecting apache-iotdb==0.13.3 2022-12-19T11:24:16,689 Created temporary directory: /tmp/pip-unpack-w3mgw2tz 2022-12-19T11:24:16,925 Downloading apache-iotdb-0.13.3.tar.gz (60 kB) 2022-12-19T11:24:17,196 Added apache-iotdb==0.13.3 from https://files.pythonhosted.org/packages/30/a0/0153c56e1af8653bfdcf47423949dd6b23e53882c9009acc25e661a44dbe/apache-iotdb-0.13.3.tar.gz to build tracker '/tmp/pip-build-tracker-2949ve9y' 2022-12-19T11:24:17,205 Created temporary directory: /tmp/pip-build-env-9xdghc9a 2022-12-19T11:24:17,217 Installing build dependencies: started 2022-12-19T11:24:17,219 Running command pip subprocess to install build dependencies 2022-12-19T11:24:19,889 Using pip 22.3 from /home/piwheels/.local/lib/python3.7/site-packages/pip (python 3.7) 2022-12-19T11:24:20,698 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 2022-12-19T11:24:20,752 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2022-12-19T11:24:24,611 Collecting setuptools>=40.8.0 2022-12-19T11:24:24,886 Using cached https://www.piwheels.org/simple/setuptools/setuptools-65.6.3-py3-none-any.whl (1.2 MB) 2022-12-19T11:24:25,531 Collecting wheel 2022-12-19T11:24:25,564 Using cached https://www.piwheels.org/simple/wheel/wheel-0.38.4-py3-none-any.whl (36 kB) 2022-12-19T11:24:31,112 Installing collected packages: wheel, setuptools 2022-12-19T11:24:31,394 Creating /tmp/pip-build-env-9xdghc9a/overlay/bin 2022-12-19T11:24:31,398 changing mode of /tmp/pip-build-env-9xdghc9a/overlay/bin/wheel to 755 2022-12-19T11:24:36,212 Successfully installed setuptools-65.6.3 wheel-0.38.4 2022-12-19T11:24:36,243 [notice] A new release of pip available: 22.3 -> 22.3.1 2022-12-19T11:24:36,243 [notice] To update, run: python3 -m pip install --upgrade pip 2022-12-19T11:24:36,675 Installing build dependencies: finished with status 'done' 2022-12-19T11:24:36,687 Getting requirements to build wheel: started 2022-12-19T11:24:36,689 Running command Getting requirements to build wheel 2022-12-19T11:24:38,397 2022-12-19T11:24:38,405 # Apache IoTDB 2022-12-19T11:24:38,405 [![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) 2022-12-19T11:24:38,406 [![Main Win](https://github.com/apache/iotdb/actions/workflows/main-win.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-win.yml) 2022-12-19T11:24:38,406 [![coveralls](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master) 2022-12-19T11:24:38,406 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2022-12-19T11:24:38,407 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2022-12-19T11:24:38,407 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2022-12-19T11:24:38,407 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2022-12-19T11:24:38,408 ![](https://img.shields.io/badge/platform-win10%20%7C%20macox%20%7C%20linux-yellow.svg) 2022-12-19T11:24:38,408 ![](https://img.shields.io/badge/java--language-1.8-blue.svg) 2022-12-19T11:24:38,408 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2022-12-19T11:24:38,409 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2022-12-19T11:24:38,409 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2022-12-19T11:24:38,410 architecture, high performance and rich feature set together with its deep integration with 2022-12-19T11:24:38,410 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2022-12-19T11:24:38,410 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2022-12-19T11:24:38,411 ## Python Native API 2022-12-19T11:24:38,412 ### Requirements 2022-12-19T11:24:38,412 You have to install thrift (>=0.13) before using the package. 2022-12-19T11:24:38,414 ### How to use (Example) 2022-12-19T11:24:38,414 First, download the latest package: `pip3 install apache-iotdb` 2022-12-19T11:24:38,415 *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!* 2022-12-19T11:24:38,415 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) 2022-12-19T11:24:38,416 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2022-12-19T11:24:38,417 (you need to add `import iotdb` in the head of the file) 2022-12-19T11:24:38,417 Or: 2022-12-19T11:24:38,418 ```python 2022-12-19T11:24:38,418 from iotdb.Session import Session 2022-12-19T11:24:38,419 ip = "127.0.0.1" 2022-12-19T11:24:38,419 port_ = "6667" 2022-12-19T11:24:38,420 username_ = "root" 2022-12-19T11:24:38,420 password_ = "root" 2022-12-19T11:24:38,420 session = Session(ip, port_, username_, password_) 2022-12-19T11:24:38,420 session.open(False) 2022-12-19T11:24:38,421 zone = session.get_time_zone() 2022-12-19T11:24:38,421 session.close() 2022-12-19T11:24:38,421 ``` 2022-12-19T11:24:38,422 ### Initialization 2022-12-19T11:24:38,422 * Initialize a Session 2022-12-19T11:24:38,423 ```python 2022-12-19T11:24:38,423 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2022-12-19T11:24:38,424 ``` 2022-12-19T11:24:38,424 * Open a session, with a parameter to specify whether to enable RPC compression 2022-12-19T11:24:38,425 ```python 2022-12-19T11:24:38,425 session.open(enable_rpc_compression=False) 2022-12-19T11:24:38,425 ``` 2022-12-19T11:24:38,426 Notice: this RPC compression status of client must comply with that of IoTDB server 2022-12-19T11:24:38,427 * Close a Session 2022-12-19T11:24:38,427 ```python 2022-12-19T11:24:38,428 session.close() 2022-12-19T11:24:38,428 ``` 2022-12-19T11:24:38,429 ### Data Definition Interface (DDL Interface) 2022-12-19T11:24:38,429 #### Storage Group Management 2022-12-19T11:24:38,430 * Set storage group 2022-12-19T11:24:38,430 ```python 2022-12-19T11:24:38,431 session.set_storage_group(group_name) 2022-12-19T11:24:38,431 ``` 2022-12-19T11:24:38,432 * Delete one or several storage groups 2022-12-19T11:24:38,432 ```python 2022-12-19T11:24:38,433 session.delete_storage_group(group_name) 2022-12-19T11:24:38,433 session.delete_storage_groups(group_name_lst) 2022-12-19T11:24:38,433 ``` 2022-12-19T11:24:38,433 #### Timeseries Management 2022-12-19T11:24:38,434 * Create one or multiple timeseries 2022-12-19T11:24:38,434 ```python 2022-12-19T11:24:38,435 session.create_time_series(ts_path, data_type, encoding, compressor, 2022-12-19T11:24:38,435 props=None, tags=None, attributes=None, alias=None) 2022-12-19T11:24:38,436 session.create_multi_time_series( 2022-12-19T11:24:38,436 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2022-12-19T11:24:38,436 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2022-12-19T11:24:38,437 ) 2022-12-19T11:24:38,437 ``` 2022-12-19T11:24:38,438 * Create aligned timeseries 2022-12-19T11:24:38,438 ```python 2022-12-19T11:24:38,439 session.create_aligned_time_series( 2022-12-19T11:24:38,439 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2022-12-19T11:24:38,439 ) 2022-12-19T11:24:38,440 ``` 2022-12-19T11:24:38,440 Attention: Alias of measurements are **not supported** currently. 2022-12-19T11:24:38,441 * Delete one or several timeseries 2022-12-19T11:24:38,441 ```python 2022-12-19T11:24:38,442 session.delete_time_series(paths_list) 2022-12-19T11:24:38,442 ``` 2022-12-19T11:24:38,443 * Check whether the specific timeseries exists 2022-12-19T11:24:38,443 ```python 2022-12-19T11:24:38,444 session.check_time_series_exists(path) 2022-12-19T11:24:38,444 ``` 2022-12-19T11:24:38,444 ### Data Manipulation Interface (DML Interface) 2022-12-19T11:24:38,445 #### Insert 2022-12-19T11:24:38,446 It is recommended to use insertTablet to help improve write efficiency. 2022-12-19T11:24:38,446 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2022-12-19T11:24:38,447 * **Better Write Performance** 2022-12-19T11:24:38,447 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2022-12-19T11:24:38,448 We have two implementations of Tablet in Python API. 2022-12-19T11:24:38,448 * Normal Tablet 2022-12-19T11:24:38,449 ```python 2022-12-19T11:24:38,449 values_ = [ 2022-12-19T11:24:38,450 [False, 10, 11, 1.1, 10011.1, "test01"], 2022-12-19T11:24:38,450 [True, 100, 11111, 1.25, 101.0, "test02"], 2022-12-19T11:24:38,450 [False, 100, 1, 188.1, 688.25, "test03"], 2022-12-19T11:24:38,451 [True, 0, 0, 0, 6.25, "test04"], 2022-12-19T11:24:38,451 ] 2022-12-19T11:24:38,451 timestamps_ = [1, 2, 3, 4] 2022-12-19T11:24:38,452 tablet_ = Tablet( 2022-12-19T11:24:38,452 device_id, measurements_, data_types_, values_, timestamps_ 2022-12-19T11:24:38,452 ) 2022-12-19T11:24:38,452 session.insert_tablet(tablet_) 2022-12-19T11:24:38,453 ``` 2022-12-19T11:24:38,453 * Numpy Tablet 2022-12-19T11:24:38,454 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2022-12-19T11:24:38,454 With less memory footprint and time cost of serialization, the insert performance will be better. 2022-12-19T11:24:38,454 **Notice** 2022-12-19T11:24:38,455 1. time and value columns in Tablet are ndarray. 2022-12-19T11:24:38,455 2. recommended to use the specific dtypes to each ndarray, see the example below 2022-12-19T11:24:38,455 (if not, the default dtypes are also ok). 2022-12-19T11:24:38,456 ```python 2022-12-19T11:24:38,456 import numpy as np 2022-12-19T11:24:38,456 data_types_ = [ 2022-12-19T11:24:38,457 TSDataType.BOOLEAN, 2022-12-19T11:24:38,457 TSDataType.INT32, 2022-12-19T11:24:38,457 TSDataType.INT64, 2022-12-19T11:24:38,458 TSDataType.FLOAT, 2022-12-19T11:24:38,458 TSDataType.DOUBLE, 2022-12-19T11:24:38,458 TSDataType.TEXT, 2022-12-19T11:24:38,459 ] 2022-12-19T11:24:38,459 np_values_ = [ 2022-12-19T11:24:38,459 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2022-12-19T11:24:38,459 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2022-12-19T11:24:38,460 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2022-12-19T11:24:38,460 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2022-12-19T11:24:38,460 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2022-12-19T11:24:38,461 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2022-12-19T11:24:38,461 ] 2022-12-19T11:24:38,461 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2022-12-19T11:24:38,462 np_tablet_ = NumpyTablet( 2022-12-19T11:24:38,462 "root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_ 2022-12-19T11:24:38,462 ) 2022-12-19T11:24:38,462 session.insert_tablet(np_tablet_) 2022-12-19T11:24:38,463 ``` 2022-12-19T11:24:38,463 * Insert multiple Tablets 2022-12-19T11:24:38,464 ```python 2022-12-19T11:24:38,464 session.insert_tablets(tablet_lst) 2022-12-19T11:24:38,465 ``` 2022-12-19T11:24:38,465 * Insert a Record 2022-12-19T11:24:38,466 ```python 2022-12-19T11:24:38,466 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2022-12-19T11:24:38,466 ``` 2022-12-19T11:24:38,467 * Insert multiple Records 2022-12-19T11:24:38,467 ```python 2022-12-19T11:24:38,468 session.insert_records( 2022-12-19T11:24:38,468 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2022-12-19T11:24:38,468 ) 2022-12-19T11:24:38,469 ``` 2022-12-19T11:24:38,469 * Insert multiple Records that belong to the same device. 2022-12-19T11:24:38,470 With type info the server has no need to do type inference, which leads a better performance 2022-12-19T11:24:38,471 ```python 2022-12-19T11:24:38,471 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2022-12-19T11:24:38,471 ``` 2022-12-19T11:24:38,472 #### Insert with type inference 2022-12-19T11:24:38,473 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. 2022-12-19T11:24:38,473 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2022-12-19T11:24:38,474 ```python 2022-12-19T11:24:38,474 session.insert_str_record(device_id, timestamp, measurements, string_values) 2022-12-19T11:24:38,474 ``` 2022-12-19T11:24:38,475 #### Insert of Aligned Timeseries 2022-12-19T11:24:38,476 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2022-12-19T11:24:38,476 * insert_aligned_record 2022-12-19T11:24:38,476 * insert_aligned_records 2022-12-19T11:24:38,477 * insert_aligned_records_of_one_device 2022-12-19T11:24:38,477 * insert_aligned_tablet 2022-12-19T11:24:38,477 * insert_aligned_tablets 2022-12-19T11:24:38,478 ### IoTDB-SQL Interface 2022-12-19T11:24:38,479 * Execute query statement 2022-12-19T11:24:38,479 ```python 2022-12-19T11:24:38,480 session.execute_query_statement(sql) 2022-12-19T11:24:38,480 ``` 2022-12-19T11:24:38,481 * Execute non query statement 2022-12-19T11:24:38,481 ```python 2022-12-19T11:24:38,481 session.execute_non_query_statement(sql) 2022-12-19T11:24:38,482 ``` 2022-12-19T11:24:38,483 ### Pandas Support 2022-12-19T11:24:38,483 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2022-12-19T11:24:38,483 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2022-12-19T11:24:38,484 Example: 2022-12-19T11:24:38,485 ```python 2022-12-19T11:24:38,485 from iotdb.Session import Session 2022-12-19T11:24:38,485 ip = "127.0.0.1" 2022-12-19T11:24:38,486 port_ = "6667" 2022-12-19T11:24:38,486 username_ = "root" 2022-12-19T11:24:38,486 password_ = "root" 2022-12-19T11:24:38,487 session = Session(ip, port_, username_, password_) 2022-12-19T11:24:38,487 session.open(False) 2022-12-19T11:24:38,487 result = session.execute_query_statement("SELECT * FROM root.*") 2022-12-19T11:24:38,488 # Transform to Pandas Dataset 2022-12-19T11:24:38,488 df = result.todf() 2022-12-19T11:24:38,489 session.close() 2022-12-19T11:24:38,490 # Now you can work with the dataframe 2022-12-19T11:24:38,490 df = ... 2022-12-19T11:24:38,490 ``` 2022-12-19T11:24:38,491 ### IoTDB Testcontainer 2022-12-19T11:24:38,492 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. 2022-12-19T11:24:38,492 To start (and stop) an IoTDB Database in a Docker container simply do: 2022-12-19T11:24:38,493 ```python 2022-12-19T11:24:38,493 class MyTestCase(unittest.TestCase): 2022-12-19T11:24:38,493 def test_something(self): 2022-12-19T11:24:38,494 with IoTDBContainer() as c: 2022-12-19T11:24:38,494 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2022-12-19T11:24:38,494 session.open(False) 2022-12-19T11:24:38,495 result = session.execute_query_statement("SHOW TIMESERIES") 2022-12-19T11:24:38,495 print(result) 2022-12-19T11:24:38,495 session.close() 2022-12-19T11:24:38,496 ``` 2022-12-19T11:24:38,496 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. 2022-12-19T11:24:38,497 ## Developers 2022-12-19T11:24:38,498 ### Introduction 2022-12-19T11:24:38,498 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. 2022-12-19T11:24:38,499 ### Prerequisites 2022-12-19T11:24:38,500 Python3.7 or later is preferred. 2022-12-19T11:24:38,501 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. 2022-12-19T11:24:38,501 ``` 2022-12-19T11:24:38,501 http://thrift.apache.org/docs/install/ 2022-12-19T11:24:38,502 ``` 2022-12-19T11:24:38,502 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2022-12-19T11:24:38,503 ```shell 2022-12-19T11:24:38,503 pip install -r requirements_dev.txt 2022-12-19T11:24:38,503 ``` 2022-12-19T11:24:38,504 ### Compile the thrift library and Debug 2022-12-19T11:24:38,505 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2022-12-19T11:24:38,505 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2022-12-19T11:24:38,506 This folder is ignored from git and should **never be pushed to git!** 2022-12-19T11:24:38,506 **Notice** Do not upload `iotdb/thrift` to the git repo. 2022-12-19T11:24:38,508 ### Session Client & Example 2022-12-19T11:24:38,508 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. 2022-12-19T11:24:38,509 Or, another simple example: 2022-12-19T11:24:38,510 ```python 2022-12-19T11:24:38,510 from iotdb.Session import Session 2022-12-19T11:24:38,511 ip = "127.0.0.1" 2022-12-19T11:24:38,511 port_ = "6667" 2022-12-19T11:24:38,511 username_ = "root" 2022-12-19T11:24:38,512 password_ = "root" 2022-12-19T11:24:38,512 session = Session(ip, port_, username_, password_) 2022-12-19T11:24:38,512 session.open(False) 2022-12-19T11:24:38,513 zone = session.get_time_zone() 2022-12-19T11:24:38,513 session.close() 2022-12-19T11:24:38,513 ``` 2022-12-19T11:24:38,514 ### Tests 2022-12-19T11:24:38,515 Please add your custom tests in `tests` folder. 2022-12-19T11:24:38,516 To run all defined tests just type `pytest .` in the root folder. 2022-12-19T11:24:38,516 **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). 2022-12-19T11:24:38,517 ### Futher Tools 2022-12-19T11:24:38,518 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2022-12-19T11:24:38,518 Both can be run by `black .` or `flake8 .` respectively. 2022-12-19T11:24:38,519 ## Releasing 2022-12-19T11:24:38,520 To do a release just ensure that you have the right set of generated thrift files. 2022-12-19T11:24:38,520 Then run linting and auto-formatting. 2022-12-19T11:24:38,521 Then, ensure that all tests work (via `pytest .`). 2022-12-19T11:24:38,521 Then you are good to go to do a release! 2022-12-19T11:24:38,522 ### Preparing your environment 2022-12-19T11:24:38,522 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2022-12-19T11:24:38,524 ### Doing the Release 2022-12-19T11:24:38,524 There is a convenient script `release.sh` to do all steps for a release. 2022-12-19T11:24:38,525 Namely, these are 2022-12-19T11:24:38,525 * Remove all transient directories from last release (if exists) 2022-12-19T11:24:38,525 * (Re-)generate all generated sources via mvn 2022-12-19T11:24:38,526 * Run Linting (flake8) 2022-12-19T11:24:38,526 * Run Tests via pytest 2022-12-19T11:24:38,526 * Build 2022-12-19T11:24:38,527 * Release to pypi 2022-12-19T11:24:38,612 running egg_info 2022-12-19T11:24:38,624 writing apache_iotdb.egg-info/PKG-INFO 2022-12-19T11:24:38,629 writing dependency_links to apache_iotdb.egg-info/dependency_links.txt 2022-12-19T11:24:38,633 writing requirements to apache_iotdb.egg-info/requires.txt 2022-12-19T11:24:38,636 writing top-level names to apache_iotdb.egg-info/top_level.txt 2022-12-19T11:24:38,683 reading manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2022-12-19T11:24:38,689 adding license file 'LICENSE' 2022-12-19T11:24:38,697 writing manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2022-12-19T11:24:38,700 /tmp/pip-build-env-9xdghc9a/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'website' 2022-12-19T11:24:38,701 warnings.warn(msg) 2022-12-19T11:24:38,897 Getting requirements to build wheel: finished with status 'done' 2022-12-19T11:24:38,917 Created temporary directory: /tmp/pip-modern-metadata-zhzdt6v4 2022-12-19T11:24:38,923 Preparing metadata (pyproject.toml): started 2022-12-19T11:24:38,925 Running command Preparing metadata (pyproject.toml) 2022-12-19T11:24:40,578 2022-12-19T11:24:40,586 # Apache IoTDB 2022-12-19T11:24:40,587 [![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) 2022-12-19T11:24:40,587 [![Main Win](https://github.com/apache/iotdb/actions/workflows/main-win.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-win.yml) 2022-12-19T11:24:40,588 [![coveralls](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master) 2022-12-19T11:24:40,588 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2022-12-19T11:24:40,589 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2022-12-19T11:24:40,589 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2022-12-19T11:24:40,589 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2022-12-19T11:24:40,590 ![](https://img.shields.io/badge/platform-win10%20%7C%20macox%20%7C%20linux-yellow.svg) 2022-12-19T11:24:40,590 ![](https://img.shields.io/badge/java--language-1.8-blue.svg) 2022-12-19T11:24:40,590 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2022-12-19T11:24:40,591 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2022-12-19T11:24:40,592 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2022-12-19T11:24:40,592 architecture, high performance and rich feature set together with its deep integration with 2022-12-19T11:24:40,592 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2022-12-19T11:24:40,593 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2022-12-19T11:24:40,593 ## Python Native API 2022-12-19T11:24:40,594 ### Requirements 2022-12-19T11:24:40,594 You have to install thrift (>=0.13) before using the package. 2022-12-19T11:24:40,596 ### How to use (Example) 2022-12-19T11:24:40,596 First, download the latest package: `pip3 install apache-iotdb` 2022-12-19T11:24:40,597 *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!* 2022-12-19T11:24:40,598 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) 2022-12-19T11:24:40,598 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2022-12-19T11:24:40,599 (you need to add `import iotdb` in the head of the file) 2022-12-19T11:24:40,599 Or: 2022-12-19T11:24:40,600 ```python 2022-12-19T11:24:40,600 from iotdb.Session import Session 2022-12-19T11:24:40,601 ip = "127.0.0.1" 2022-12-19T11:24:40,601 port_ = "6667" 2022-12-19T11:24:40,601 username_ = "root" 2022-12-19T11:24:40,602 password_ = "root" 2022-12-19T11:24:40,602 session = Session(ip, port_, username_, password_) 2022-12-19T11:24:40,602 session.open(False) 2022-12-19T11:24:40,603 zone = session.get_time_zone() 2022-12-19T11:24:40,603 session.close() 2022-12-19T11:24:40,603 ``` 2022-12-19T11:24:40,604 ### Initialization 2022-12-19T11:24:40,604 * Initialize a Session 2022-12-19T11:24:40,605 ```python 2022-12-19T11:24:40,605 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2022-12-19T11:24:40,606 ``` 2022-12-19T11:24:40,606 * Open a session, with a parameter to specify whether to enable RPC compression 2022-12-19T11:24:40,607 ```python 2022-12-19T11:24:40,607 session.open(enable_rpc_compression=False) 2022-12-19T11:24:40,607 ``` 2022-12-19T11:24:40,608 Notice: this RPC compression status of client must comply with that of IoTDB server 2022-12-19T11:24:40,609 * Close a Session 2022-12-19T11:24:40,609 ```python 2022-12-19T11:24:40,610 session.close() 2022-12-19T11:24:40,610 ``` 2022-12-19T11:24:40,610 ### Data Definition Interface (DDL Interface) 2022-12-19T11:24:40,611 #### Storage Group Management 2022-12-19T11:24:40,612 * Set storage group 2022-12-19T11:24:40,612 ```python 2022-12-19T11:24:40,612 session.set_storage_group(group_name) 2022-12-19T11:24:40,613 ``` 2022-12-19T11:24:40,613 * Delete one or several storage groups 2022-12-19T11:24:40,614 ```python 2022-12-19T11:24:40,614 session.delete_storage_group(group_name) 2022-12-19T11:24:40,615 session.delete_storage_groups(group_name_lst) 2022-12-19T11:24:40,615 ``` 2022-12-19T11:24:40,615 #### Timeseries Management 2022-12-19T11:24:40,616 * Create one or multiple timeseries 2022-12-19T11:24:40,617 ```python 2022-12-19T11:24:40,617 session.create_time_series(ts_path, data_type, encoding, compressor, 2022-12-19T11:24:40,617 props=None, tags=None, attributes=None, alias=None) 2022-12-19T11:24:40,618 session.create_multi_time_series( 2022-12-19T11:24:40,618 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2022-12-19T11:24:40,618 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2022-12-19T11:24:40,619 ) 2022-12-19T11:24:40,619 ``` 2022-12-19T11:24:40,620 * Create aligned timeseries 2022-12-19T11:24:40,620 ```python 2022-12-19T11:24:40,620 session.create_aligned_time_series( 2022-12-19T11:24:40,621 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2022-12-19T11:24:40,621 ) 2022-12-19T11:24:40,621 ``` 2022-12-19T11:24:40,622 Attention: Alias of measurements are **not supported** currently. 2022-12-19T11:24:40,622 * Delete one or several timeseries 2022-12-19T11:24:40,623 ```python 2022-12-19T11:24:40,623 session.delete_time_series(paths_list) 2022-12-19T11:24:40,624 ``` 2022-12-19T11:24:40,624 * Check whether the specific timeseries exists 2022-12-19T11:24:40,625 ```python 2022-12-19T11:24:40,625 session.check_time_series_exists(path) 2022-12-19T11:24:40,625 ``` 2022-12-19T11:24:40,626 ### Data Manipulation Interface (DML Interface) 2022-12-19T11:24:40,626 #### Insert 2022-12-19T11:24:40,627 It is recommended to use insertTablet to help improve write efficiency. 2022-12-19T11:24:40,628 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2022-12-19T11:24:40,628 * **Better Write Performance** 2022-12-19T11:24:40,628 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2022-12-19T11:24:40,629 We have two implementations of Tablet in Python API. 2022-12-19T11:24:40,630 * Normal Tablet 2022-12-19T11:24:40,630 ```python 2022-12-19T11:24:40,631 values_ = [ 2022-12-19T11:24:40,631 [False, 10, 11, 1.1, 10011.1, "test01"], 2022-12-19T11:24:40,631 [True, 100, 11111, 1.25, 101.0, "test02"], 2022-12-19T11:24:40,632 [False, 100, 1, 188.1, 688.25, "test03"], 2022-12-19T11:24:40,632 [True, 0, 0, 0, 6.25, "test04"], 2022-12-19T11:24:40,632 ] 2022-12-19T11:24:40,632 timestamps_ = [1, 2, 3, 4] 2022-12-19T11:24:40,633 tablet_ = Tablet( 2022-12-19T11:24:40,633 device_id, measurements_, data_types_, values_, timestamps_ 2022-12-19T11:24:40,633 ) 2022-12-19T11:24:40,634 session.insert_tablet(tablet_) 2022-12-19T11:24:40,634 ``` 2022-12-19T11:24:40,634 * Numpy Tablet 2022-12-19T11:24:40,635 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2022-12-19T11:24:40,635 With less memory footprint and time cost of serialization, the insert performance will be better. 2022-12-19T11:24:40,636 **Notice** 2022-12-19T11:24:40,636 1. time and value columns in Tablet are ndarray. 2022-12-19T11:24:40,636 2. recommended to use the specific dtypes to each ndarray, see the example below 2022-12-19T11:24:40,637 (if not, the default dtypes are also ok). 2022-12-19T11:24:40,637 ```python 2022-12-19T11:24:40,637 import numpy as np 2022-12-19T11:24:40,638 data_types_ = [ 2022-12-19T11:24:40,638 TSDataType.BOOLEAN, 2022-12-19T11:24:40,639 TSDataType.INT32, 2022-12-19T11:24:40,639 TSDataType.INT64, 2022-12-19T11:24:40,639 TSDataType.FLOAT, 2022-12-19T11:24:40,640 TSDataType.DOUBLE, 2022-12-19T11:24:40,640 TSDataType.TEXT, 2022-12-19T11:24:40,640 ] 2022-12-19T11:24:40,640 np_values_ = [ 2022-12-19T11:24:40,641 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2022-12-19T11:24:40,641 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2022-12-19T11:24:40,641 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2022-12-19T11:24:40,642 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2022-12-19T11:24:40,642 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2022-12-19T11:24:40,642 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2022-12-19T11:24:40,643 ] 2022-12-19T11:24:40,643 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2022-12-19T11:24:40,643 np_tablet_ = NumpyTablet( 2022-12-19T11:24:40,643 "root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_ 2022-12-19T11:24:40,644 ) 2022-12-19T11:24:40,644 session.insert_tablet(np_tablet_) 2022-12-19T11:24:40,644 ``` 2022-12-19T11:24:40,645 * Insert multiple Tablets 2022-12-19T11:24:40,645 ```python 2022-12-19T11:24:40,646 session.insert_tablets(tablet_lst) 2022-12-19T11:24:40,646 ``` 2022-12-19T11:24:40,647 * Insert a Record 2022-12-19T11:24:40,647 ```python 2022-12-19T11:24:40,647 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2022-12-19T11:24:40,648 ``` 2022-12-19T11:24:40,648 * Insert multiple Records 2022-12-19T11:24:40,649 ```python 2022-12-19T11:24:40,649 session.insert_records( 2022-12-19T11:24:40,650 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2022-12-19T11:24:40,650 ) 2022-12-19T11:24:40,650 ``` 2022-12-19T11:24:40,651 * Insert multiple Records that belong to the same device. 2022-12-19T11:24:40,651 With type info the server has no need to do type inference, which leads a better performance 2022-12-19T11:24:40,652 ```python 2022-12-19T11:24:40,652 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2022-12-19T11:24:40,652 ``` 2022-12-19T11:24:40,653 #### Insert with type inference 2022-12-19T11:24:40,654 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. 2022-12-19T11:24:40,654 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2022-12-19T11:24:40,655 ```python 2022-12-19T11:24:40,655 session.insert_str_record(device_id, timestamp, measurements, string_values) 2022-12-19T11:24:40,656 ``` 2022-12-19T11:24:40,656 #### Insert of Aligned Timeseries 2022-12-19T11:24:40,657 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2022-12-19T11:24:40,657 * insert_aligned_record 2022-12-19T11:24:40,658 * insert_aligned_records 2022-12-19T11:24:40,658 * insert_aligned_records_of_one_device 2022-12-19T11:24:40,658 * insert_aligned_tablet 2022-12-19T11:24:40,659 * insert_aligned_tablets 2022-12-19T11:24:40,660 ### IoTDB-SQL Interface 2022-12-19T11:24:40,660 * Execute query statement 2022-12-19T11:24:40,661 ```python 2022-12-19T11:24:40,661 session.execute_query_statement(sql) 2022-12-19T11:24:40,661 ``` 2022-12-19T11:24:40,662 * Execute non query statement 2022-12-19T11:24:40,663 ```python 2022-12-19T11:24:40,663 session.execute_non_query_statement(sql) 2022-12-19T11:24:40,663 ``` 2022-12-19T11:24:40,664 ### Pandas Support 2022-12-19T11:24:40,665 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2022-12-19T11:24:40,665 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2022-12-19T11:24:40,666 Example: 2022-12-19T11:24:40,666 ```python 2022-12-19T11:24:40,666 from iotdb.Session import Session 2022-12-19T11:24:40,667 ip = "127.0.0.1" 2022-12-19T11:24:40,667 port_ = "6667" 2022-12-19T11:24:40,667 username_ = "root" 2022-12-19T11:24:40,668 password_ = "root" 2022-12-19T11:24:40,668 session = Session(ip, port_, username_, password_) 2022-12-19T11:24:40,668 session.open(False) 2022-12-19T11:24:40,669 result = session.execute_query_statement("SELECT * FROM root.*") 2022-12-19T11:24:40,669 # Transform to Pandas Dataset 2022-12-19T11:24:40,670 df = result.todf() 2022-12-19T11:24:40,670 session.close() 2022-12-19T11:24:40,671 # Now you can work with the dataframe 2022-12-19T11:24:40,671 df = ... 2022-12-19T11:24:40,671 ``` 2022-12-19T11:24:40,672 ### IoTDB Testcontainer 2022-12-19T11:24:40,673 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. 2022-12-19T11:24:40,674 To start (and stop) an IoTDB Database in a Docker container simply do: 2022-12-19T11:24:40,674 ```python 2022-12-19T11:24:40,674 class MyTestCase(unittest.TestCase): 2022-12-19T11:24:40,675 def test_something(self): 2022-12-19T11:24:40,675 with IoTDBContainer() as c: 2022-12-19T11:24:40,675 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2022-12-19T11:24:40,676 session.open(False) 2022-12-19T11:24:40,676 result = session.execute_query_statement("SHOW TIMESERIES") 2022-12-19T11:24:40,676 print(result) 2022-12-19T11:24:40,677 session.close() 2022-12-19T11:24:40,677 ``` 2022-12-19T11:24:40,678 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. 2022-12-19T11:24:40,679 ## Developers 2022-12-19T11:24:40,679 ### Introduction 2022-12-19T11:24:40,680 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. 2022-12-19T11:24:40,681 ### Prerequisites 2022-12-19T11:24:40,682 Python3.7 or later is preferred. 2022-12-19T11:24:40,682 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. 2022-12-19T11:24:40,683 ``` 2022-12-19T11:24:40,683 http://thrift.apache.org/docs/install/ 2022-12-19T11:24:40,683 ``` 2022-12-19T11:24:40,684 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2022-12-19T11:24:40,684 ```shell 2022-12-19T11:24:40,685 pip install -r requirements_dev.txt 2022-12-19T11:24:40,685 ``` 2022-12-19T11:24:40,686 ### Compile the thrift library and Debug 2022-12-19T11:24:40,686 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2022-12-19T11:24:40,687 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2022-12-19T11:24:40,687 This folder is ignored from git and should **never be pushed to git!** 2022-12-19T11:24:40,688 **Notice** Do not upload `iotdb/thrift` to the git repo. 2022-12-19T11:24:40,690 ### Session Client & Example 2022-12-19T11:24:40,690 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. 2022-12-19T11:24:40,691 Or, another simple example: 2022-12-19T11:24:40,692 ```python 2022-12-19T11:24:40,692 from iotdb.Session import Session 2022-12-19T11:24:40,692 ip = "127.0.0.1" 2022-12-19T11:24:40,693 port_ = "6667" 2022-12-19T11:24:40,693 username_ = "root" 2022-12-19T11:24:40,693 password_ = "root" 2022-12-19T11:24:40,694 session = Session(ip, port_, username_, password_) 2022-12-19T11:24:40,694 session.open(False) 2022-12-19T11:24:40,694 zone = session.get_time_zone() 2022-12-19T11:24:40,694 session.close() 2022-12-19T11:24:40,695 ``` 2022-12-19T11:24:40,696 ### Tests 2022-12-19T11:24:40,696 Please add your custom tests in `tests` folder. 2022-12-19T11:24:40,697 To run all defined tests just type `pytest .` in the root folder. 2022-12-19T11:24:40,698 **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). 2022-12-19T11:24:40,699 ### Futher Tools 2022-12-19T11:24:40,700 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2022-12-19T11:24:40,700 Both can be run by `black .` or `flake8 .` respectively. 2022-12-19T11:24:40,701 ## Releasing 2022-12-19T11:24:40,702 To do a release just ensure that you have the right set of generated thrift files. 2022-12-19T11:24:40,702 Then run linting and auto-formatting. 2022-12-19T11:24:40,702 Then, ensure that all tests work (via `pytest .`). 2022-12-19T11:24:40,702 Then you are good to go to do a release! 2022-12-19T11:24:40,704 ### Preparing your environment 2022-12-19T11:24:40,704 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2022-12-19T11:24:40,705 ### Doing the Release 2022-12-19T11:24:40,706 There is a convenient script `release.sh` to do all steps for a release. 2022-12-19T11:24:40,706 Namely, these are 2022-12-19T11:24:40,707 * Remove all transient directories from last release (if exists) 2022-12-19T11:24:40,707 * (Re-)generate all generated sources via mvn 2022-12-19T11:24:40,707 * Run Linting (flake8) 2022-12-19T11:24:40,708 * Run Tests via pytest 2022-12-19T11:24:40,708 * Build 2022-12-19T11:24:40,708 * Release to pypi 2022-12-19T11:24:40,736 running dist_info 2022-12-19T11:24:40,779 creating /tmp/pip-modern-metadata-zhzdt6v4/apache_iotdb.egg-info 2022-12-19T11:24:40,789 writing /tmp/pip-modern-metadata-zhzdt6v4/apache_iotdb.egg-info/PKG-INFO 2022-12-19T11:24:40,795 writing dependency_links to /tmp/pip-modern-metadata-zhzdt6v4/apache_iotdb.egg-info/dependency_links.txt 2022-12-19T11:24:40,800 writing requirements to /tmp/pip-modern-metadata-zhzdt6v4/apache_iotdb.egg-info/requires.txt 2022-12-19T11:24:40,802 writing top-level names to /tmp/pip-modern-metadata-zhzdt6v4/apache_iotdb.egg-info/top_level.txt 2022-12-19T11:24:40,805 writing manifest file '/tmp/pip-modern-metadata-zhzdt6v4/apache_iotdb.egg-info/SOURCES.txt' 2022-12-19T11:24:40,850 reading manifest file '/tmp/pip-modern-metadata-zhzdt6v4/apache_iotdb.egg-info/SOURCES.txt' 2022-12-19T11:24:40,857 adding license file 'LICENSE' 2022-12-19T11:24:40,864 writing manifest file '/tmp/pip-modern-metadata-zhzdt6v4/apache_iotdb.egg-info/SOURCES.txt' 2022-12-19T11:24:40,866 creating '/tmp/pip-modern-metadata-zhzdt6v4/apache_iotdb-0.13.3.dist-info' 2022-12-19T11:24:41,037 /tmp/pip-build-env-9xdghc9a/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'website' 2022-12-19T11:24:41,037 warnings.warn(msg) 2022-12-19T11:24:41,241 Preparing metadata (pyproject.toml): finished with status 'done' 2022-12-19T11:24:41,259 Source in /tmp/pip-wheel-m3c4b5fm/apache-iotdb_57557fc359e8439580408bc1285c4e7e has version 0.13.3, which satisfies requirement apache-iotdb==0.13.3 from https://files.pythonhosted.org/packages/30/a0/0153c56e1af8653bfdcf47423949dd6b23e53882c9009acc25e661a44dbe/apache-iotdb-0.13.3.tar.gz 2022-12-19T11:24:41,261 Removed apache-iotdb==0.13.3 from https://files.pythonhosted.org/packages/30/a0/0153c56e1af8653bfdcf47423949dd6b23e53882c9009acc25e661a44dbe/apache-iotdb-0.13.3.tar.gz from build tracker '/tmp/pip-build-tracker-2949ve9y' 2022-12-19T11:24:41,277 Created temporary directory: /tmp/pip-unpack-anhr06y2 2022-12-19T11:24:41,278 Building wheels for collected packages: apache-iotdb 2022-12-19T11:24:41,288 Created temporary directory: /tmp/pip-wheel-a9cw__q6 2022-12-19T11:24:41,289 Destination directory: /tmp/pip-wheel-a9cw__q6 2022-12-19T11:24:41,294 Building wheel for apache-iotdb (pyproject.toml): started 2022-12-19T11:24:41,296 Running command Building wheel for apache-iotdb (pyproject.toml) 2022-12-19T11:24:42,893 2022-12-19T11:24:42,901 # Apache IoTDB 2022-12-19T11:24:42,902 [![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) 2022-12-19T11:24:42,902 [![Main Win](https://github.com/apache/iotdb/actions/workflows/main-win.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-win.yml) 2022-12-19T11:24:42,902 [![coveralls](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master) 2022-12-19T11:24:42,903 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2022-12-19T11:24:42,903 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2022-12-19T11:24:42,903 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2022-12-19T11:24:42,904 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2022-12-19T11:24:42,904 ![](https://img.shields.io/badge/platform-win10%20%7C%20macox%20%7C%20linux-yellow.svg) 2022-12-19T11:24:42,904 ![](https://img.shields.io/badge/java--language-1.8-blue.svg) 2022-12-19T11:24:42,905 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2022-12-19T11:24:42,906 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2022-12-19T11:24:42,906 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2022-12-19T11:24:42,906 architecture, high performance and rich feature set together with its deep integration with 2022-12-19T11:24:42,907 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2022-12-19T11:24:42,907 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2022-12-19T11:24:42,907 ## Python Native API 2022-12-19T11:24:42,908 ### Requirements 2022-12-19T11:24:42,909 You have to install thrift (>=0.13) before using the package. 2022-12-19T11:24:42,910 ### How to use (Example) 2022-12-19T11:24:42,911 First, download the latest package: `pip3 install apache-iotdb` 2022-12-19T11:24:42,911 *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!* 2022-12-19T11:24:42,912 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) 2022-12-19T11:24:42,912 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2022-12-19T11:24:42,913 (you need to add `import iotdb` in the head of the file) 2022-12-19T11:24:42,914 Or: 2022-12-19T11:24:42,914 ```python 2022-12-19T11:24:42,914 from iotdb.Session import Session 2022-12-19T11:24:42,915 ip = "127.0.0.1" 2022-12-19T11:24:42,915 port_ = "6667" 2022-12-19T11:24:42,916 username_ = "root" 2022-12-19T11:24:42,916 password_ = "root" 2022-12-19T11:24:42,916 session = Session(ip, port_, username_, password_) 2022-12-19T11:24:42,917 session.open(False) 2022-12-19T11:24:42,917 zone = session.get_time_zone() 2022-12-19T11:24:42,917 session.close() 2022-12-19T11:24:42,917 ``` 2022-12-19T11:24:42,918 ### Initialization 2022-12-19T11:24:42,919 * Initialize a Session 2022-12-19T11:24:42,919 ```python 2022-12-19T11:24:42,920 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2022-12-19T11:24:42,920 ``` 2022-12-19T11:24:42,921 * Open a session, with a parameter to specify whether to enable RPC compression 2022-12-19T11:24:42,921 ```python 2022-12-19T11:24:42,921 session.open(enable_rpc_compression=False) 2022-12-19T11:24:42,922 ``` 2022-12-19T11:24:42,922 Notice: this RPC compression status of client must comply with that of IoTDB server 2022-12-19T11:24:42,923 * Close a Session 2022-12-19T11:24:42,924 ```python 2022-12-19T11:24:42,924 session.close() 2022-12-19T11:24:42,924 ``` 2022-12-19T11:24:42,925 ### Data Definition Interface (DDL Interface) 2022-12-19T11:24:42,925 #### Storage Group Management 2022-12-19T11:24:42,926 * Set storage group 2022-12-19T11:24:42,926 ```python 2022-12-19T11:24:42,927 session.set_storage_group(group_name) 2022-12-19T11:24:42,927 ``` 2022-12-19T11:24:42,928 * Delete one or several storage groups 2022-12-19T11:24:42,928 ```python 2022-12-19T11:24:42,929 session.delete_storage_group(group_name) 2022-12-19T11:24:42,929 session.delete_storage_groups(group_name_lst) 2022-12-19T11:24:42,929 ``` 2022-12-19T11:24:42,929 #### Timeseries Management 2022-12-19T11:24:42,930 * Create one or multiple timeseries 2022-12-19T11:24:42,931 ```python 2022-12-19T11:24:42,931 session.create_time_series(ts_path, data_type, encoding, compressor, 2022-12-19T11:24:42,931 props=None, tags=None, attributes=None, alias=None) 2022-12-19T11:24:42,932 session.create_multi_time_series( 2022-12-19T11:24:42,932 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2022-12-19T11:24:42,932 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2022-12-19T11:24:42,933 ) 2022-12-19T11:24:42,933 ``` 2022-12-19T11:24:42,934 * Create aligned timeseries 2022-12-19T11:24:42,934 ```python 2022-12-19T11:24:42,934 session.create_aligned_time_series( 2022-12-19T11:24:42,935 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2022-12-19T11:24:42,935 ) 2022-12-19T11:24:42,935 ``` 2022-12-19T11:24:42,936 Attention: Alias of measurements are **not supported** currently. 2022-12-19T11:24:42,936 * Delete one or several timeseries 2022-12-19T11:24:42,937 ```python 2022-12-19T11:24:42,937 session.delete_time_series(paths_list) 2022-12-19T11:24:42,938 ``` 2022-12-19T11:24:42,938 * Check whether the specific timeseries exists 2022-12-19T11:24:42,939 ```python 2022-12-19T11:24:42,939 session.check_time_series_exists(path) 2022-12-19T11:24:42,940 ``` 2022-12-19T11:24:42,940 ### Data Manipulation Interface (DML Interface) 2022-12-19T11:24:42,941 #### Insert 2022-12-19T11:24:42,942 It is recommended to use insertTablet to help improve write efficiency. 2022-12-19T11:24:42,942 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2022-12-19T11:24:42,942 * **Better Write Performance** 2022-12-19T11:24:42,943 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2022-12-19T11:24:42,944 We have two implementations of Tablet in Python API. 2022-12-19T11:24:42,944 * Normal Tablet 2022-12-19T11:24:42,945 ```python 2022-12-19T11:24:42,945 values_ = [ 2022-12-19T11:24:42,945 [False, 10, 11, 1.1, 10011.1, "test01"], 2022-12-19T11:24:42,946 [True, 100, 11111, 1.25, 101.0, "test02"], 2022-12-19T11:24:42,946 [False, 100, 1, 188.1, 688.25, "test03"], 2022-12-19T11:24:42,946 [True, 0, 0, 0, 6.25, "test04"], 2022-12-19T11:24:42,947 ] 2022-12-19T11:24:42,947 timestamps_ = [1, 2, 3, 4] 2022-12-19T11:24:42,947 tablet_ = Tablet( 2022-12-19T11:24:42,947 device_id, measurements_, data_types_, values_, timestamps_ 2022-12-19T11:24:42,948 ) 2022-12-19T11:24:42,948 session.insert_tablet(tablet_) 2022-12-19T11:24:42,948 ``` 2022-12-19T11:24:42,949 * Numpy Tablet 2022-12-19T11:24:42,949 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2022-12-19T11:24:42,949 With less memory footprint and time cost of serialization, the insert performance will be better. 2022-12-19T11:24:42,950 **Notice** 2022-12-19T11:24:42,950 1. time and value columns in Tablet are ndarray. 2022-12-19T11:24:42,951 2. recommended to use the specific dtypes to each ndarray, see the example below 2022-12-19T11:24:42,951 (if not, the default dtypes are also ok). 2022-12-19T11:24:42,951 ```python 2022-12-19T11:24:42,952 import numpy as np 2022-12-19T11:24:42,952 data_types_ = [ 2022-12-19T11:24:42,952 TSDataType.BOOLEAN, 2022-12-19T11:24:42,953 TSDataType.INT32, 2022-12-19T11:24:42,953 TSDataType.INT64, 2022-12-19T11:24:42,953 TSDataType.FLOAT, 2022-12-19T11:24:42,953 TSDataType.DOUBLE, 2022-12-19T11:24:42,954 TSDataType.TEXT, 2022-12-19T11:24:42,954 ] 2022-12-19T11:24:42,954 np_values_ = [ 2022-12-19T11:24:42,955 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2022-12-19T11:24:42,955 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2022-12-19T11:24:42,955 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2022-12-19T11:24:42,956 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2022-12-19T11:24:42,956 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2022-12-19T11:24:42,956 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2022-12-19T11:24:42,956 ] 2022-12-19T11:24:42,957 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2022-12-19T11:24:42,957 np_tablet_ = NumpyTablet( 2022-12-19T11:24:42,957 "root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_ 2022-12-19T11:24:42,958 ) 2022-12-19T11:24:42,958 session.insert_tablet(np_tablet_) 2022-12-19T11:24:42,958 ``` 2022-12-19T11:24:42,959 * Insert multiple Tablets 2022-12-19T11:24:42,959 ```python 2022-12-19T11:24:42,960 session.insert_tablets(tablet_lst) 2022-12-19T11:24:42,960 ``` 2022-12-19T11:24:42,961 * Insert a Record 2022-12-19T11:24:42,961 ```python 2022-12-19T11:24:42,961 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2022-12-19T11:24:42,962 ``` 2022-12-19T11:24:42,962 * Insert multiple Records 2022-12-19T11:24:42,963 ```python 2022-12-19T11:24:42,963 session.insert_records( 2022-12-19T11:24:42,964 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2022-12-19T11:24:42,964 ) 2022-12-19T11:24:42,964 ``` 2022-12-19T11:24:42,965 * Insert multiple Records that belong to the same device. 2022-12-19T11:24:42,965 With type info the server has no need to do type inference, which leads a better performance 2022-12-19T11:24:42,966 ```python 2022-12-19T11:24:42,966 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2022-12-19T11:24:42,966 ``` 2022-12-19T11:24:42,967 #### Insert with type inference 2022-12-19T11:24:42,968 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. 2022-12-19T11:24:42,968 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2022-12-19T11:24:42,969 ```python 2022-12-19T11:24:42,969 session.insert_str_record(device_id, timestamp, measurements, string_values) 2022-12-19T11:24:42,970 ``` 2022-12-19T11:24:42,970 #### Insert of Aligned Timeseries 2022-12-19T11:24:42,971 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2022-12-19T11:24:42,972 * insert_aligned_record 2022-12-19T11:24:42,972 * insert_aligned_records 2022-12-19T11:24:42,972 * insert_aligned_records_of_one_device 2022-12-19T11:24:42,972 * insert_aligned_tablet 2022-12-19T11:24:42,973 * insert_aligned_tablets 2022-12-19T11:24:42,974 ### IoTDB-SQL Interface 2022-12-19T11:24:42,974 * Execute query statement 2022-12-19T11:24:42,975 ```python 2022-12-19T11:24:42,975 session.execute_query_statement(sql) 2022-12-19T11:24:42,975 ``` 2022-12-19T11:24:42,976 * Execute non query statement 2022-12-19T11:24:42,977 ```python 2022-12-19T11:24:42,977 session.execute_non_query_statement(sql) 2022-12-19T11:24:42,977 ``` 2022-12-19T11:24:42,978 ### Pandas Support 2022-12-19T11:24:42,979 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2022-12-19T11:24:42,979 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2022-12-19T11:24:42,980 Example: 2022-12-19T11:24:42,980 ```python 2022-12-19T11:24:42,981 from iotdb.Session import Session 2022-12-19T11:24:42,981 ip = "127.0.0.1" 2022-12-19T11:24:42,981 port_ = "6667" 2022-12-19T11:24:42,982 username_ = "root" 2022-12-19T11:24:42,982 password_ = "root" 2022-12-19T11:24:42,982 session = Session(ip, port_, username_, password_) 2022-12-19T11:24:42,982 session.open(False) 2022-12-19T11:24:42,983 result = session.execute_query_statement("SELECT * FROM root.*") 2022-12-19T11:24:42,983 # Transform to Pandas Dataset 2022-12-19T11:24:42,984 df = result.todf() 2022-12-19T11:24:42,984 session.close() 2022-12-19T11:24:42,985 # Now you can work with the dataframe 2022-12-19T11:24:42,985 df = ... 2022-12-19T11:24:42,985 ``` 2022-12-19T11:24:42,986 ### IoTDB Testcontainer 2022-12-19T11:24:42,987 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. 2022-12-19T11:24:42,988 To start (and stop) an IoTDB Database in a Docker container simply do: 2022-12-19T11:24:42,988 ```python 2022-12-19T11:24:42,988 class MyTestCase(unittest.TestCase): 2022-12-19T11:24:42,989 def test_something(self): 2022-12-19T11:24:42,989 with IoTDBContainer() as c: 2022-12-19T11:24:42,990 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2022-12-19T11:24:42,990 session.open(False) 2022-12-19T11:24:42,990 result = session.execute_query_statement("SHOW TIMESERIES") 2022-12-19T11:24:42,991 print(result) 2022-12-19T11:24:42,991 session.close() 2022-12-19T11:24:42,991 ``` 2022-12-19T11:24:42,992 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. 2022-12-19T11:24:42,993 ## Developers 2022-12-19T11:24:42,993 ### Introduction 2022-12-19T11:24:42,994 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. 2022-12-19T11:24:42,995 ### Prerequisites 2022-12-19T11:24:42,996 Python3.7 or later is preferred. 2022-12-19T11:24:42,997 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. 2022-12-19T11:24:42,997 ``` 2022-12-19T11:24:42,997 http://thrift.apache.org/docs/install/ 2022-12-19T11:24:42,998 ``` 2022-12-19T11:24:42,998 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2022-12-19T11:24:42,999 ```shell 2022-12-19T11:24:42,999 pip install -r requirements_dev.txt 2022-12-19T11:24:42,999 ``` 2022-12-19T11:24:43,000 ### Compile the thrift library and Debug 2022-12-19T11:24:43,001 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2022-12-19T11:24:43,001 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2022-12-19T11:24:43,002 This folder is ignored from git and should **never be pushed to git!** 2022-12-19T11:24:43,002 **Notice** Do not upload `iotdb/thrift` to the git repo. 2022-12-19T11:24:43,004 ### Session Client & Example 2022-12-19T11:24:43,004 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. 2022-12-19T11:24:43,005 Or, another simple example: 2022-12-19T11:24:43,006 ```python 2022-12-19T11:24:43,006 from iotdb.Session import Session 2022-12-19T11:24:43,006 ip = "127.0.0.1" 2022-12-19T11:24:43,007 port_ = "6667" 2022-12-19T11:24:43,007 username_ = "root" 2022-12-19T11:24:43,007 password_ = "root" 2022-12-19T11:24:43,008 session = Session(ip, port_, username_, password_) 2022-12-19T11:24:43,008 session.open(False) 2022-12-19T11:24:43,008 zone = session.get_time_zone() 2022-12-19T11:24:43,009 session.close() 2022-12-19T11:24:43,009 ``` 2022-12-19T11:24:43,010 ### Tests 2022-12-19T11:24:43,011 Please add your custom tests in `tests` folder. 2022-12-19T11:24:43,011 To run all defined tests just type `pytest .` in the root folder. 2022-12-19T11:24:43,012 **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). 2022-12-19T11:24:43,013 ### Futher Tools 2022-12-19T11:24:43,014 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2022-12-19T11:24:43,014 Both can be run by `black .` or `flake8 .` respectively. 2022-12-19T11:24:43,015 ## Releasing 2022-12-19T11:24:43,016 To do a release just ensure that you have the right set of generated thrift files. 2022-12-19T11:24:43,016 Then run linting and auto-formatting. 2022-12-19T11:24:43,016 Then, ensure that all tests work (via `pytest .`). 2022-12-19T11:24:43,016 Then you are good to go to do a release! 2022-12-19T11:24:43,018 ### Preparing your environment 2022-12-19T11:24:43,018 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2022-12-19T11:24:43,019 ### Doing the Release 2022-12-19T11:24:43,020 There is a convenient script `release.sh` to do all steps for a release. 2022-12-19T11:24:43,020 Namely, these are 2022-12-19T11:24:43,021 * Remove all transient directories from last release (if exists) 2022-12-19T11:24:43,021 * (Re-)generate all generated sources via mvn 2022-12-19T11:24:43,021 * Run Linting (flake8) 2022-12-19T11:24:43,022 * Run Tests via pytest 2022-12-19T11:24:43,022 * Build 2022-12-19T11:24:43,022 * Release to pypi 2022-12-19T11:24:43,113 running bdist_wheel 2022-12-19T11:24:43,186 running build 2022-12-19T11:24:43,187 running build_py 2022-12-19T11:24:43,205 creating build 2022-12-19T11:24:43,205 creating build/lib 2022-12-19T11:24:43,207 creating build/lib/iotdb 2022-12-19T11:24:43,209 copying iotdb/__init__.py -> build/lib/iotdb 2022-12-19T11:24:43,213 copying iotdb/IoTDBContainer.py -> build/lib/iotdb 2022-12-19T11:24:43,216 copying iotdb/Session.py -> build/lib/iotdb 2022-12-19T11:24:43,224 creating build/lib/tests 2022-12-19T11:24:43,225 copying tests/test_tablet.py -> build/lib/tests 2022-12-19T11:24:43,229 copying tests/test_numpy_tablet.py -> build/lib/tests 2022-12-19T11:24:43,233 copying tests/test_dataframe.py -> build/lib/tests 2022-12-19T11:24:43,236 copying tests/test_delete_data.py -> build/lib/tests 2022-12-19T11:24:43,240 copying tests/__init__.py -> build/lib/tests 2022-12-19T11:24:43,243 copying tests/tablet_performance_comparison.py -> build/lib/tests 2022-12-19T11:24:43,247 copying tests/test_todf.py -> build/lib/tests 2022-12-19T11:24:43,252 copying tests/test_session.py -> build/lib/tests 2022-12-19T11:24:43,256 copying tests/test_aligned_timeseries.py -> build/lib/tests 2022-12-19T11:24:43,261 creating build/lib/iotdb/thrift 2022-12-19T11:24:43,263 copying iotdb/thrift/__init__.py -> build/lib/iotdb/thrift 2022-12-19T11:24:43,268 creating build/lib/iotdb/utils 2022-12-19T11:24:43,269 copying iotdb/utils/SessionDataSet.py -> build/lib/iotdb/utils 2022-12-19T11:24:43,274 copying iotdb/utils/IoTDBConstants.py -> build/lib/iotdb/utils 2022-12-19T11:24:43,277 copying iotdb/utils/RowRecord.py -> build/lib/iotdb/utils 2022-12-19T11:24:43,281 copying iotdb/utils/Field.py -> build/lib/iotdb/utils 2022-12-19T11:24:43,285 copying iotdb/utils/__init__.py -> build/lib/iotdb/utils 2022-12-19T11:24:43,288 copying iotdb/utils/Tablet.py -> build/lib/iotdb/utils 2022-12-19T11:24:43,292 copying iotdb/utils/IoTDBRpcDataSet.py -> build/lib/iotdb/utils 2022-12-19T11:24:43,296 copying iotdb/utils/BitMap.py -> build/lib/iotdb/utils 2022-12-19T11:24:43,300 copying iotdb/utils/NumpyTablet.py -> build/lib/iotdb/utils 2022-12-19T11:24:43,305 creating build/lib/iotdb/thrift/rpc 2022-12-19T11:24:43,306 copying iotdb/thrift/rpc/TSIService.py -> build/lib/iotdb/thrift/rpc 2022-12-19T11:24:43,327 copying iotdb/thrift/rpc/__init__.py -> build/lib/iotdb/thrift/rpc 2022-12-19T11:24:43,330 copying iotdb/thrift/rpc/ttypes.py -> build/lib/iotdb/thrift/rpc 2022-12-19T11:24:43,349 copying iotdb/thrift/rpc/constants.py -> build/lib/iotdb/thrift/rpc 2022-12-19T11:24:43,395 installing to build/bdist.linux-armv7l/wheel 2022-12-19T11:24:43,396 running install 2022-12-19T11:24:43,459 running install_lib 2022-12-19T11:24:43,473 creating build/bdist.linux-armv7l 2022-12-19T11:24:43,474 creating build/bdist.linux-armv7l/wheel 2022-12-19T11:24:43,477 creating build/bdist.linux-armv7l/wheel/iotdb 2022-12-19T11:24:43,479 copying build/lib/iotdb/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb 2022-12-19T11:24:43,483 copying build/lib/iotdb/IoTDBContainer.py -> build/bdist.linux-armv7l/wheel/iotdb 2022-12-19T11:24:43,487 creating build/bdist.linux-armv7l/wheel/iotdb/thrift 2022-12-19T11:24:43,490 creating build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-12-19T11:24:43,492 copying build/lib/iotdb/thrift/rpc/TSIService.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-12-19T11:24:43,513 copying build/lib/iotdb/thrift/rpc/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-12-19T11:24:43,516 copying build/lib/iotdb/thrift/rpc/ttypes.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-12-19T11:24:43,533 copying build/lib/iotdb/thrift/rpc/constants.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-12-19T11:24:43,536 copying build/lib/iotdb/thrift/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift 2022-12-19T11:24:43,540 creating build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,542 copying build/lib/iotdb/utils/SessionDataSet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,546 copying build/lib/iotdb/utils/IoTDBConstants.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,549 copying build/lib/iotdb/utils/RowRecord.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,553 copying build/lib/iotdb/utils/Field.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,556 copying build/lib/iotdb/utils/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,560 copying build/lib/iotdb/utils/Tablet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,564 copying build/lib/iotdb/utils/IoTDBRpcDataSet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,569 copying build/lib/iotdb/utils/BitMap.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,572 copying build/lib/iotdb/utils/NumpyTablet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-12-19T11:24:43,576 copying build/lib/iotdb/Session.py -> build/bdist.linux-armv7l/wheel/iotdb 2022-12-19T11:24:43,583 creating build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,584 copying build/lib/tests/test_tablet.py -> build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,589 copying build/lib/tests/test_numpy_tablet.py -> build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,593 copying build/lib/tests/test_dataframe.py -> build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,596 copying build/lib/tests/test_delete_data.py -> build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,600 copying build/lib/tests/__init__.py -> build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,604 copying build/lib/tests/tablet_performance_comparison.py -> build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,608 copying build/lib/tests/test_todf.py -> build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,612 copying build/lib/tests/test_session.py -> build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,617 copying build/lib/tests/test_aligned_timeseries.py -> build/bdist.linux-armv7l/wheel/tests 2022-12-19T11:24:43,621 running install_egg_info 2022-12-19T11:24:43,678 running egg_info 2022-12-19T11:24:43,687 writing apache_iotdb.egg-info/PKG-INFO 2022-12-19T11:24:43,691 writing dependency_links to apache_iotdb.egg-info/dependency_links.txt 2022-12-19T11:24:43,695 writing requirements to apache_iotdb.egg-info/requires.txt 2022-12-19T11:24:43,697 writing top-level names to apache_iotdb.egg-info/top_level.txt 2022-12-19T11:24:43,718 reading manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2022-12-19T11:24:43,723 adding license file 'LICENSE' 2022-12-19T11:24:43,731 writing manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2022-12-19T11:24:43,734 Copying apache_iotdb.egg-info to build/bdist.linux-armv7l/wheel/apache_iotdb-0.13.3-py3.7.egg-info 2022-12-19T11:24:43,755 running install_scripts 2022-12-19T11:24:43,913 creating build/bdist.linux-armv7l/wheel/apache_iotdb-0.13.3.dist-info/WHEEL 2022-12-19T11:24:43,918 creating '/tmp/pip-wheel-a9cw__q6/.tmp-1lp5rvwc/apache_iotdb-0.13.3-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2022-12-19T11:24:43,925 adding 'iotdb/IoTDBContainer.py' 2022-12-19T11:24:43,935 adding 'iotdb/Session.py' 2022-12-19T11:24:43,938 adding 'iotdb/__init__.py' 2022-12-19T11:24:43,942 adding 'iotdb/thrift/__init__.py' 2022-12-19T11:24:43,971 adding 'iotdb/thrift/rpc/TSIService.py' 2022-12-19T11:24:43,981 adding 'iotdb/thrift/rpc/__init__.py' 2022-12-19T11:24:43,983 adding 'iotdb/thrift/rpc/constants.py' 2022-12-19T11:24:44,013 adding 'iotdb/thrift/rpc/ttypes.py' 2022-12-19T11:24:44,023 adding 'iotdb/utils/BitMap.py' 2022-12-19T11:24:44,026 adding 'iotdb/utils/Field.py' 2022-12-19T11:24:44,029 adding 'iotdb/utils/IoTDBConstants.py' 2022-12-19T11:24:44,034 adding 'iotdb/utils/IoTDBRpcDataSet.py' 2022-12-19T11:24:44,037 adding 'iotdb/utils/NumpyTablet.py' 2022-12-19T11:24:44,040 adding 'iotdb/utils/RowRecord.py' 2022-12-19T11:24:44,043 adding 'iotdb/utils/SessionDataSet.py' 2022-12-19T11:24:44,047 adding 'iotdb/utils/Tablet.py' 2022-12-19T11:24:44,049 adding 'iotdb/utils/__init__.py' 2022-12-19T11:24:44,053 adding 'tests/__init__.py' 2022-12-19T11:24:44,057 adding 'tests/tablet_performance_comparison.py' 2022-12-19T11:24:44,061 adding 'tests/test_aligned_timeseries.py' 2022-12-19T11:24:44,064 adding 'tests/test_dataframe.py' 2022-12-19T11:24:44,067 adding 'tests/test_delete_data.py' 2022-12-19T11:24:44,070 adding 'tests/test_numpy_tablet.py' 2022-12-19T11:24:44,074 adding 'tests/test_session.py' 2022-12-19T11:24:44,077 adding 'tests/test_tablet.py' 2022-12-19T11:24:44,081 adding 'tests/test_todf.py' 2022-12-19T11:24:44,086 adding 'apache_iotdb-0.13.3.dist-info/LICENSE' 2022-12-19T11:24:44,091 adding 'apache_iotdb-0.13.3.dist-info/METADATA' 2022-12-19T11:24:44,093 adding 'apache_iotdb-0.13.3.dist-info/WHEEL' 2022-12-19T11:24:44,095 adding 'apache_iotdb-0.13.3.dist-info/top_level.txt' 2022-12-19T11:24:44,097 adding 'apache_iotdb-0.13.3.dist-info/RECORD' 2022-12-19T11:24:44,103 removing build/bdist.linux-armv7l/wheel 2022-12-19T11:24:44,127 /tmp/pip-build-env-9xdghc9a/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'website' 2022-12-19T11:24:44,128 warnings.warn(msg) 2022-12-19T11:24:44,353 Building wheel for apache-iotdb (pyproject.toml): finished with status 'done' 2022-12-19T11:24:44,369 Created wheel for apache-iotdb: filename=apache_iotdb-0.13.3-py3-none-any.whl size=78546 sha256=c3be87cabc4d19ad9fd999f524ac8547b971adb4a304bf8874fdb56a6ecca371 2022-12-19T11:24:44,371 Stored in directory: /tmp/pip-ephem-wheel-cache-i53cn7ro/wheels/21/a4/27/0157ca62008b35e7f6c72ed1c158fdada511424a3bff71eeb5 2022-12-19T11:24:44,403 Successfully built apache-iotdb 2022-12-19T11:24:44,415 Removed build tracker: '/tmp/pip-build-tracker-2949ve9y'