2023-04-04T02:26:03,546 Created temporary directory: /tmp/pip-ephem-wheel-cache-h01xx4w7 2023-04-04T02:26:03,552 Created temporary directory: /tmp/pip-build-tracker-bjwlcw98 2023-04-04T02:26:03,552 Initialized build tracking at /tmp/pip-build-tracker-bjwlcw98 2023-04-04T02:26:03,553 Created build tracker: /tmp/pip-build-tracker-bjwlcw98 2023-04-04T02:26:03,553 Entered build tracker: /tmp/pip-build-tracker-bjwlcw98 2023-04-04T02:26:03,554 Created temporary directory: /tmp/pip-wheel-k5owm84o 2023-04-04T02:26:03,565 DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453 2023-04-04T02:26:03,571 Created temporary directory: /tmp/pip-ephem-wheel-cache-e113_bt4 2023-04-04T02:26:03,623 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-04-04T02:26:03,630 2 location(s) to search for versions of apache-iotdb: 2023-04-04T02:26:03,630 * https://pypi.org/simple/apache-iotdb/ 2023-04-04T02:26:03,630 * https://www.piwheels.org/simple/apache-iotdb/ 2023-04-04T02:26:03,632 Fetching project page and analyzing links: https://pypi.org/simple/apache-iotdb/ 2023-04-04T02:26:03,633 Getting page https://pypi.org/simple/apache-iotdb/ 2023-04-04T02:26:03,636 Found index url https://pypi.org/simple 2023-04-04T02:26:03,897 Fetched page https://pypi.org/simple/apache-iotdb/ as application/vnd.pypi.simple.v1+json 2023-04-04T02:26:03,926 Found link https://files.pythonhosted.org/packages/76/14/d01b6281df00530c69bc8eae2074b9970bbe865a5e971b5cd2019e8b8250/apache-iotdb-0.9.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.9.0 2023-04-04T02:26:03,927 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/84/aa/fa9401ccadb89ddce7c2b8a03baee9dbb9913c52b5936d0ec7968cabf056/apache_iotdb-0.9.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,928 Found link https://files.pythonhosted.org/packages/01/fa/e65db378e4d8e07322ec175f37568bceb55ebb3c8397fa7b48e9f087c451/apache-iotdb-0.9.2.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.9.2 2023-04-04T02:26:03,929 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/43/8d/72fa03325e9281b613a0eabae9cc7c606ce0e8952bee0c3ca855e4579a1d/apache_iotdb-0.9.2-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,930 Found link https://files.pythonhosted.org/packages/34/95/030c2da665358de8ba950099b3b0397dca437fcde60d5d1730d0c451d5e3/apache-iotdb-0.9.3.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.9.3 2023-04-04T02:26:03,931 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/5c/d4/2e329baab32ad93730ba4b79df9b91f1d55d0d37428a5dbbe2dd4c9f3a9d/apache_iotdb-0.9.3-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,932 Found link https://files.pythonhosted.org/packages/1d/dc/138e08717f8c2e0e238f35d39b34af6cfc1c7a1332b6aa4689750f4fda26/apache-iotdb-0.10.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.10.0 2023-04-04T02:26:03,933 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/c3/76/46884f04945b6f02bbec4e06d83fafc16f326ca0f9b35b8c0141018990c0/apache_iotdb-0.10.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,934 Found link https://files.pythonhosted.org/packages/f6/4d/b229b9f309431e8164c9cd893431009a57efcaa059f58c1091d222601da3/apache-iotdb-0.10.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.10.1 2023-04-04T02:26:03,935 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/d6/87/2e003dcf87ffa8e73f48a62a107b989967e906670d905a05ae1c1349f396/apache_iotdb-0.10.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,936 Found link https://files.pythonhosted.org/packages/16/8b/2ec65fa81d5961bd927c02d6a209490bf325b2a164506cd3b12e846d7061/apache-iotdb-0.11.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.0 2023-04-04T02:26:03,937 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/47/c8/047703f7e8125b15361c766b90c6f1cbdbf797f84803f38b1732c1a386cb/apache_iotdb-0.11.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,939 Found link https://files.pythonhosted.org/packages/55/a1/ef100f67e0f26fbc1d19b84115b21de942e7b7e01803706d19f841ac06c1/apache-iotdb-0.11.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.1 2023-04-04T02:26:03,939 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/9f/9f/dce2d782c8b64700539039ef5d66f5f7a781689538c0a176cf56099ec9d1/apache_iotdb-0.11.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,941 Found link https://files.pythonhosted.org/packages/69/d5/f1b9ff293fe02eb1f1cb3cba13b5d9a4b547415ab0045b2a8a3612249e12/apache-iotdb-0.11.2.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.2 2023-04-04T02:26:03,942 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/2b/96/a5f0c63659cc8477c53d8a8321c07ea5a0bb2430abaaab477a6185bb43a1/apache_iotdb-0.11.2-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,943 Found link https://files.pythonhosted.org/packages/7d/cf/0d672a828527f59cdc66c078b0b8e356ca0a3191224a4363ce2256337d1c/apache-iotdb-0.11.3.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.3 2023-04-04T02:26:03,944 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/d2/c7/6709b26341e59788d05a297182aa3f96c692e85421c169f657e92c3b4765/apache_iotdb-0.11.3-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,945 Found link https://files.pythonhosted.org/packages/00/a1/5b1b8a2754f4b25420d9a4461b5e2b8573bb89b43054f9303ea0558df0de/apache-iotdb-0.11.4.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.4 2023-04-04T02:26:03,946 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/48/f4/a21fd4495f93c428de788a477665f1815b257568469c38108666125fff4b/apache_iotdb-0.11.4-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,947 Found link https://files.pythonhosted.org/packages/9e/16/bb2ef45f62e9866f1be97f04e2c581247d3b145e5d8a01b7c143023c6c45/apache-iotdb-0.12.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.0 2023-04-04T02:26:03,948 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/93/32/e051c3ce387e54b1f036995e92ff352895cf01a51b170752e906a7d42364/apache_iotdb-0.12.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,949 Found link https://files.pythonhosted.org/packages/20/0c/b39e9f362fb0a1a43cb0a05a5b2d9163815f0048575e0c071bbaa50070b8/apache-iotdb-0.12.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.1 2023-04-04T02:26:03,950 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/55/cf/219a0c3cd17537cebf6e67deeaa77b57741c9b40bcddbb7f59ac9b828401/apache_iotdb-0.12.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,951 Found link https://files.pythonhosted.org/packages/fd/64/d83ceaaab941dd78df38cd8c35d27028a27724c2535f0e6f01a48472aa28/apache-iotdb-0.12.2.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.2 2023-04-04T02:26:03,952 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/0b/33/60af46cbc25d7ecf9722bf311295cb0acbf2841f6eb3e3af7433ac3e199d/apache_iotdb-0.12.2-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,953 Found link https://files.pythonhosted.org/packages/24/7c/81a9dcfd218d4654b03d9079578659d6201aa4f9e9ccba328c0742e8e9c1/apache-iotdb-0.12.3.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.3 2023-04-04T02:26:03,954 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/9f/ae/e79cef98fa20cf977ea22b065fcff8d7b976922dd281f4a74a02b1a72b41/apache_iotdb-0.12.3-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,955 Found link https://files.pythonhosted.org/packages/9e/11/0d12f9b906b3aac1446c09e297bcdf3a0cdfb016aae1ec77effa214999de/apache-iotdb-0.12.4.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.4 2023-04-04T02:26:03,956 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/2b/cb/34f5d9137086d912e4518d751eca1ac9a8b908706c4b3176ca32911fabd2/apache_iotdb-0.12.4-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,957 Found link https://files.pythonhosted.org/packages/8a/52/93503eac47c1561edc21431f7154b694afad9d461e2af0fea36966953c24/apache-iotdb-0.12.5.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.5 2023-04-04T02:26:03,958 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/7a/30/1cd9bca76c1f4f9b4cd48d11f23103ade9c5a35410bbf0a8f5997bab51b0/apache_iotdb-0.12.5-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,959 Found link https://files.pythonhosted.org/packages/00/d9/19746ff8906cc2ac3c9326fbcbd244d2424f4aad5d7201843956d27dcb0b/apache-iotdb-0.12.6.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.6 2023-04-04T02:26:03,960 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/cf/7b/ab3acb96fd057e900f9aca1b030f4fb42caf4104000ab742ce19a1029b6f/apache_iotdb-0.12.6-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,961 Found link https://files.pythonhosted.org/packages/a6/cd/33de301e51132f8d0d79adc346d38685a6b871251846bad95b35ebf74ac9/apache-iotdb-0.13.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.0 2023-04-04T02:26:03,962 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/71/c1/3684d3b6e6eddda5fbe994e123c6bc6569409994a44b5d3e4b130554802a/apache_iotdb-0.13.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,963 Found link https://files.pythonhosted.org/packages/7e/3e/40f0d900e04598036cc65ae437a2ee9f4aa149860d434a6f4b291460582c/apache-iotdb-0.13.0.post1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.0.post1 2023-04-04T02:26:03,964 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/7c/f2/ef6f589910f1b850ad665d4958e2a26b5249bddc81d5f29a711e21a79dc1/apache_iotdb-0.13.0.post1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,965 Found link https://files.pythonhosted.org/packages/e5/47/3efce218f936953f6ee5e338748981137a5d30579578038a67063b1c10d8/apache-iotdb-0.13.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.1 2023-04-04T02:26:03,966 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/b7/1d/3074d8ab58366c99783fe0ed853472a21d69dfd2b80ca001281d170833e2/apache_iotdb-0.13.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,967 Found link https://files.pythonhosted.org/packages/6f/55/1bcfde81cb204d77387e7cadbf8c3510ec04a2b02fa8b26d04b8f5037bca/apache-iotdb-0.13.2.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.2 2023-04-04T02:26:03,968 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/94/0c/3a7d8a238d7c8771453889f8f03f9ebcd418839306e64f4ddea8c0baee81/apache_iotdb-0.13.2-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,969 Found link https://files.pythonhosted.org/packages/30/a0/0153c56e1af8653bfdcf47423949dd6b23e53882c9009acc25e661a44dbe/apache-iotdb-0.13.3.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.3 2023-04-04T02:26:03,970 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/a0/51/7e8405405f7f0ef8eabab31b4860cb747a8acfa53e30f56939c115b53db9/apache_iotdb-0.13.3-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,971 Found link https://files.pythonhosted.org/packages/42/eb/3d7ac8d794238b75997ff3f55db6e02436bfa558a8df4ea21e58bf8db6fd/apache-iotdb-0.13.5.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.5 2023-04-04T02:26:03,972 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/51/a3/9117edfd3d72a1d338b7cff8060e672dd7b39dfeb2ca0d6c22db51bf9b90/apache_iotdb-0.13.5-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,973 Found link https://files.pythonhosted.org/packages/95/c9/5d7a22003e57fe3c1637928926a73d11815830ee63c62f2cefeaa8eed28f/apache-iotdb-0.13.5.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.5.1 2023-04-04T02:26:03,974 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/89/0a/816b8a85f6be9f8fe3534f79ea12341dad900b59ba0ac126835640a09db0/apache_iotdb-0.13.5.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,975 Found link https://files.pythonhosted.org/packages/bb/7d/24cefdcd57e96d496fd3492fc28b3d53da6ba0fc6ee69f99dddec1cf500c/apache-iotdb-0.14.0rc1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.14.0rc1 2023-04-04T02:26:03,976 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/6d/37/0e5a292ed1a695927cefec20d4ad01d3c7af78e691d5250f1646f318d4ef/apache_iotdb-0.14.0rc1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,977 Found link https://files.pythonhosted.org/packages/49/91/11702001bdc0af0266d5f4dd222b5f937684e8c08e5044735ade6748cd58/apache-iotdb-1.0.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 1.0.0 2023-04-04T02:26:03,978 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/3d/57/3019d5cf51e6198d5b7ee9e3c07a15efa7487e8b280b4b71cc521a6651e3/apache_iotdb-1.0.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,979 Found link https://files.pythonhosted.org/packages/0b/d7/475e11d05f2d4bc65f9b7d14691158489fbb7726a26cee5a016e94e6640a/apache-iotdb-1.0.1.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 1.0.1 2023-04-04T02:26:03,980 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/06/82/b658ff03f52072e1afde6bb9f1f1933427ef776a78e246965943fba552d8/apache_iotdb-1.0.1-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,981 Found link https://files.pythonhosted.org/packages/15/99/bf0d6eae0c005a4dcc88068be36ea3e5b4dcb26e50b6698b4bd814d052e9/apache-iotdb-1.1.0.tar.gz (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 1.1.0 2023-04-04T02:26:03,982 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/3b/cd/72bfb3f3f3684bfe0c054dfd8c34fdb8a85f7572a6ec27b7a6ff99127516/apache_iotdb-1.1.0-py3-none-any.whl (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:03,983 Fetching project page and analyzing links: https://www.piwheels.org/simple/apache-iotdb/ 2023-04-04T02:26:03,983 Getting page https://www.piwheels.org/simple/apache-iotdb/ 2023-04-04T02:26:03,986 Found index url https://www.piwheels.org/simple 2023-04-04T02:26:04,199 Fetched page https://www.piwheels.org/simple/apache-iotdb/ as text/html 2023-04-04T02:26:04,221 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-1.0.1-py3-none-any.whl#sha256=9fc3d243ca97c88bd3ca1f5092686e3ab5c99a6e5206fd6a6c6fdaab15c796b6 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,222 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-1.0.0-py3-none-any.whl#sha256=85d0bb3ddb1c79359fec18e85c6d515dc3639752d77dea32c09c8afe0fefc906 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,223 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.14.0rc1-py3-none-any.whl#sha256=2f71e6b3443c4748717889729380082daa7bd8f9950d4c17909134372367bccc (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,223 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.5.1-py3-none-any.whl#sha256=43316f1302a0f1a08a1842964fb611e34f317e908b76d1872954c09f2c5f5919 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,224 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.5-py3-none-any.whl#sha256=e25dac25664b9ff8313cbb697f634269ef857ec9217d3256b893c43c8b0c151f (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,224 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.3-py3-none-any.whl#sha256=c3be87cabc4d19ad9fd999f524ac8547b971adb4a304bf8874fdb56a6ecca371 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,225 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.2-py3-none-any.whl#sha256=136811be5cdfe045bc349a8f6c0b07117600185c0c7ada8353610179adde27ae (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,225 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.1-py3-none-any.whl#sha256=22668867268f1ea89b8205cbda30d0578aaa5ccfff0b552396e7059a95d3781a (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,226 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.0.post1-py3-none-any.whl#sha256=d53cf02df2cc507d9caf48167c52d69e24abab9800430de3ff8abf8159bff63b (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,226 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.0-py3-none-any.whl#sha256=67b7429e60cdd5e1e3a808592a87a591c028af62de8e2fec2535b4a3105f21b7 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,227 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.6-py3-none-any.whl#sha256=a4f679df0053b74f83de861277de12e030eb8601063b172ec44789118ba11400 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,227 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.5-py3-none-any.whl#sha256=06bb080be5b0469037e68db56a7feb10da911a396a47d598598d8d8c50d07419 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,228 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.4-py3-none-any.whl#sha256=af5fa8000dd449fb6d98420287b2049b5e68d268fa1529fa96955b5fe7637c13 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,228 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.3-py3-none-any.whl#sha256=eb77b047b61a087b286e01afea6ee9761c9e687479a4e551be085d82612ed220 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,229 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.2-py3-none-any.whl#sha256=bb7605db211272947ba451cdad35a2b4f554167361f0c08acedbfb0723ac7ab8 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,229 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.1-py3-none-any.whl#sha256=bc5ddc6b683bf26a0b9a8c47ada13d29918503664e9e1c3fdefae73121f3a327 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,230 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.0-py3-none-any.whl#sha256=061d9407266b9d100113fa2d11890a8d5d56f8b496305c5864f08a9af35fcc12 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,231 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.4-py3-none-any.whl#sha256=cf1ee85db62d31642b32742aba0a026a941b85cf4bb49ec48ef09b9e241f3bf5 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,231 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.3-py3-none-any.whl#sha256=55e9a0042694ba7fa482f733a1d548c0180bccf0e35e090b85d7b9050c95162b (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,232 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.2-py3-none-any.whl#sha256=762d5b0c5f82869237d5375d2a8774f99654c3b693d6f77bf6e9decc78b7fd5d (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,232 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.1-py3-none-any.whl#sha256=317a24e4870d587820f8d5be294e2e9a6ad09f70566ce4380506085c47b2fc0a (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,233 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.0-py3-none-any.whl#sha256=4771e87dd8d933815206c063014beff8eff4c8025353723ac67603f49a119224 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,233 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.10.1-py3-none-any.whl#sha256=b4b13fa0d6ed86fbcc1231cad3d220ee81b38452e87fea655641720f803d4c1d (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,234 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.10.0-py3-none-any.whl#sha256=388ade65f63cb37eef343e4f294cf3488b79894ff8061a7d9b2bf42277ded9de (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,234 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.9.3-py3-none-any.whl#sha256=b535b53a5182dc94116e67edb4a34c1efb007574273e2ff4ad72ebc3b4634326 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,235 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.9.2-py3-none-any.whl#sha256=b7fad95c7f041f18a621439aa3cd19fc79d76caa85a93967163566c10b7c6348 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,235 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.9.0-py3-none-any.whl#sha256=1feb6b731a9af26aac7a1e6fab74e85dd960562a1dca6e4c5c9d10234a570e82 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2023-04-04T02:26:04,236 Skipping link: not a file: https://www.piwheels.org/simple/apache-iotdb/ 2023-04-04T02:26:04,236 Skipping link: not a file: https://pypi.org/simple/apache-iotdb/ 2023-04-04T02:26:04,280 Given no hashes to check 1 links for project 'apache-iotdb': discarding no candidates 2023-04-04T02:26:04,310 Collecting apache-iotdb==1.1.0 2023-04-04T02:26:04,315 Created temporary directory: /tmp/pip-unpack-kp8dpw4l 2023-04-04T02:26:04,549 Downloading apache-iotdb-1.1.0.tar.gz (114 kB) 2023-04-04T02:26:05,068 Added apache-iotdb==1.1.0 from https://files.pythonhosted.org/packages/15/99/bf0d6eae0c005a4dcc88068be36ea3e5b4dcb26e50b6698b4bd814d052e9/apache-iotdb-1.1.0.tar.gz to build tracker '/tmp/pip-build-tracker-bjwlcw98' 2023-04-04T02:26:05,077 Created temporary directory: /tmp/pip-build-env-5ggwxfha 2023-04-04T02:26:05,098 Installing build dependencies: started 2023-04-04T02:26:05,100 Running command pip subprocess to install build dependencies 2023-04-04T02:26:07,925 Using pip 23.0.1 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7) 2023-04-04T02:26:09,401 DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453 2023-04-04T02:26:09,458 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-04-04T02:26:13,669 Collecting setuptools>=40.8.0 2023-04-04T02:26:13,913 Using cached https://www.piwheels.org/simple/setuptools/setuptools-67.6.1-py3-none-any.whl (1.1 MB) 2023-04-04T02:26:14,562 Collecting wheel 2023-04-04T02:26:14,599 Using cached https://www.piwheels.org/simple/wheel/wheel-0.40.0-py3-none-any.whl (64 kB) 2023-04-04T02:26:23,512 Installing collected packages: wheel, setuptools 2023-04-04T02:26:23,969 Creating /tmp/pip-build-env-5ggwxfha/overlay/bin 2023-04-04T02:26:23,974 changing mode of /tmp/pip-build-env-5ggwxfha/overlay/bin/wheel to 755 2023-04-04T02:26:28,336 Successfully installed setuptools-67.6.1 wheel-0.40.0 2023-04-04T02:26:29,333 Installing build dependencies: finished with status 'done' 2023-04-04T02:26:29,345 Getting requirements to build wheel: started 2023-04-04T02:26:29,347 Running command Getting requirements to build wheel 2023-04-04T02:26:30,520 2023-04-04T02:26:30,528 # Apache IoTDB 2023-04-04T02:26:30,529 [![Python Client](https://github.com/apache/iotdb/actions/workflows/client-python.yml/badge.svg?branch=master)](https://github.com/apache/iotdb/actions/workflows/client-python.yml) 2023-04-04T02:26:30,529 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2023-04-04T02:26:30,530 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2023-04-04T02:26:30,530 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2023-04-04T02:26:30,530 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2023-04-04T02:26:30,531 ![](https://img.shields.io/badge/platform-win%20%7C%20macos%20%7C%20linux-yellow.svg) 2023-04-04T02:26:30,531 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2023-04-04T02:26:30,532 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2023-04-04T02:26:30,532 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2023-04-04T02:26:30,533 architecture, high performance and rich feature set together with its deep integration with 2023-04-04T02:26:30,533 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2023-04-04T02:26:30,533 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2023-04-04T02:26:30,534 ## Python Native API 2023-04-04T02:26:30,535 ### Requirements 2023-04-04T02:26:30,535 You have to install thrift (>=0.13) before using the package. 2023-04-04T02:26:30,537 ### How to use (Example) 2023-04-04T02:26:30,537 First, download the latest package: `pip3 install apache-iotdb` 2023-04-04T02:26:30,538 *Notice: If you are installing Python API v0.13.0, DO NOT install by `pip install apache-iotdb==0.13.0`, use `pip install apache-iotdb==0.13.0.post1` instead!* 2023-04-04T02:26:30,539 You can get an example of using the package to read and write data at here: [Example](https://github.com/apache/iotdb/blob/master/client-py/SessionExample.py) 2023-04-04T02:26:30,539 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2023-04-04T02:26:30,540 (you need to add `import iotdb` in the head of the file) 2023-04-04T02:26:30,541 Or: 2023-04-04T02:26:30,541 ```python 2023-04-04T02:26:30,542 from iotdb.Session import Session 2023-04-04T02:26:30,542 ip = "127.0.0.1" 2023-04-04T02:26:30,543 port_ = "6667" 2023-04-04T02:26:30,543 username_ = "root" 2023-04-04T02:26:30,543 password_ = "root" 2023-04-04T02:26:30,544 session = Session(ip, port_, username_, password_) 2023-04-04T02:26:30,544 session.open(False) 2023-04-04T02:26:30,544 zone = session.get_time_zone() 2023-04-04T02:26:30,545 session.close() 2023-04-04T02:26:30,545 ``` 2023-04-04T02:26:30,546 ### Initialization 2023-04-04T02:26:30,546 * Initialize a Session 2023-04-04T02:26:30,547 ```python 2023-04-04T02:26:30,547 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2023-04-04T02:26:30,548 ``` 2023-04-04T02:26:30,548 * Open a session, with a parameter to specify whether to enable RPC compression 2023-04-04T02:26:30,549 ```python 2023-04-04T02:26:30,549 session.open(enable_rpc_compression=False) 2023-04-04T02:26:30,550 ``` 2023-04-04T02:26:30,550 Notice: this RPC compression status of client must comply with that of IoTDB server 2023-04-04T02:26:30,551 * Close a Session 2023-04-04T02:26:30,552 ```python 2023-04-04T02:26:30,552 session.close() 2023-04-04T02:26:30,552 ``` 2023-04-04T02:26:30,553 ### Data Definition Interface (DDL Interface) 2023-04-04T02:26:30,554 #### DATABASE Management 2023-04-04T02:26:30,554 * CREATE DATABASE 2023-04-04T02:26:30,555 ```python 2023-04-04T02:26:30,555 session.set_storage_group(group_name) 2023-04-04T02:26:30,555 ``` 2023-04-04T02:26:30,556 * Delete one or several databases 2023-04-04T02:26:30,557 ```python 2023-04-04T02:26:30,557 session.delete_storage_group(group_name) 2023-04-04T02:26:30,557 session.delete_storage_groups(group_name_lst) 2023-04-04T02:26:30,558 ``` 2023-04-04T02:26:30,558 #### Timeseries Management 2023-04-04T02:26:30,559 * Create one or multiple timeseries 2023-04-04T02:26:30,559 ```python 2023-04-04T02:26:30,560 session.create_time_series(ts_path, data_type, encoding, compressor, 2023-04-04T02:26:30,560 props=None, tags=None, attributes=None, alias=None) 2023-04-04T02:26:30,561 session.create_multi_time_series( 2023-04-04T02:26:30,561 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2023-04-04T02:26:30,561 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2023-04-04T02:26:30,562 ) 2023-04-04T02:26:30,562 ``` 2023-04-04T02:26:30,563 * Create aligned timeseries 2023-04-04T02:26:30,563 ```python 2023-04-04T02:26:30,563 session.create_aligned_time_series( 2023-04-04T02:26:30,564 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2023-04-04T02:26:30,564 ) 2023-04-04T02:26:30,564 ``` 2023-04-04T02:26:30,565 Attention: Alias of measurements are **not supported** currently. 2023-04-04T02:26:30,566 * Delete one or several timeseries 2023-04-04T02:26:30,566 ```python 2023-04-04T02:26:30,566 session.delete_time_series(paths_list) 2023-04-04T02:26:30,567 ``` 2023-04-04T02:26:30,567 * Check whether the specific timeseries exists 2023-04-04T02:26:30,568 ```python 2023-04-04T02:26:30,568 session.check_time_series_exists(path) 2023-04-04T02:26:30,569 ``` 2023-04-04T02:26:30,569 ### Data Manipulation Interface (DML Interface) 2023-04-04T02:26:30,570 #### Insert 2023-04-04T02:26:30,571 It is recommended to use insertTablet to help improve write efficiency. 2023-04-04T02:26:30,571 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2023-04-04T02:26:30,572 * **Better Write Performance** 2023-04-04T02:26:30,572 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2023-04-04T02:26:30,573 We have two implementations of Tablet in Python API. 2023-04-04T02:26:30,574 * Normal Tablet 2023-04-04T02:26:30,574 ```python 2023-04-04T02:26:30,574 values_ = [ 2023-04-04T02:26:30,575 [False, 10, 11, 1.1, 10011.1, "test01"], 2023-04-04T02:26:30,575 [True, 100, 11111, 1.25, 101.0, "test02"], 2023-04-04T02:26:30,575 [False, 100, 1, 188.1, 688.25, "test03"], 2023-04-04T02:26:30,576 [True, 0, 0, 0, 6.25, "test04"], 2023-04-04T02:26:30,576 ] 2023-04-04T02:26:30,576 timestamps_ = [1, 2, 3, 4] 2023-04-04T02:26:30,577 tablet_ = Tablet( 2023-04-04T02:26:30,577 device_id, measurements_, data_types_, values_, timestamps_ 2023-04-04T02:26:30,577 ) 2023-04-04T02:26:30,578 session.insert_tablet(tablet_) 2023-04-04T02:26:30,578 values_ = [ 2023-04-04T02:26:30,579 [None, 10, 11, 1.1, 10011.1, "test01"], 2023-04-04T02:26:30,579 [True, None, 11111, 1.25, 101.0, "test02"], 2023-04-04T02:26:30,579 [False, 100, None, 188.1, 688.25, "test03"], 2023-04-04T02:26:30,580 [True, 0, 0, 0, None, None], 2023-04-04T02:26:30,580 ] 2023-04-04T02:26:30,580 timestamps_ = [16, 17, 18, 19] 2023-04-04T02:26:30,580 tablet_ = Tablet( 2023-04-04T02:26:30,581 device_id, measurements_, data_types_, values_, timestamps_ 2023-04-04T02:26:30,581 ) 2023-04-04T02:26:30,581 session.insert_tablet(tablet_) 2023-04-04T02:26:30,582 ``` 2023-04-04T02:26:30,582 * Numpy Tablet 2023-04-04T02:26:30,583 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2023-04-04T02:26:30,583 With less memory footprint and time cost of serialization, the insert performance will be better. 2023-04-04T02:26:30,583 **Notice** 2023-04-04T02:26:30,584 1. time and value columns in Tablet are ndarray. 2023-04-04T02:26:30,584 2. recommended to use the specific dtypes to each ndarray, see the example below 2023-04-04T02:26:30,584 (if not, the default dtypes are also ok). 2023-04-04T02:26:30,585 ```python 2023-04-04T02:26:30,585 import numpy as np 2023-04-04T02:26:30,586 data_types_ = [ 2023-04-04T02:26:30,586 TSDataType.BOOLEAN, 2023-04-04T02:26:30,586 TSDataType.INT32, 2023-04-04T02:26:30,587 TSDataType.INT64, 2023-04-04T02:26:30,587 TSDataType.FLOAT, 2023-04-04T02:26:30,587 TSDataType.DOUBLE, 2023-04-04T02:26:30,588 TSDataType.TEXT, 2023-04-04T02:26:30,588 ] 2023-04-04T02:26:30,588 np_values_ = [ 2023-04-04T02:26:30,589 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2023-04-04T02:26:30,589 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2023-04-04T02:26:30,589 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2023-04-04T02:26:30,590 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2023-04-04T02:26:30,590 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2023-04-04T02:26:30,590 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2023-04-04T02:26:30,591 ] 2023-04-04T02:26:30,591 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2023-04-04T02:26:30,591 np_tablet_ = NumpyTablet( 2023-04-04T02:26:30,592 device_id, measurements_, data_types_, np_values_, np_timestamps_ 2023-04-04T02:26:30,592 ) 2023-04-04T02:26:30,592 session.insert_tablet(np_tablet_) 2023-04-04T02:26:30,593 # insert one numpy tablet with none into the database. 2023-04-04T02:26:30,593 np_values_ = [ 2023-04-04T02:26:30,593 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2023-04-04T02:26:30,594 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2023-04-04T02:26:30,594 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2023-04-04T02:26:30,594 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2023-04-04T02:26:30,595 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2023-04-04T02:26:30,595 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2023-04-04T02:26:30,595 ] 2023-04-04T02:26:30,596 np_timestamps_ = np.array([98, 99, 100, 101], TSDataType.INT64.np_dtype()) 2023-04-04T02:26:30,596 np_bitmaps_ = [] 2023-04-04T02:26:30,596 for i in range(len(measurements_)): 2023-04-04T02:26:30,597 np_bitmaps_.append(BitMap(len(np_timestamps_))) 2023-04-04T02:26:30,597 np_bitmaps_[0].mark(0) 2023-04-04T02:26:30,597 np_bitmaps_[1].mark(1) 2023-04-04T02:26:30,598 np_bitmaps_[2].mark(2) 2023-04-04T02:26:30,598 np_bitmaps_[4].mark(3) 2023-04-04T02:26:30,598 np_bitmaps_[5].mark(3) 2023-04-04T02:26:30,599 np_tablet_with_none = NumpyTablet( 2023-04-04T02:26:30,599 device_id, measurements_, data_types_, np_values_, np_timestamps_, np_bitmaps_ 2023-04-04T02:26:30,599 ) 2023-04-04T02:26:30,600 session.insert_tablet(np_tablet_with_none) 2023-04-04T02:26:30,600 ``` 2023-04-04T02:26:30,600 * Insert multiple Tablets 2023-04-04T02:26:30,601 ```python 2023-04-04T02:26:30,601 session.insert_tablets(tablet_lst) 2023-04-04T02:26:30,602 ``` 2023-04-04T02:26:30,602 * Insert a Record 2023-04-04T02:26:30,603 ```python 2023-04-04T02:26:30,603 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2023-04-04T02:26:30,603 ``` 2023-04-04T02:26:30,604 * Insert multiple Records 2023-04-04T02:26:30,605 ```python 2023-04-04T02:26:30,605 session.insert_records( 2023-04-04T02:26:30,605 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2023-04-04T02:26:30,606 ) 2023-04-04T02:26:30,606 ``` 2023-04-04T02:26:30,607 * Insert multiple Records that belong to the same device. 2023-04-04T02:26:30,607 With type info the server has no need to do type inference, which leads a better performance 2023-04-04T02:26:30,608 ```python 2023-04-04T02:26:30,608 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2023-04-04T02:26:30,609 ``` 2023-04-04T02:26:30,609 #### Insert with type inference 2023-04-04T02:26:30,610 When the data is of String type, we can use the following interface to perform type inference based on the value of the value itself. For example, if value is "true" , it can be automatically inferred to be a boolean type. If value is "3.2" , it can be automatically inferred as a flout type. Without type information, server has to do type inference, which may cost some time. 2023-04-04T02:26:30,611 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2023-04-04T02:26:30,611 ```python 2023-04-04T02:26:30,612 session.insert_str_record(device_id, timestamp, measurements, string_values) 2023-04-04T02:26:30,612 ``` 2023-04-04T02:26:30,613 #### Insert of Aligned Timeseries 2023-04-04T02:26:30,613 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2023-04-04T02:26:30,614 * insert_aligned_record 2023-04-04T02:26:30,614 * insert_aligned_records 2023-04-04T02:26:30,614 * insert_aligned_records_of_one_device 2023-04-04T02:26:30,615 * insert_aligned_tablet 2023-04-04T02:26:30,615 * insert_aligned_tablets 2023-04-04T02:26:30,616 ### IoTDB-SQL Interface 2023-04-04T02:26:30,616 * Execute query statement 2023-04-04T02:26:30,617 ```python 2023-04-04T02:26:30,617 session.execute_query_statement(sql) 2023-04-04T02:26:30,618 ``` 2023-04-04T02:26:30,618 * Execute non query statement 2023-04-04T02:26:30,619 ```python 2023-04-04T02:26:30,619 session.execute_non_query_statement(sql) 2023-04-04T02:26:30,620 ``` 2023-04-04T02:26:30,620 * Execute statement 2023-04-04T02:26:30,621 ```python 2023-04-04T02:26:30,621 session.execute_statement(sql) 2023-04-04T02:26:30,622 ``` 2023-04-04T02:26:30,622 ### Schema Template 2023-04-04T02:26:30,622 #### Create Schema Template 2023-04-04T02:26:30,623 The step for creating a metadata template is as follows 2023-04-04T02:26:30,623 1. Create the template class 2023-04-04T02:26:30,623 2. Adding child Node,InternalNode and MeasurementNode can be chose 2023-04-04T02:26:30,624 3. Execute create schema template function 2023-04-04T02:26:30,624 ```python 2023-04-04T02:26:30,625 template = Template(name=template_name, share_time=True) 2023-04-04T02:26:30,625 i_node_gps = InternalNode(name="GPS", share_time=False) 2023-04-04T02:26:30,626 i_node_v = InternalNode(name="vehicle", share_time=True) 2023-04-04T02:26:30,626 m_node_x = MeasurementNode("x", TSDataType.FLOAT, TSEncoding.RLE, Compressor.SNAPPY) 2023-04-04T02:26:30,627 i_node_gps.add_child(m_node_x) 2023-04-04T02:26:30,627 i_node_v.add_child(m_node_x) 2023-04-04T02:26:30,628 template.add_template(i_node_gps) 2023-04-04T02:26:30,629 template.add_template(i_node_v) 2023-04-04T02:26:30,629 template.add_template(m_node_x) 2023-04-04T02:26:30,630 session.create_schema_template(template) 2023-04-04T02:26:30,630 ``` 2023-04-04T02:26:30,630 #### Modify Schema Template nodes 2023-04-04T02:26:30,631 Modify nodes in a template, the template must be already created. These are functions that add or delete some measurement nodes. 2023-04-04T02:26:30,631 * add node in template 2023-04-04T02:26:30,631 ```python 2023-04-04T02:26:30,631 session.add_measurements_in_template(template_name, measurements_path, data_types, encodings, compressors, is_aligned) 2023-04-04T02:26:30,632 ``` 2023-04-04T02:26:30,632 * delete node in template 2023-04-04T02:26:30,633 ```python 2023-04-04T02:26:30,633 session.delete_node_in_template(template_name, path) 2023-04-04T02:26:30,633 ``` 2023-04-04T02:26:30,634 #### Set Schema Template 2023-04-04T02:26:30,634 ```python 2023-04-04T02:26:30,634 session.set_schema_template(template_name, prefix_path) 2023-04-04T02:26:30,635 ``` 2023-04-04T02:26:30,635 #### Uset Schema Template 2023-04-04T02:26:30,636 ```python 2023-04-04T02:26:30,636 session.unset_schema_template(template_name, prefix_path) 2023-04-04T02:26:30,636 ``` 2023-04-04T02:26:30,637 #### Show Schema Template 2023-04-04T02:26:30,637 * Show all schema templates 2023-04-04T02:26:30,637 ```python 2023-04-04T02:26:30,638 session.show_all_templates() 2023-04-04T02:26:30,638 ``` 2023-04-04T02:26:30,638 * Count all nodes in templates 2023-04-04T02:26:30,639 ```python 2023-04-04T02:26:30,639 session.count_measurements_in_template(template_name) 2023-04-04T02:26:30,639 ``` 2023-04-04T02:26:30,640 * Judge whether the path is measurement or not in templates, This measurement must be in the template 2023-04-04T02:26:30,640 ```python 2023-04-04T02:26:30,640 session.count_measurements_in_template(template_name, path) 2023-04-04T02:26:30,641 ``` 2023-04-04T02:26:30,641 * Judge whether the path is exist or not in templates, This path may not belong to the template 2023-04-04T02:26:30,642 ```python 2023-04-04T02:26:30,642 session.is_path_exist_in_template(template_name, path) 2023-04-04T02:26:30,642 ``` 2023-04-04T02:26:30,643 * Show nodes under in schema template 2023-04-04T02:26:30,643 ```python 2023-04-04T02:26:30,643 session.show_measurements_in_template(template_name) 2023-04-04T02:26:30,644 ``` 2023-04-04T02:26:30,644 * Show the path prefix where a schema template is set 2023-04-04T02:26:30,644 ```python 2023-04-04T02:26:30,645 session.show_paths_template_set_on(template_name) 2023-04-04T02:26:30,645 ``` 2023-04-04T02:26:30,646 * Show the path prefix where a schema template is used (i.e. the time series has been created) 2023-04-04T02:26:30,646 ```python 2023-04-04T02:26:30,646 session.show_paths_template_using_on(template_name) 2023-04-04T02:26:30,647 ``` 2023-04-04T02:26:30,647 #### Drop Schema Template 2023-04-04T02:26:30,647 Delete an existing metadata template,dropping an already set template is not supported 2023-04-04T02:26:30,648 ```python 2023-04-04T02:26:30,648 session.drop_schema_template("template_python") 2023-04-04T02:26:30,649 ``` 2023-04-04T02:26:30,649 ### Pandas Support 2023-04-04T02:26:30,650 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2023-04-04T02:26:30,650 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2023-04-04T02:26:30,651 Example: 2023-04-04T02:26:30,651 ```python 2023-04-04T02:26:30,652 from iotdb.Session import Session 2023-04-04T02:26:30,652 ip = "127.0.0.1" 2023-04-04T02:26:30,653 port_ = "6667" 2023-04-04T02:26:30,653 username_ = "root" 2023-04-04T02:26:30,653 password_ = "root" 2023-04-04T02:26:30,654 session = Session(ip, port_, username_, password_) 2023-04-04T02:26:30,654 session.open(False) 2023-04-04T02:26:30,654 result = session.execute_query_statement("SELECT * FROM root.*") 2023-04-04T02:26:30,655 # Transform to Pandas Dataset 2023-04-04T02:26:30,655 df = result.todf() 2023-04-04T02:26:30,656 session.close() 2023-04-04T02:26:30,656 # Now you can work with the dataframe 2023-04-04T02:26:30,657 df = ... 2023-04-04T02:26:30,657 ``` 2023-04-04T02:26:30,658 ### IoTDB Testcontainer 2023-04-04T02:26:30,659 The Test Support is based on the lib `testcontainers` (https://testcontainers-python.readthedocs.io/en/latest/index.html) which you need to install in your project if you want to use the feature. 2023-04-04T02:26:30,659 To start (and stop) an IoTDB Database in a Docker container simply do: 2023-04-04T02:26:30,660 ```python 2023-04-04T02:26:30,660 class MyTestCase(unittest.TestCase): 2023-04-04T02:26:30,660 def test_something(self): 2023-04-04T02:26:30,661 with IoTDBContainer() as c: 2023-04-04T02:26:30,661 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2023-04-04T02:26:30,661 session.open(False) 2023-04-04T02:26:30,662 result = session.execute_query_statement("SHOW TIMESERIES") 2023-04-04T02:26:30,662 print(result) 2023-04-04T02:26:30,662 session.close() 2023-04-04T02:26:30,663 ``` 2023-04-04T02:26:30,663 by default it will load the image `apache/iotdb:latest`, if you want a specific version just pass it like e.g. `IoTDBContainer("apache/iotdb:0.12.0")` to get version `0.12.0` running. 2023-04-04T02:26:30,664 ### IoTDB DBAPI 2023-04-04T02:26:30,665 IoTDB DBAPI implements the Python DB API 2.0 specification (https://peps.python.org/pep-0249/), which defines a common 2023-04-04T02:26:30,665 interface for accessing databases in Python. 2023-04-04T02:26:30,666 #### Examples 2023-04-04T02:26:30,666 + Initialization 2023-04-04T02:26:30,667 The initialized parameters are consistent with the session part (except for the sqlalchemy_mode). 2023-04-04T02:26:30,667 ```python 2023-04-04T02:26:30,667 from iotdb.dbapi import connect 2023-04-04T02:26:30,668 ip = "127.0.0.1" 2023-04-04T02:26:30,668 port_ = "6667" 2023-04-04T02:26:30,668 username_ = "root" 2023-04-04T02:26:30,669 password_ = "root" 2023-04-04T02:26:30,669 conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="UTC+8",sqlalchemy_mode=False) 2023-04-04T02:26:30,669 cursor = conn.cursor() 2023-04-04T02:26:30,670 ``` 2023-04-04T02:26:30,670 + simple SQL statement execution 2023-04-04T02:26:30,670 ```python 2023-04-04T02:26:30,671 cursor.execute("SELECT * FROM root.*") 2023-04-04T02:26:30,671 for row in cursor.fetchall(): 2023-04-04T02:26:30,671 print(row) 2023-04-04T02:26:30,672 ``` 2023-04-04T02:26:30,672 + execute SQL with parameter 2023-04-04T02:26:30,673 IoTDB DBAPI supports pyformat style parameters 2023-04-04T02:26:30,673 ```python 2023-04-04T02:26:30,674 cursor.execute("SELECT * FROM root.* WHERE time < %(time)s",{"time":"2017-11-01T00:08:00.000"}) 2023-04-04T02:26:30,674 for row in cursor.fetchall(): 2023-04-04T02:26:30,674 print(row) 2023-04-04T02:26:30,675 ``` 2023-04-04T02:26:30,675 + execute SQL with parameter sequences 2023-04-04T02:26:30,676 ```python 2023-04-04T02:26:30,676 seq_of_parameters = [ 2023-04-04T02:26:30,676 {"timestamp": 1, "temperature": 1}, 2023-04-04T02:26:30,677 {"timestamp": 2, "temperature": 2}, 2023-04-04T02:26:30,677 {"timestamp": 3, "temperature": 3}, 2023-04-04T02:26:30,677 {"timestamp": 4, "temperature": 4}, 2023-04-04T02:26:30,677 {"timestamp": 5, "temperature": 5}, 2023-04-04T02:26:30,678 ] 2023-04-04T02:26:30,678 sql = "insert into root.cursor(timestamp,temperature) values(%(timestamp)s,%(temperature)s)" 2023-04-04T02:26:30,678 cursor.executemany(sql,seq_of_parameters) 2023-04-04T02:26:30,679 ``` 2023-04-04T02:26:30,679 + close the connection and cursor 2023-04-04T02:26:30,680 ```python 2023-04-04T02:26:30,680 cursor.close() 2023-04-04T02:26:30,680 conn.close() 2023-04-04T02:26:30,681 ``` 2023-04-04T02:26:30,681 ### IoTDB SQLAlchemy Dialect (Experimental) 2023-04-04T02:26:30,682 The SQLAlchemy dialect of IoTDB is written to adapt to Apache Superset. 2023-04-04T02:26:30,682 This part is still being improved. 2023-04-04T02:26:30,682 Please do not use it in the production environment! 2023-04-04T02:26:30,683 #### Mapping of the metadata 2023-04-04T02:26:30,683 The data model used by SQLAlchemy is a relational data model, which describes the relationships between different entities through tables. 2023-04-04T02:26:30,683 While the data model of IoTDB is a hierarchical data model, which organizes the data through a tree structure. 2023-04-04T02:26:30,684 In order to adapt IoTDB to the dialect of SQLAlchemy, the original data model in IoTDB needs to be reorganized. 2023-04-04T02:26:30,684 Converting the data model of IoTDB into the data model of SQLAlchemy. 2023-04-04T02:26:30,685 The metadata in the IoTDB are: 2023-04-04T02:26:30,685 1. Database 2023-04-04T02:26:30,685 2. Path 2023-04-04T02:26:30,686 3. Entity 2023-04-04T02:26:30,686 4. Measurement 2023-04-04T02:26:30,687 The metadata in the SQLAlchemy are: 2023-04-04T02:26:30,687 1. Schema 2023-04-04T02:26:30,687 2. Table 2023-04-04T02:26:30,688 3. Column 2023-04-04T02:26:30,688 The mapping relationship between them is: 2023-04-04T02:26:30,689 | The metadata in the SQLAlchemy | The metadata in the IoTDB | 2023-04-04T02:26:30,689 | -------------------- | ---------------------------------------------- | 2023-04-04T02:26:30,689 | Schema | Database | 2023-04-04T02:26:30,690 | Table | Path ( from database to entity ) + Entity | 2023-04-04T02:26:30,690 | Column | Measurement | 2023-04-04T02:26:30,691 The following figure shows the relationship between the two more intuitively: 2023-04-04T02:26:30,691 ![sqlalchemy-to-iotdb](https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/API/IoTDB-SQLAlchemy/sqlalchemy-to-iotdb.png?raw=true) 2023-04-04T02:26:30,692 #### Data type mapping 2023-04-04T02:26:30,692 | data type in IoTDB | data type in SQLAlchemy | 2023-04-04T02:26:30,692 |--------------------|-------------------------| 2023-04-04T02:26:30,693 | BOOLEAN | Boolean | 2023-04-04T02:26:30,693 | INT32 | Integer | 2023-04-04T02:26:30,693 | INT64 | BigInteger | 2023-04-04T02:26:30,694 | FLOAT | Float | 2023-04-04T02:26:30,694 | DOUBLE | Float | 2023-04-04T02:26:30,694 | TEXT | Text | 2023-04-04T02:26:30,694 | LONG | BigInteger | 2023-04-04T02:26:30,695 #### Example 2023-04-04T02:26:30,695 + execute statement 2023-04-04T02:26:30,696 ```python 2023-04-04T02:26:30,696 from sqlalchemy import create_engine 2023-04-04T02:26:30,697 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2023-04-04T02:26:30,697 connect = engine.connect() 2023-04-04T02:26:30,697 result = connect.execute("SELECT ** FROM root") 2023-04-04T02:26:30,698 for row in result.fetchall(): 2023-04-04T02:26:30,698 print(row) 2023-04-04T02:26:30,698 ``` 2023-04-04T02:26:30,699 + ORM (now only simple queries are supported) 2023-04-04T02:26:30,700 ```python 2023-04-04T02:26:30,700 from sqlalchemy import create_engine, Column, Float, BigInteger, MetaData 2023-04-04T02:26:30,700 from sqlalchemy.ext.declarative import declarative_base 2023-04-04T02:26:30,701 from sqlalchemy.orm import sessionmaker 2023-04-04T02:26:30,701 metadata = MetaData( 2023-04-04T02:26:30,702 schema='root.factory' 2023-04-04T02:26:30,702 ) 2023-04-04T02:26:30,702 Base = declarative_base(metadata=metadata) 2023-04-04T02:26:30,703 class Device(Base): 2023-04-04T02:26:30,703 __tablename__ = "room2.device1" 2023-04-04T02:26:30,704 Time = Column(BigInteger, primary_key=True) 2023-04-04T02:26:30,704 temperature = Column(Float) 2023-04-04T02:26:30,704 status = Column(Float) 2023-04-04T02:26:30,705 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2023-04-04T02:26:30,706 DbSession = sessionmaker(bind=engine) 2023-04-04T02:26:30,706 session = DbSession() 2023-04-04T02:26:30,707 res = session.query(Device.status).filter(Device.temperature > 1) 2023-04-04T02:26:30,707 for row in res: 2023-04-04T02:26:30,708 print(row) 2023-04-04T02:26:30,708 ``` 2023-04-04T02:26:30,709 ## Developers 2023-04-04T02:26:30,710 ### Introduction 2023-04-04T02:26:30,710 This is an example of how to connect to IoTDB with python, using the thrift rpc interfaces. Things are almost the same on Windows or Linux, but pay attention to the difference like path separator. 2023-04-04T02:26:30,711 ### Prerequisites 2023-04-04T02:26:30,712 Python3.7 or later is preferred. 2023-04-04T02:26:30,713 You have to install Thrift (0.11.0 or later) to compile our thrift file into python code. Below is the official tutorial of installation, eventually, you should have a thrift executable. 2023-04-04T02:26:30,713 ``` 2023-04-04T02:26:30,714 http://thrift.apache.org/docs/install/ 2023-04-04T02:26:30,714 ``` 2023-04-04T02:26:30,715 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2023-04-04T02:26:30,715 ```shell 2023-04-04T02:26:30,715 pip install -r requirements_dev.txt 2023-04-04T02:26:30,716 ``` 2023-04-04T02:26:30,717 ### Compile the thrift library and Debug 2023-04-04T02:26:30,718 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2023-04-04T02:26:30,718 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2023-04-04T02:26:30,718 This folder is ignored from git and should **never be pushed to git!** 2023-04-04T02:26:30,719 **Notice** Do not upload `iotdb/thrift` to the git repo. 2023-04-04T02:26:30,720 ### Session Client & Example 2023-04-04T02:26:30,721 We packed up the Thrift interface in `client-py/src/iotdb/Session.py` (similar with its Java counterpart), also provided an example file `client-py/src/SessionExample.py` of how to use the session module. please read it carefully. 2023-04-04T02:26:30,722 Or, another simple example: 2023-04-04T02:26:30,723 ```python 2023-04-04T02:26:30,723 from iotdb.Session import Session 2023-04-04T02:26:30,724 ip = "127.0.0.1" 2023-04-04T02:26:30,724 port_ = "6667" 2023-04-04T02:26:30,724 username_ = "root" 2023-04-04T02:26:30,725 password_ = "root" 2023-04-04T02:26:30,725 session = Session(ip, port_, username_, password_) 2023-04-04T02:26:30,725 session.open(False) 2023-04-04T02:26:30,725 zone = session.get_time_zone() 2023-04-04T02:26:30,726 session.close() 2023-04-04T02:26:30,726 ``` 2023-04-04T02:26:30,727 ### Tests 2023-04-04T02:26:30,728 Please add your custom tests in `tests` folder. 2023-04-04T02:26:30,729 To run all defined tests just type `pytest .` in the root folder. 2023-04-04T02:26:30,729 **Notice** Some tests need docker to be started on your system as a test instance is started in a docker container using [testcontainers](https://testcontainers-python.readthedocs.io/en/latest/index.html). 2023-04-04T02:26:30,730 ### Futher Tools 2023-04-04T02:26:30,731 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2023-04-04T02:26:30,731 Both can be run by `black .` or `flake8 .` respectively. 2023-04-04T02:26:30,733 ## Releasing 2023-04-04T02:26:30,733 To do a release just ensure that you have the right set of generated thrift files. 2023-04-04T02:26:30,734 Then run linting and auto-formatting. 2023-04-04T02:26:30,734 Then, ensure that all tests work (via `pytest .`). 2023-04-04T02:26:30,734 Then you are good to go to do a release! 2023-04-04T02:26:30,736 ### Preparing your environment 2023-04-04T02:26:30,736 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2023-04-04T02:26:30,737 ### Doing the Release 2023-04-04T02:26:30,738 There is a convenient script `release.sh` to do all steps for a release. 2023-04-04T02:26:30,738 Namely, these are 2023-04-04T02:26:30,739 * Remove all transient directories from last release (if exists) 2023-04-04T02:26:30,739 * (Re-)generate all generated sources via mvn 2023-04-04T02:26:30,740 * Run Linting (flake8) 2023-04-04T02:26:30,740 * Run Tests via pytest 2023-04-04T02:26:30,740 * Build 2023-04-04T02:26:30,741 * Release to pypi 2023-04-04T02:26:30,758 running egg_info 2023-04-04T02:26:30,769 writing apache_iotdb.egg-info/PKG-INFO 2023-04-04T02:26:30,775 writing dependency_links to apache_iotdb.egg-info/dependency_links.txt 2023-04-04T02:26:30,779 writing entry points to apache_iotdb.egg-info/entry_points.txt 2023-04-04T02:26:30,782 writing requirements to apache_iotdb.egg-info/requires.txt 2023-04-04T02:26:30,784 writing top-level names to apache_iotdb.egg-info/top_level.txt 2023-04-04T02:26:30,855 reading manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2023-04-04T02:26:30,862 adding license file 'LICENSE' 2023-04-04T02:26:30,875 writing manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2023-04-04T02:26:30,879 /tmp/pip-build-env-5ggwxfha/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'website' 2023-04-04T02:26:30,880 warnings.warn(msg) 2023-04-04T02:26:30,992 Getting requirements to build wheel: finished with status 'done' 2023-04-04T02:26:31,012 Created temporary directory: /tmp/pip-modern-metadata-zsp_dymq 2023-04-04T02:26:31,018 Preparing metadata (pyproject.toml): started 2023-04-04T02:26:31,020 Running command Preparing metadata (pyproject.toml) 2023-04-04T02:26:32,112 2023-04-04T02:26:32,120 # Apache IoTDB 2023-04-04T02:26:32,120 [![Python Client](https://github.com/apache/iotdb/actions/workflows/client-python.yml/badge.svg?branch=master)](https://github.com/apache/iotdb/actions/workflows/client-python.yml) 2023-04-04T02:26:32,121 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2023-04-04T02:26:32,121 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2023-04-04T02:26:32,121 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2023-04-04T02:26:32,122 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2023-04-04T02:26:32,122 ![](https://img.shields.io/badge/platform-win%20%7C%20macos%20%7C%20linux-yellow.svg) 2023-04-04T02:26:32,122 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2023-04-04T02:26:32,123 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2023-04-04T02:26:32,124 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2023-04-04T02:26:32,124 architecture, high performance and rich feature set together with its deep integration with 2023-04-04T02:26:32,124 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2023-04-04T02:26:32,125 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2023-04-04T02:26:32,125 ## Python Native API 2023-04-04T02:26:32,126 ### Requirements 2023-04-04T02:26:32,127 You have to install thrift (>=0.13) before using the package. 2023-04-04T02:26:32,128 ### How to use (Example) 2023-04-04T02:26:32,129 First, download the latest package: `pip3 install apache-iotdb` 2023-04-04T02:26:32,129 *Notice: If you are installing Python API v0.13.0, DO NOT install by `pip install apache-iotdb==0.13.0`, use `pip install apache-iotdb==0.13.0.post1` instead!* 2023-04-04T02:26:32,130 You can get an example of using the package to read and write data at here: [Example](https://github.com/apache/iotdb/blob/master/client-py/SessionExample.py) 2023-04-04T02:26:32,131 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2023-04-04T02:26:32,131 (you need to add `import iotdb` in the head of the file) 2023-04-04T02:26:32,132 Or: 2023-04-04T02:26:32,132 ```python 2023-04-04T02:26:32,133 from iotdb.Session import Session 2023-04-04T02:26:32,133 ip = "127.0.0.1" 2023-04-04T02:26:32,134 port_ = "6667" 2023-04-04T02:26:32,134 username_ = "root" 2023-04-04T02:26:32,134 password_ = "root" 2023-04-04T02:26:32,135 session = Session(ip, port_, username_, password_) 2023-04-04T02:26:32,135 session.open(False) 2023-04-04T02:26:32,135 zone = session.get_time_zone() 2023-04-04T02:26:32,136 session.close() 2023-04-04T02:26:32,136 ``` 2023-04-04T02:26:32,137 ### Initialization 2023-04-04T02:26:32,137 * Initialize a Session 2023-04-04T02:26:32,138 ```python 2023-04-04T02:26:32,138 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2023-04-04T02:26:32,138 ``` 2023-04-04T02:26:32,139 * Open a session, with a parameter to specify whether to enable RPC compression 2023-04-04T02:26:32,140 ```python 2023-04-04T02:26:32,140 session.open(enable_rpc_compression=False) 2023-04-04T02:26:32,140 ``` 2023-04-04T02:26:32,141 Notice: this RPC compression status of client must comply with that of IoTDB server 2023-04-04T02:26:32,141 * Close a Session 2023-04-04T02:26:32,142 ```python 2023-04-04T02:26:32,142 session.close() 2023-04-04T02:26:32,143 ``` 2023-04-04T02:26:32,143 ### Data Definition Interface (DDL Interface) 2023-04-04T02:26:32,144 #### DATABASE Management 2023-04-04T02:26:32,144 * CREATE DATABASE 2023-04-04T02:26:32,145 ```python 2023-04-04T02:26:32,145 session.set_storage_group(group_name) 2023-04-04T02:26:32,146 ``` 2023-04-04T02:26:32,146 * Delete one or several databases 2023-04-04T02:26:32,147 ```python 2023-04-04T02:26:32,147 session.delete_storage_group(group_name) 2023-04-04T02:26:32,148 session.delete_storage_groups(group_name_lst) 2023-04-04T02:26:32,148 ``` 2023-04-04T02:26:32,148 #### Timeseries Management 2023-04-04T02:26:32,149 * Create one or multiple timeseries 2023-04-04T02:26:32,150 ```python 2023-04-04T02:26:32,150 session.create_time_series(ts_path, data_type, encoding, compressor, 2023-04-04T02:26:32,150 props=None, tags=None, attributes=None, alias=None) 2023-04-04T02:26:32,151 session.create_multi_time_series( 2023-04-04T02:26:32,151 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2023-04-04T02:26:32,151 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2023-04-04T02:26:32,152 ) 2023-04-04T02:26:32,152 ``` 2023-04-04T02:26:32,152 * Create aligned timeseries 2023-04-04T02:26:32,153 ```python 2023-04-04T02:26:32,153 session.create_aligned_time_series( 2023-04-04T02:26:32,154 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2023-04-04T02:26:32,154 ) 2023-04-04T02:26:32,154 ``` 2023-04-04T02:26:32,155 Attention: Alias of measurements are **not supported** currently. 2023-04-04T02:26:32,156 * Delete one or several timeseries 2023-04-04T02:26:32,156 ```python 2023-04-04T02:26:32,156 session.delete_time_series(paths_list) 2023-04-04T02:26:32,157 ``` 2023-04-04T02:26:32,157 * Check whether the specific timeseries exists 2023-04-04T02:26:32,158 ```python 2023-04-04T02:26:32,158 session.check_time_series_exists(path) 2023-04-04T02:26:32,159 ``` 2023-04-04T02:26:32,159 ### Data Manipulation Interface (DML Interface) 2023-04-04T02:26:32,160 #### Insert 2023-04-04T02:26:32,161 It is recommended to use insertTablet to help improve write efficiency. 2023-04-04T02:26:32,161 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2023-04-04T02:26:32,162 * **Better Write Performance** 2023-04-04T02:26:32,162 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2023-04-04T02:26:32,163 We have two implementations of Tablet in Python API. 2023-04-04T02:26:32,163 * Normal Tablet 2023-04-04T02:26:32,164 ```python 2023-04-04T02:26:32,164 values_ = [ 2023-04-04T02:26:32,164 [False, 10, 11, 1.1, 10011.1, "test01"], 2023-04-04T02:26:32,165 [True, 100, 11111, 1.25, 101.0, "test02"], 2023-04-04T02:26:32,165 [False, 100, 1, 188.1, 688.25, "test03"], 2023-04-04T02:26:32,165 [True, 0, 0, 0, 6.25, "test04"], 2023-04-04T02:26:32,166 ] 2023-04-04T02:26:32,166 timestamps_ = [1, 2, 3, 4] 2023-04-04T02:26:32,166 tablet_ = Tablet( 2023-04-04T02:26:32,167 device_id, measurements_, data_types_, values_, timestamps_ 2023-04-04T02:26:32,167 ) 2023-04-04T02:26:32,167 session.insert_tablet(tablet_) 2023-04-04T02:26:32,168 values_ = [ 2023-04-04T02:26:32,168 [None, 10, 11, 1.1, 10011.1, "test01"], 2023-04-04T02:26:32,169 [True, None, 11111, 1.25, 101.0, "test02"], 2023-04-04T02:26:32,169 [False, 100, None, 188.1, 688.25, "test03"], 2023-04-04T02:26:32,169 [True, 0, 0, 0, None, None], 2023-04-04T02:26:32,169 ] 2023-04-04T02:26:32,170 timestamps_ = [16, 17, 18, 19] 2023-04-04T02:26:32,170 tablet_ = Tablet( 2023-04-04T02:26:32,170 device_id, measurements_, data_types_, values_, timestamps_ 2023-04-04T02:26:32,171 ) 2023-04-04T02:26:32,171 session.insert_tablet(tablet_) 2023-04-04T02:26:32,171 ``` 2023-04-04T02:26:32,171 * Numpy Tablet 2023-04-04T02:26:32,172 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2023-04-04T02:26:32,172 With less memory footprint and time cost of serialization, the insert performance will be better. 2023-04-04T02:26:32,173 **Notice** 2023-04-04T02:26:32,173 1. time and value columns in Tablet are ndarray. 2023-04-04T02:26:32,174 2. recommended to use the specific dtypes to each ndarray, see the example below 2023-04-04T02:26:32,174 (if not, the default dtypes are also ok). 2023-04-04T02:26:32,174 ```python 2023-04-04T02:26:32,175 import numpy as np 2023-04-04T02:26:32,175 data_types_ = [ 2023-04-04T02:26:32,175 TSDataType.BOOLEAN, 2023-04-04T02:26:32,176 TSDataType.INT32, 2023-04-04T02:26:32,176 TSDataType.INT64, 2023-04-04T02:26:32,176 TSDataType.FLOAT, 2023-04-04T02:26:32,177 TSDataType.DOUBLE, 2023-04-04T02:26:32,177 TSDataType.TEXT, 2023-04-04T02:26:32,177 ] 2023-04-04T02:26:32,177 np_values_ = [ 2023-04-04T02:26:32,178 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2023-04-04T02:26:32,178 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2023-04-04T02:26:32,178 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2023-04-04T02:26:32,179 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2023-04-04T02:26:32,179 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2023-04-04T02:26:32,179 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2023-04-04T02:26:32,180 ] 2023-04-04T02:26:32,180 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2023-04-04T02:26:32,180 np_tablet_ = NumpyTablet( 2023-04-04T02:26:32,181 device_id, measurements_, data_types_, np_values_, np_timestamps_ 2023-04-04T02:26:32,181 ) 2023-04-04T02:26:32,181 session.insert_tablet(np_tablet_) 2023-04-04T02:26:32,182 # insert one numpy tablet with none into the database. 2023-04-04T02:26:32,182 np_values_ = [ 2023-04-04T02:26:32,182 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2023-04-04T02:26:32,183 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2023-04-04T02:26:32,183 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2023-04-04T02:26:32,183 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2023-04-04T02:26:32,184 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2023-04-04T02:26:32,184 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2023-04-04T02:26:32,184 ] 2023-04-04T02:26:32,184 np_timestamps_ = np.array([98, 99, 100, 101], TSDataType.INT64.np_dtype()) 2023-04-04T02:26:32,185 np_bitmaps_ = [] 2023-04-04T02:26:32,185 for i in range(len(measurements_)): 2023-04-04T02:26:32,185 np_bitmaps_.append(BitMap(len(np_timestamps_))) 2023-04-04T02:26:32,186 np_bitmaps_[0].mark(0) 2023-04-04T02:26:32,186 np_bitmaps_[1].mark(1) 2023-04-04T02:26:32,186 np_bitmaps_[2].mark(2) 2023-04-04T02:26:32,186 np_bitmaps_[4].mark(3) 2023-04-04T02:26:32,187 np_bitmaps_[5].mark(3) 2023-04-04T02:26:32,187 np_tablet_with_none = NumpyTablet( 2023-04-04T02:26:32,187 device_id, measurements_, data_types_, np_values_, np_timestamps_, np_bitmaps_ 2023-04-04T02:26:32,188 ) 2023-04-04T02:26:32,188 session.insert_tablet(np_tablet_with_none) 2023-04-04T02:26:32,188 ``` 2023-04-04T02:26:32,189 * Insert multiple Tablets 2023-04-04T02:26:32,190 ```python 2023-04-04T02:26:32,190 session.insert_tablets(tablet_lst) 2023-04-04T02:26:32,190 ``` 2023-04-04T02:26:32,191 * Insert a Record 2023-04-04T02:26:32,192 ```python 2023-04-04T02:26:32,192 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2023-04-04T02:26:32,192 ``` 2023-04-04T02:26:32,193 * Insert multiple Records 2023-04-04T02:26:32,193 ```python 2023-04-04T02:26:32,194 session.insert_records( 2023-04-04T02:26:32,194 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2023-04-04T02:26:32,194 ) 2023-04-04T02:26:32,195 ``` 2023-04-04T02:26:32,195 * Insert multiple Records that belong to the same device. 2023-04-04T02:26:32,196 With type info the server has no need to do type inference, which leads a better performance 2023-04-04T02:26:32,197 ```python 2023-04-04T02:26:32,197 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2023-04-04T02:26:32,197 ``` 2023-04-04T02:26:32,198 #### Insert with type inference 2023-04-04T02:26:32,199 When the data is of String type, we can use the following interface to perform type inference based on the value of the value itself. For example, if value is "true" , it can be automatically inferred to be a boolean type. If value is "3.2" , it can be automatically inferred as a flout type. Without type information, server has to do type inference, which may cost some time. 2023-04-04T02:26:32,199 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2023-04-04T02:26:32,200 ```python 2023-04-04T02:26:32,200 session.insert_str_record(device_id, timestamp, measurements, string_values) 2023-04-04T02:26:32,200 ``` 2023-04-04T02:26:32,201 #### Insert of Aligned Timeseries 2023-04-04T02:26:32,202 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2023-04-04T02:26:32,202 * insert_aligned_record 2023-04-04T02:26:32,202 * insert_aligned_records 2023-04-04T02:26:32,203 * insert_aligned_records_of_one_device 2023-04-04T02:26:32,203 * insert_aligned_tablet 2023-04-04T02:26:32,203 * insert_aligned_tablets 2023-04-04T02:26:32,204 ### IoTDB-SQL Interface 2023-04-04T02:26:32,205 * Execute query statement 2023-04-04T02:26:32,206 ```python 2023-04-04T02:26:32,206 session.execute_query_statement(sql) 2023-04-04T02:26:32,206 ``` 2023-04-04T02:26:32,207 * Execute non query statement 2023-04-04T02:26:32,207 ```python 2023-04-04T02:26:32,208 session.execute_non_query_statement(sql) 2023-04-04T02:26:32,208 ``` 2023-04-04T02:26:32,209 * Execute statement 2023-04-04T02:26:32,209 ```python 2023-04-04T02:26:32,210 session.execute_statement(sql) 2023-04-04T02:26:32,210 ``` 2023-04-04T02:26:32,211 ### Schema Template 2023-04-04T02:26:32,211 #### Create Schema Template 2023-04-04T02:26:32,211 The step for creating a metadata template is as follows 2023-04-04T02:26:32,212 1. Create the template class 2023-04-04T02:26:32,212 2. Adding child Node,InternalNode and MeasurementNode can be chose 2023-04-04T02:26:32,213 3. Execute create schema template function 2023-04-04T02:26:32,213 ```python 2023-04-04T02:26:32,214 template = Template(name=template_name, share_time=True) 2023-04-04T02:26:32,215 i_node_gps = InternalNode(name="GPS", share_time=False) 2023-04-04T02:26:32,215 i_node_v = InternalNode(name="vehicle", share_time=True) 2023-04-04T02:26:32,215 m_node_x = MeasurementNode("x", TSDataType.FLOAT, TSEncoding.RLE, Compressor.SNAPPY) 2023-04-04T02:26:32,216 i_node_gps.add_child(m_node_x) 2023-04-04T02:26:32,216 i_node_v.add_child(m_node_x) 2023-04-04T02:26:32,217 template.add_template(i_node_gps) 2023-04-04T02:26:32,217 template.add_template(i_node_v) 2023-04-04T02:26:32,218 template.add_template(m_node_x) 2023-04-04T02:26:32,218 session.create_schema_template(template) 2023-04-04T02:26:32,219 ``` 2023-04-04T02:26:32,219 #### Modify Schema Template nodes 2023-04-04T02:26:32,219 Modify nodes in a template, the template must be already created. These are functions that add or delete some measurement nodes. 2023-04-04T02:26:32,220 * add node in template 2023-04-04T02:26:32,220 ```python 2023-04-04T02:26:32,220 session.add_measurements_in_template(template_name, measurements_path, data_types, encodings, compressors, is_aligned) 2023-04-04T02:26:32,220 ``` 2023-04-04T02:26:32,221 * delete node in template 2023-04-04T02:26:32,221 ```python 2023-04-04T02:26:32,222 session.delete_node_in_template(template_name, path) 2023-04-04T02:26:32,222 ``` 2023-04-04T02:26:32,222 #### Set Schema Template 2023-04-04T02:26:32,223 ```python 2023-04-04T02:26:32,223 session.set_schema_template(template_name, prefix_path) 2023-04-04T02:26:32,223 ``` 2023-04-04T02:26:32,224 #### Uset Schema Template 2023-04-04T02:26:32,224 ```python 2023-04-04T02:26:32,224 session.unset_schema_template(template_name, prefix_path) 2023-04-04T02:26:32,225 ``` 2023-04-04T02:26:32,225 #### Show Schema Template 2023-04-04T02:26:32,226 * Show all schema templates 2023-04-04T02:26:32,226 ```python 2023-04-04T02:26:32,226 session.show_all_templates() 2023-04-04T02:26:32,226 ``` 2023-04-04T02:26:32,227 * Count all nodes in templates 2023-04-04T02:26:32,227 ```python 2023-04-04T02:26:32,227 session.count_measurements_in_template(template_name) 2023-04-04T02:26:32,228 ``` 2023-04-04T02:26:32,228 * Judge whether the path is measurement or not in templates, This measurement must be in the template 2023-04-04T02:26:32,228 ```python 2023-04-04T02:26:32,229 session.count_measurements_in_template(template_name, path) 2023-04-04T02:26:32,229 ``` 2023-04-04T02:26:32,230 * Judge whether the path is exist or not in templates, This path may not belong to the template 2023-04-04T02:26:32,230 ```python 2023-04-04T02:26:32,230 session.is_path_exist_in_template(template_name, path) 2023-04-04T02:26:32,231 ``` 2023-04-04T02:26:32,231 * Show nodes under in schema template 2023-04-04T02:26:32,231 ```python 2023-04-04T02:26:32,232 session.show_measurements_in_template(template_name) 2023-04-04T02:26:32,232 ``` 2023-04-04T02:26:32,233 * Show the path prefix where a schema template is set 2023-04-04T02:26:32,233 ```python 2023-04-04T02:26:32,233 session.show_paths_template_set_on(template_name) 2023-04-04T02:26:32,233 ``` 2023-04-04T02:26:32,234 * Show the path prefix where a schema template is used (i.e. the time series has been created) 2023-04-04T02:26:32,234 ```python 2023-04-04T02:26:32,235 session.show_paths_template_using_on(template_name) 2023-04-04T02:26:32,235 ``` 2023-04-04T02:26:32,236 #### Drop Schema Template 2023-04-04T02:26:32,236 Delete an existing metadata template,dropping an already set template is not supported 2023-04-04T02:26:32,236 ```python 2023-04-04T02:26:32,237 session.drop_schema_template("template_python") 2023-04-04T02:26:32,237 ``` 2023-04-04T02:26:32,238 ### Pandas Support 2023-04-04T02:26:32,238 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2023-04-04T02:26:32,239 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2023-04-04T02:26:32,239 Example: 2023-04-04T02:26:32,240 ```python 2023-04-04T02:26:32,240 from iotdb.Session import Session 2023-04-04T02:26:32,241 ip = "127.0.0.1" 2023-04-04T02:26:32,241 port_ = "6667" 2023-04-04T02:26:32,241 username_ = "root" 2023-04-04T02:26:32,242 password_ = "root" 2023-04-04T02:26:32,242 session = Session(ip, port_, username_, password_) 2023-04-04T02:26:32,242 session.open(False) 2023-04-04T02:26:32,243 result = session.execute_query_statement("SELECT * FROM root.*") 2023-04-04T02:26:32,243 # Transform to Pandas Dataset 2023-04-04T02:26:32,243 df = result.todf() 2023-04-04T02:26:32,244 session.close() 2023-04-04T02:26:32,245 # Now you can work with the dataframe 2023-04-04T02:26:32,245 df = ... 2023-04-04T02:26:32,245 ``` 2023-04-04T02:26:32,246 ### IoTDB Testcontainer 2023-04-04T02:26:32,247 The Test Support is based on the lib `testcontainers` (https://testcontainers-python.readthedocs.io/en/latest/index.html) which you need to install in your project if you want to use the feature. 2023-04-04T02:26:32,248 To start (and stop) an IoTDB Database in a Docker container simply do: 2023-04-04T02:26:32,248 ```python 2023-04-04T02:26:32,248 class MyTestCase(unittest.TestCase): 2023-04-04T02:26:32,249 def test_something(self): 2023-04-04T02:26:32,249 with IoTDBContainer() as c: 2023-04-04T02:26:32,249 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2023-04-04T02:26:32,250 session.open(False) 2023-04-04T02:26:32,250 result = session.execute_query_statement("SHOW TIMESERIES") 2023-04-04T02:26:32,250 print(result) 2023-04-04T02:26:32,251 session.close() 2023-04-04T02:26:32,251 ``` 2023-04-04T02:26:32,252 by default it will load the image `apache/iotdb:latest`, if you want a specific version just pass it like e.g. `IoTDBContainer("apache/iotdb:0.12.0")` to get version `0.12.0` running. 2023-04-04T02:26:32,253 ### IoTDB DBAPI 2023-04-04T02:26:32,253 IoTDB DBAPI implements the Python DB API 2.0 specification (https://peps.python.org/pep-0249/), which defines a common 2023-04-04T02:26:32,253 interface for accessing databases in Python. 2023-04-04T02:26:32,254 #### Examples 2023-04-04T02:26:32,254 + Initialization 2023-04-04T02:26:32,255 The initialized parameters are consistent with the session part (except for the sqlalchemy_mode). 2023-04-04T02:26:32,255 ```python 2023-04-04T02:26:32,256 from iotdb.dbapi import connect 2023-04-04T02:26:32,256 ip = "127.0.0.1" 2023-04-04T02:26:32,257 port_ = "6667" 2023-04-04T02:26:32,257 username_ = "root" 2023-04-04T02:26:32,257 password_ = "root" 2023-04-04T02:26:32,258 conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="UTC+8",sqlalchemy_mode=False) 2023-04-04T02:26:32,258 cursor = conn.cursor() 2023-04-04T02:26:32,258 ``` 2023-04-04T02:26:32,259 + simple SQL statement execution 2023-04-04T02:26:32,259 ```python 2023-04-04T02:26:32,259 cursor.execute("SELECT * FROM root.*") 2023-04-04T02:26:32,259 for row in cursor.fetchall(): 2023-04-04T02:26:32,260 print(row) 2023-04-04T02:26:32,260 ``` 2023-04-04T02:26:32,261 + execute SQL with parameter 2023-04-04T02:26:32,261 IoTDB DBAPI supports pyformat style parameters 2023-04-04T02:26:32,262 ```python 2023-04-04T02:26:32,262 cursor.execute("SELECT * FROM root.* WHERE time < %(time)s",{"time":"2017-11-01T00:08:00.000"}) 2023-04-04T02:26:32,262 for row in cursor.fetchall(): 2023-04-04T02:26:32,263 print(row) 2023-04-04T02:26:32,263 ``` 2023-04-04T02:26:32,264 + execute SQL with parameter sequences 2023-04-04T02:26:32,264 ```python 2023-04-04T02:26:32,264 seq_of_parameters = [ 2023-04-04T02:26:32,264 {"timestamp": 1, "temperature": 1}, 2023-04-04T02:26:32,265 {"timestamp": 2, "temperature": 2}, 2023-04-04T02:26:32,265 {"timestamp": 3, "temperature": 3}, 2023-04-04T02:26:32,265 {"timestamp": 4, "temperature": 4}, 2023-04-04T02:26:32,266 {"timestamp": 5, "temperature": 5}, 2023-04-04T02:26:32,266 ] 2023-04-04T02:26:32,266 sql = "insert into root.cursor(timestamp,temperature) values(%(timestamp)s,%(temperature)s)" 2023-04-04T02:26:32,267 cursor.executemany(sql,seq_of_parameters) 2023-04-04T02:26:32,267 ``` 2023-04-04T02:26:32,268 + close the connection and cursor 2023-04-04T02:26:32,268 ```python 2023-04-04T02:26:32,268 cursor.close() 2023-04-04T02:26:32,269 conn.close() 2023-04-04T02:26:32,269 ``` 2023-04-04T02:26:32,270 ### IoTDB SQLAlchemy Dialect (Experimental) 2023-04-04T02:26:32,270 The SQLAlchemy dialect of IoTDB is written to adapt to Apache Superset. 2023-04-04T02:26:32,270 This part is still being improved. 2023-04-04T02:26:32,271 Please do not use it in the production environment! 2023-04-04T02:26:32,271 #### Mapping of the metadata 2023-04-04T02:26:32,271 The data model used by SQLAlchemy is a relational data model, which describes the relationships between different entities through tables. 2023-04-04T02:26:32,271 While the data model of IoTDB is a hierarchical data model, which organizes the data through a tree structure. 2023-04-04T02:26:32,272 In order to adapt IoTDB to the dialect of SQLAlchemy, the original data model in IoTDB needs to be reorganized. 2023-04-04T02:26:32,272 Converting the data model of IoTDB into the data model of SQLAlchemy. 2023-04-04T02:26:32,273 The metadata in the IoTDB are: 2023-04-04T02:26:32,273 1. Database 2023-04-04T02:26:32,274 2. Path 2023-04-04T02:26:32,274 3. Entity 2023-04-04T02:26:32,274 4. Measurement 2023-04-04T02:26:32,275 The metadata in the SQLAlchemy are: 2023-04-04T02:26:32,275 1. Schema 2023-04-04T02:26:32,275 2. Table 2023-04-04T02:26:32,276 3. Column 2023-04-04T02:26:32,276 The mapping relationship between them is: 2023-04-04T02:26:32,277 | The metadata in the SQLAlchemy | The metadata in the IoTDB | 2023-04-04T02:26:32,277 | -------------------- | ---------------------------------------------- | 2023-04-04T02:26:32,278 | Schema | Database | 2023-04-04T02:26:32,278 | Table | Path ( from database to entity ) + Entity | 2023-04-04T02:26:32,278 | Column | Measurement | 2023-04-04T02:26:32,279 The following figure shows the relationship between the two more intuitively: 2023-04-04T02:26:32,280 ![sqlalchemy-to-iotdb](https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/API/IoTDB-SQLAlchemy/sqlalchemy-to-iotdb.png?raw=true) 2023-04-04T02:26:32,280 #### Data type mapping 2023-04-04T02:26:32,281 | data type in IoTDB | data type in SQLAlchemy | 2023-04-04T02:26:32,281 |--------------------|-------------------------| 2023-04-04T02:26:32,281 | BOOLEAN | Boolean | 2023-04-04T02:26:32,282 | INT32 | Integer | 2023-04-04T02:26:32,282 | INT64 | BigInteger | 2023-04-04T02:26:32,282 | FLOAT | Float | 2023-04-04T02:26:32,283 | DOUBLE | Float | 2023-04-04T02:26:32,283 | TEXT | Text | 2023-04-04T02:26:32,283 | LONG | BigInteger | 2023-04-04T02:26:32,284 #### Example 2023-04-04T02:26:32,284 + execute statement 2023-04-04T02:26:32,285 ```python 2023-04-04T02:26:32,285 from sqlalchemy import create_engine 2023-04-04T02:26:32,286 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2023-04-04T02:26:32,286 connect = engine.connect() 2023-04-04T02:26:32,286 result = connect.execute("SELECT ** FROM root") 2023-04-04T02:26:32,287 for row in result.fetchall(): 2023-04-04T02:26:32,287 print(row) 2023-04-04T02:26:32,287 ``` 2023-04-04T02:26:32,288 + ORM (now only simple queries are supported) 2023-04-04T02:26:32,289 ```python 2023-04-04T02:26:32,289 from sqlalchemy import create_engine, Column, Float, BigInteger, MetaData 2023-04-04T02:26:32,289 from sqlalchemy.ext.declarative import declarative_base 2023-04-04T02:26:32,290 from sqlalchemy.orm import sessionmaker 2023-04-04T02:26:32,290 metadata = MetaData( 2023-04-04T02:26:32,291 schema='root.factory' 2023-04-04T02:26:32,291 ) 2023-04-04T02:26:32,291 Base = declarative_base(metadata=metadata) 2023-04-04T02:26:32,292 class Device(Base): 2023-04-04T02:26:32,292 __tablename__ = "room2.device1" 2023-04-04T02:26:32,293 Time = Column(BigInteger, primary_key=True) 2023-04-04T02:26:32,293 temperature = Column(Float) 2023-04-04T02:26:32,293 status = Column(Float) 2023-04-04T02:26:32,294 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2023-04-04T02:26:32,295 DbSession = sessionmaker(bind=engine) 2023-04-04T02:26:32,295 session = DbSession() 2023-04-04T02:26:32,296 res = session.query(Device.status).filter(Device.temperature > 1) 2023-04-04T02:26:32,296 for row in res: 2023-04-04T02:26:32,297 print(row) 2023-04-04T02:26:32,297 ``` 2023-04-04T02:26:32,298 ## Developers 2023-04-04T02:26:32,299 ### Introduction 2023-04-04T02:26:32,299 This is an example of how to connect to IoTDB with python, using the thrift rpc interfaces. Things are almost the same on Windows or Linux, but pay attention to the difference like path separator. 2023-04-04T02:26:32,301 ### Prerequisites 2023-04-04T02:26:32,301 Python3.7 or later is preferred. 2023-04-04T02:26:32,302 You have to install Thrift (0.11.0 or later) to compile our thrift file into python code. Below is the official tutorial of installation, eventually, you should have a thrift executable. 2023-04-04T02:26:32,303 ``` 2023-04-04T02:26:32,303 http://thrift.apache.org/docs/install/ 2023-04-04T02:26:32,303 ``` 2023-04-04T02:26:32,304 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2023-04-04T02:26:32,304 ```shell 2023-04-04T02:26:32,304 pip install -r requirements_dev.txt 2023-04-04T02:26:32,305 ``` 2023-04-04T02:26:32,306 ### Compile the thrift library and Debug 2023-04-04T02:26:32,306 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2023-04-04T02:26:32,307 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2023-04-04T02:26:32,307 This folder is ignored from git and should **never be pushed to git!** 2023-04-04T02:26:32,308 **Notice** Do not upload `iotdb/thrift` to the git repo. 2023-04-04T02:26:32,310 ### Session Client & Example 2023-04-04T02:26:32,310 We packed up the Thrift interface in `client-py/src/iotdb/Session.py` (similar with its Java counterpart), also provided an example file `client-py/src/SessionExample.py` of how to use the session module. please read it carefully. 2023-04-04T02:26:32,311 Or, another simple example: 2023-04-04T02:26:32,312 ```python 2023-04-04T02:26:32,312 from iotdb.Session import Session 2023-04-04T02:26:32,313 ip = "127.0.0.1" 2023-04-04T02:26:32,313 port_ = "6667" 2023-04-04T02:26:32,314 username_ = "root" 2023-04-04T02:26:32,314 password_ = "root" 2023-04-04T02:26:32,314 session = Session(ip, port_, username_, password_) 2023-04-04T02:26:32,315 session.open(False) 2023-04-04T02:26:32,315 zone = session.get_time_zone() 2023-04-04T02:26:32,315 session.close() 2023-04-04T02:26:32,316 ``` 2023-04-04T02:26:32,317 ### Tests 2023-04-04T02:26:32,317 Please add your custom tests in `tests` folder. 2023-04-04T02:26:32,318 To run all defined tests just type `pytest .` in the root folder. 2023-04-04T02:26:32,319 **Notice** Some tests need docker to be started on your system as a test instance is started in a docker container using [testcontainers](https://testcontainers-python.readthedocs.io/en/latest/index.html). 2023-04-04T02:26:32,320 ### Futher Tools 2023-04-04T02:26:32,320 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2023-04-04T02:26:32,321 Both can be run by `black .` or `flake8 .` respectively. 2023-04-04T02:26:32,322 ## Releasing 2023-04-04T02:26:32,323 To do a release just ensure that you have the right set of generated thrift files. 2023-04-04T02:26:32,323 Then run linting and auto-formatting. 2023-04-04T02:26:32,323 Then, ensure that all tests work (via `pytest .`). 2023-04-04T02:26:32,324 Then you are good to go to do a release! 2023-04-04T02:26:32,325 ### Preparing your environment 2023-04-04T02:26:32,326 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2023-04-04T02:26:32,327 ### Doing the Release 2023-04-04T02:26:32,327 There is a convenient script `release.sh` to do all steps for a release. 2023-04-04T02:26:32,328 Namely, these are 2023-04-04T02:26:32,328 * Remove all transient directories from last release (if exists) 2023-04-04T02:26:32,329 * (Re-)generate all generated sources via mvn 2023-04-04T02:26:32,329 * Run Linting (flake8) 2023-04-04T02:26:32,329 * Run Tests via pytest 2023-04-04T02:26:32,330 * Build 2023-04-04T02:26:32,330 * Release to pypi 2023-04-04T02:26:32,331 running dist_info 2023-04-04T02:26:32,332 creating /tmp/pip-modern-metadata-zsp_dymq/apache_iotdb.egg-info 2023-04-04T02:26:32,332 writing /tmp/pip-modern-metadata-zsp_dymq/apache_iotdb.egg-info/PKG-INFO 2023-04-04T02:26:32,332 writing dependency_links to /tmp/pip-modern-metadata-zsp_dymq/apache_iotdb.egg-info/dependency_links.txt 2023-04-04T02:26:32,333 writing entry points to /tmp/pip-modern-metadata-zsp_dymq/apache_iotdb.egg-info/entry_points.txt 2023-04-04T02:26:32,333 writing requirements to /tmp/pip-modern-metadata-zsp_dymq/apache_iotdb.egg-info/requires.txt 2023-04-04T02:26:32,335 writing top-level names to /tmp/pip-modern-metadata-zsp_dymq/apache_iotdb.egg-info/top_level.txt 2023-04-04T02:26:32,338 writing manifest file '/tmp/pip-modern-metadata-zsp_dymq/apache_iotdb.egg-info/SOURCES.txt' 2023-04-04T02:26:32,403 reading manifest file '/tmp/pip-modern-metadata-zsp_dymq/apache_iotdb.egg-info/SOURCES.txt' 2023-04-04T02:26:32,408 adding license file 'LICENSE' 2023-04-04T02:26:32,418 writing manifest file '/tmp/pip-modern-metadata-zsp_dymq/apache_iotdb.egg-info/SOURCES.txt' 2023-04-04T02:26:32,420 creating '/tmp/pip-modern-metadata-zsp_dymq/apache_iotdb-1.1.0.dist-info' 2023-04-04T02:26:32,626 /tmp/pip-build-env-5ggwxfha/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'website' 2023-04-04T02:26:32,626 warnings.warn(msg) 2023-04-04T02:26:32,751 Preparing metadata (pyproject.toml): finished with status 'done' 2023-04-04T02:26:32,771 Source in /tmp/pip-wheel-k5owm84o/apache-iotdb_dab6e5f0016a471398506ca1f859d472 has version 1.1.0, which satisfies requirement apache-iotdb==1.1.0 from https://files.pythonhosted.org/packages/15/99/bf0d6eae0c005a4dcc88068be36ea3e5b4dcb26e50b6698b4bd814d052e9/apache-iotdb-1.1.0.tar.gz 2023-04-04T02:26:32,773 Removed apache-iotdb==1.1.0 from https://files.pythonhosted.org/packages/15/99/bf0d6eae0c005a4dcc88068be36ea3e5b4dcb26e50b6698b4bd814d052e9/apache-iotdb-1.1.0.tar.gz from build tracker '/tmp/pip-build-tracker-bjwlcw98' 2023-04-04T02:26:32,792 Created temporary directory: /tmp/pip-unpack-2pdjqwhi 2023-04-04T02:26:32,793 Building wheels for collected packages: apache-iotdb 2023-04-04T02:26:32,803 Created temporary directory: /tmp/pip-wheel-8vdqb6w0 2023-04-04T02:26:32,803 Destination directory: /tmp/pip-wheel-8vdqb6w0 2023-04-04T02:26:32,808 Building wheel for apache-iotdb (pyproject.toml): started 2023-04-04T02:26:32,810 Running command Building wheel for apache-iotdb (pyproject.toml) 2023-04-04T02:26:33,868 2023-04-04T02:26:33,876 # Apache IoTDB 2023-04-04T02:26:33,877 [![Python Client](https://github.com/apache/iotdb/actions/workflows/client-python.yml/badge.svg?branch=master)](https://github.com/apache/iotdb/actions/workflows/client-python.yml) 2023-04-04T02:26:33,877 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2023-04-04T02:26:33,877 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2023-04-04T02:26:33,878 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2023-04-04T02:26:33,878 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2023-04-04T02:26:33,878 ![](https://img.shields.io/badge/platform-win%20%7C%20macos%20%7C%20linux-yellow.svg) 2023-04-04T02:26:33,879 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2023-04-04T02:26:33,880 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2023-04-04T02:26:33,880 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2023-04-04T02:26:33,880 architecture, high performance and rich feature set together with its deep integration with 2023-04-04T02:26:33,881 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2023-04-04T02:26:33,881 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2023-04-04T02:26:33,882 ## Python Native API 2023-04-04T02:26:33,882 ### Requirements 2023-04-04T02:26:33,883 You have to install thrift (>=0.13) before using the package. 2023-04-04T02:26:33,884 ### How to use (Example) 2023-04-04T02:26:33,885 First, download the latest package: `pip3 install apache-iotdb` 2023-04-04T02:26:33,885 *Notice: If you are installing Python API v0.13.0, DO NOT install by `pip install apache-iotdb==0.13.0`, use `pip install apache-iotdb==0.13.0.post1` instead!* 2023-04-04T02:26:33,886 You can get an example of using the package to read and write data at here: [Example](https://github.com/apache/iotdb/blob/master/client-py/SessionExample.py) 2023-04-04T02:26:33,887 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2023-04-04T02:26:33,887 (you need to add `import iotdb` in the head of the file) 2023-04-04T02:26:33,888 Or: 2023-04-04T02:26:33,889 ```python 2023-04-04T02:26:33,889 from iotdb.Session import Session 2023-04-04T02:26:33,890 ip = "127.0.0.1" 2023-04-04T02:26:33,890 port_ = "6667" 2023-04-04T02:26:33,890 username_ = "root" 2023-04-04T02:26:33,891 password_ = "root" 2023-04-04T02:26:33,891 session = Session(ip, port_, username_, password_) 2023-04-04T02:26:33,891 session.open(False) 2023-04-04T02:26:33,892 zone = session.get_time_zone() 2023-04-04T02:26:33,892 session.close() 2023-04-04T02:26:33,892 ``` 2023-04-04T02:26:33,893 ### Initialization 2023-04-04T02:26:33,894 * Initialize a Session 2023-04-04T02:26:33,894 ```python 2023-04-04T02:26:33,895 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2023-04-04T02:26:33,895 ``` 2023-04-04T02:26:33,896 * Open a session, with a parameter to specify whether to enable RPC compression 2023-04-04T02:26:33,896 ```python 2023-04-04T02:26:33,896 session.open(enable_rpc_compression=False) 2023-04-04T02:26:33,897 ``` 2023-04-04T02:26:33,897 Notice: this RPC compression status of client must comply with that of IoTDB server 2023-04-04T02:26:33,898 * Close a Session 2023-04-04T02:26:33,899 ```python 2023-04-04T02:26:33,899 session.close() 2023-04-04T02:26:33,899 ``` 2023-04-04T02:26:33,900 ### Data Definition Interface (DDL Interface) 2023-04-04T02:26:33,901 #### DATABASE Management 2023-04-04T02:26:33,901 * CREATE DATABASE 2023-04-04T02:26:33,902 ```python 2023-04-04T02:26:33,902 session.set_storage_group(group_name) 2023-04-04T02:26:33,902 ``` 2023-04-04T02:26:33,903 * Delete one or several databases 2023-04-04T02:26:33,904 ```python 2023-04-04T02:26:33,904 session.delete_storage_group(group_name) 2023-04-04T02:26:33,904 session.delete_storage_groups(group_name_lst) 2023-04-04T02:26:33,905 ``` 2023-04-04T02:26:33,905 #### Timeseries Management 2023-04-04T02:26:33,906 * Create one or multiple timeseries 2023-04-04T02:26:33,906 ```python 2023-04-04T02:26:33,907 session.create_time_series(ts_path, data_type, encoding, compressor, 2023-04-04T02:26:33,907 props=None, tags=None, attributes=None, alias=None) 2023-04-04T02:26:33,908 session.create_multi_time_series( 2023-04-04T02:26:33,908 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2023-04-04T02:26:33,908 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2023-04-04T02:26:33,909 ) 2023-04-04T02:26:33,909 ``` 2023-04-04T02:26:33,909 * Create aligned timeseries 2023-04-04T02:26:33,910 ```python 2023-04-04T02:26:33,910 session.create_aligned_time_series( 2023-04-04T02:26:33,911 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2023-04-04T02:26:33,911 ) 2023-04-04T02:26:33,911 ``` 2023-04-04T02:26:33,912 Attention: Alias of measurements are **not supported** currently. 2023-04-04T02:26:33,912 * Delete one or several timeseries 2023-04-04T02:26:33,913 ```python 2023-04-04T02:26:33,913 session.delete_time_series(paths_list) 2023-04-04T02:26:33,914 ``` 2023-04-04T02:26:33,914 * Check whether the specific timeseries exists 2023-04-04T02:26:33,915 ```python 2023-04-04T02:26:33,915 session.check_time_series_exists(path) 2023-04-04T02:26:33,916 ``` 2023-04-04T02:26:33,916 ### Data Manipulation Interface (DML Interface) 2023-04-04T02:26:33,917 #### Insert 2023-04-04T02:26:33,918 It is recommended to use insertTablet to help improve write efficiency. 2023-04-04T02:26:33,918 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2023-04-04T02:26:33,919 * **Better Write Performance** 2023-04-04T02:26:33,919 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2023-04-04T02:26:33,920 We have two implementations of Tablet in Python API. 2023-04-04T02:26:33,920 * Normal Tablet 2023-04-04T02:26:33,921 ```python 2023-04-04T02:26:33,921 values_ = [ 2023-04-04T02:26:33,922 [False, 10, 11, 1.1, 10011.1, "test01"], 2023-04-04T02:26:33,922 [True, 100, 11111, 1.25, 101.0, "test02"], 2023-04-04T02:26:33,922 [False, 100, 1, 188.1, 688.25, "test03"], 2023-04-04T02:26:33,922 [True, 0, 0, 0, 6.25, "test04"], 2023-04-04T02:26:33,923 ] 2023-04-04T02:26:33,923 timestamps_ = [1, 2, 3, 4] 2023-04-04T02:26:33,923 tablet_ = Tablet( 2023-04-04T02:26:33,924 device_id, measurements_, data_types_, values_, timestamps_ 2023-04-04T02:26:33,924 ) 2023-04-04T02:26:33,924 session.insert_tablet(tablet_) 2023-04-04T02:26:33,925 values_ = [ 2023-04-04T02:26:33,925 [None, 10, 11, 1.1, 10011.1, "test01"], 2023-04-04T02:26:33,926 [True, None, 11111, 1.25, 101.0, "test02"], 2023-04-04T02:26:33,926 [False, 100, None, 188.1, 688.25, "test03"], 2023-04-04T02:26:33,926 [True, 0, 0, 0, None, None], 2023-04-04T02:26:33,926 ] 2023-04-04T02:26:33,927 timestamps_ = [16, 17, 18, 19] 2023-04-04T02:26:33,927 tablet_ = Tablet( 2023-04-04T02:26:33,927 device_id, measurements_, data_types_, values_, timestamps_ 2023-04-04T02:26:33,928 ) 2023-04-04T02:26:33,928 session.insert_tablet(tablet_) 2023-04-04T02:26:33,928 ``` 2023-04-04T02:26:33,929 * Numpy Tablet 2023-04-04T02:26:33,929 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2023-04-04T02:26:33,930 With less memory footprint and time cost of serialization, the insert performance will be better. 2023-04-04T02:26:33,930 **Notice** 2023-04-04T02:26:33,931 1. time and value columns in Tablet are ndarray. 2023-04-04T02:26:33,931 2. recommended to use the specific dtypes to each ndarray, see the example below 2023-04-04T02:26:33,931 (if not, the default dtypes are also ok). 2023-04-04T02:26:33,932 ```python 2023-04-04T02:26:33,932 import numpy as np 2023-04-04T02:26:33,932 data_types_ = [ 2023-04-04T02:26:33,933 TSDataType.BOOLEAN, 2023-04-04T02:26:33,933 TSDataType.INT32, 2023-04-04T02:26:33,933 TSDataType.INT64, 2023-04-04T02:26:33,933 TSDataType.FLOAT, 2023-04-04T02:26:33,934 TSDataType.DOUBLE, 2023-04-04T02:26:33,934 TSDataType.TEXT, 2023-04-04T02:26:33,934 ] 2023-04-04T02:26:33,935 np_values_ = [ 2023-04-04T02:26:33,935 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2023-04-04T02:26:33,935 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2023-04-04T02:26:33,936 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2023-04-04T02:26:33,936 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2023-04-04T02:26:33,936 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2023-04-04T02:26:33,936 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2023-04-04T02:26:33,937 ] 2023-04-04T02:26:33,937 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2023-04-04T02:26:33,937 np_tablet_ = NumpyTablet( 2023-04-04T02:26:33,938 device_id, measurements_, data_types_, np_values_, np_timestamps_ 2023-04-04T02:26:33,938 ) 2023-04-04T02:26:33,938 session.insert_tablet(np_tablet_) 2023-04-04T02:26:33,939 # insert one numpy tablet with none into the database. 2023-04-04T02:26:33,939 np_values_ = [ 2023-04-04T02:26:33,940 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2023-04-04T02:26:33,940 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2023-04-04T02:26:33,940 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2023-04-04T02:26:33,941 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2023-04-04T02:26:33,941 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2023-04-04T02:26:33,941 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2023-04-04T02:26:33,941 ] 2023-04-04T02:26:33,942 np_timestamps_ = np.array([98, 99, 100, 101], TSDataType.INT64.np_dtype()) 2023-04-04T02:26:33,942 np_bitmaps_ = [] 2023-04-04T02:26:33,942 for i in range(len(measurements_)): 2023-04-04T02:26:33,943 np_bitmaps_.append(BitMap(len(np_timestamps_))) 2023-04-04T02:26:33,943 np_bitmaps_[0].mark(0) 2023-04-04T02:26:33,943 np_bitmaps_[1].mark(1) 2023-04-04T02:26:33,943 np_bitmaps_[2].mark(2) 2023-04-04T02:26:33,944 np_bitmaps_[4].mark(3) 2023-04-04T02:26:33,944 np_bitmaps_[5].mark(3) 2023-04-04T02:26:33,944 np_tablet_with_none = NumpyTablet( 2023-04-04T02:26:33,945 device_id, measurements_, data_types_, np_values_, np_timestamps_, np_bitmaps_ 2023-04-04T02:26:33,945 ) 2023-04-04T02:26:33,945 session.insert_tablet(np_tablet_with_none) 2023-04-04T02:26:33,946 ``` 2023-04-04T02:26:33,946 * Insert multiple Tablets 2023-04-04T02:26:33,947 ```python 2023-04-04T02:26:33,947 session.insert_tablets(tablet_lst) 2023-04-04T02:26:33,947 ``` 2023-04-04T02:26:33,948 * Insert a Record 2023-04-04T02:26:33,949 ```python 2023-04-04T02:26:33,949 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2023-04-04T02:26:33,949 ``` 2023-04-04T02:26:33,950 * Insert multiple Records 2023-04-04T02:26:33,951 ```python 2023-04-04T02:26:33,951 session.insert_records( 2023-04-04T02:26:33,952 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2023-04-04T02:26:33,952 ) 2023-04-04T02:26:33,952 ``` 2023-04-04T02:26:33,953 * Insert multiple Records that belong to the same device. 2023-04-04T02:26:33,953 With type info the server has no need to do type inference, which leads a better performance 2023-04-04T02:26:33,954 ```python 2023-04-04T02:26:33,954 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2023-04-04T02:26:33,955 ``` 2023-04-04T02:26:33,955 #### Insert with type inference 2023-04-04T02:26:33,956 When the data is of String type, we can use the following interface to perform type inference based on the value of the value itself. For example, if value is "true" , it can be automatically inferred to be a boolean type. If value is "3.2" , it can be automatically inferred as a flout type. Without type information, server has to do type inference, which may cost some time. 2023-04-04T02:26:33,956 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2023-04-04T02:26:33,957 ```python 2023-04-04T02:26:33,957 session.insert_str_record(device_id, timestamp, measurements, string_values) 2023-04-04T02:26:33,958 ``` 2023-04-04T02:26:33,958 #### Insert of Aligned Timeseries 2023-04-04T02:26:33,959 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2023-04-04T02:26:33,959 * insert_aligned_record 2023-04-04T02:26:33,960 * insert_aligned_records 2023-04-04T02:26:33,960 * insert_aligned_records_of_one_device 2023-04-04T02:26:33,960 * insert_aligned_tablet 2023-04-04T02:26:33,961 * insert_aligned_tablets 2023-04-04T02:26:33,962 ### IoTDB-SQL Interface 2023-04-04T02:26:33,962 * Execute query statement 2023-04-04T02:26:33,963 ```python 2023-04-04T02:26:33,963 session.execute_query_statement(sql) 2023-04-04T02:26:33,964 ``` 2023-04-04T02:26:33,964 * Execute non query statement 2023-04-04T02:26:33,965 ```python 2023-04-04T02:26:33,965 session.execute_non_query_statement(sql) 2023-04-04T02:26:33,965 ``` 2023-04-04T02:26:33,966 * Execute statement 2023-04-04T02:26:33,967 ```python 2023-04-04T02:26:33,967 session.execute_statement(sql) 2023-04-04T02:26:33,968 ``` 2023-04-04T02:26:33,969 ### Schema Template 2023-04-04T02:26:33,969 #### Create Schema Template 2023-04-04T02:26:33,969 The step for creating a metadata template is as follows 2023-04-04T02:26:33,970 1. Create the template class 2023-04-04T02:26:33,970 2. Adding child Node,InternalNode and MeasurementNode can be chose 2023-04-04T02:26:33,971 3. Execute create schema template function 2023-04-04T02:26:33,971 ```python 2023-04-04T02:26:33,971 template = Template(name=template_name, share_time=True) 2023-04-04T02:26:33,972 i_node_gps = InternalNode(name="GPS", share_time=False) 2023-04-04T02:26:33,972 i_node_v = InternalNode(name="vehicle", share_time=True) 2023-04-04T02:26:33,973 m_node_x = MeasurementNode("x", TSDataType.FLOAT, TSEncoding.RLE, Compressor.SNAPPY) 2023-04-04T02:26:33,973 i_node_gps.add_child(m_node_x) 2023-04-04T02:26:33,974 i_node_v.add_child(m_node_x) 2023-04-04T02:26:33,974 template.add_template(i_node_gps) 2023-04-04T02:26:33,975 template.add_template(i_node_v) 2023-04-04T02:26:33,975 template.add_template(m_node_x) 2023-04-04T02:26:33,976 session.create_schema_template(template) 2023-04-04T02:26:33,976 ``` 2023-04-04T02:26:33,976 #### Modify Schema Template nodes 2023-04-04T02:26:33,977 Modify nodes in a template, the template must be already created. These are functions that add or delete some measurement nodes. 2023-04-04T02:26:33,977 * add node in template 2023-04-04T02:26:33,977 ```python 2023-04-04T02:26:33,977 session.add_measurements_in_template(template_name, measurements_path, data_types, encodings, compressors, is_aligned) 2023-04-04T02:26:33,978 ``` 2023-04-04T02:26:33,978 * delete node in template 2023-04-04T02:26:33,979 ```python 2023-04-04T02:26:33,979 session.delete_node_in_template(template_name, path) 2023-04-04T02:26:33,979 ``` 2023-04-04T02:26:33,980 #### Set Schema Template 2023-04-04T02:26:33,980 ```python 2023-04-04T02:26:33,980 session.set_schema_template(template_name, prefix_path) 2023-04-04T02:26:33,981 ``` 2023-04-04T02:26:33,981 #### Uset Schema Template 2023-04-04T02:26:33,982 ```python 2023-04-04T02:26:33,982 session.unset_schema_template(template_name, prefix_path) 2023-04-04T02:26:33,982 ``` 2023-04-04T02:26:33,983 #### Show Schema Template 2023-04-04T02:26:33,983 * Show all schema templates 2023-04-04T02:26:33,983 ```python 2023-04-04T02:26:33,984 session.show_all_templates() 2023-04-04T02:26:33,984 ``` 2023-04-04T02:26:33,984 * Count all nodes in templates 2023-04-04T02:26:33,984 ```python 2023-04-04T02:26:33,985 session.count_measurements_in_template(template_name) 2023-04-04T02:26:33,985 ``` 2023-04-04T02:26:33,986 * Judge whether the path is measurement or not in templates, This measurement must be in the template 2023-04-04T02:26:33,986 ```python 2023-04-04T02:26:33,986 session.count_measurements_in_template(template_name, path) 2023-04-04T02:26:33,986 ``` 2023-04-04T02:26:33,987 * Judge whether the path is exist or not in templates, This path may not belong to the template 2023-04-04T02:26:33,987 ```python 2023-04-04T02:26:33,988 session.is_path_exist_in_template(template_name, path) 2023-04-04T02:26:33,988 ``` 2023-04-04T02:26:33,988 * Show nodes under in schema template 2023-04-04T02:26:33,989 ```python 2023-04-04T02:26:33,989 session.show_measurements_in_template(template_name) 2023-04-04T02:26:33,989 ``` 2023-04-04T02:26:33,990 * Show the path prefix where a schema template is set 2023-04-04T02:26:33,990 ```python 2023-04-04T02:26:33,991 session.show_paths_template_set_on(template_name) 2023-04-04T02:26:33,991 ``` 2023-04-04T02:26:33,991 * Show the path prefix where a schema template is used (i.e. the time series has been created) 2023-04-04T02:26:33,992 ```python 2023-04-04T02:26:33,992 session.show_paths_template_using_on(template_name) 2023-04-04T02:26:33,992 ``` 2023-04-04T02:26:33,993 #### Drop Schema Template 2023-04-04T02:26:33,993 Delete an existing metadata template,dropping an already set template is not supported 2023-04-04T02:26:33,994 ```python 2023-04-04T02:26:33,994 session.drop_schema_template("template_python") 2023-04-04T02:26:33,994 ``` 2023-04-04T02:26:33,995 ### Pandas Support 2023-04-04T02:26:33,996 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2023-04-04T02:26:33,996 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2023-04-04T02:26:33,997 Example: 2023-04-04T02:26:33,997 ```python 2023-04-04T02:26:33,998 from iotdb.Session import Session 2023-04-04T02:26:33,998 ip = "127.0.0.1" 2023-04-04T02:26:33,999 port_ = "6667" 2023-04-04T02:26:33,999 username_ = "root" 2023-04-04T02:26:33,999 password_ = "root" 2023-04-04T02:26:33,999 session = Session(ip, port_, username_, password_) 2023-04-04T02:26:34,000 session.open(False) 2023-04-04T02:26:34,000 result = session.execute_query_statement("SELECT * FROM root.*") 2023-04-04T02:26:34,001 # Transform to Pandas Dataset 2023-04-04T02:26:34,001 df = result.todf() 2023-04-04T02:26:34,002 session.close() 2023-04-04T02:26:34,002 # Now you can work with the dataframe 2023-04-04T02:26:34,002 df = ... 2023-04-04T02:26:34,003 ``` 2023-04-04T02:26:34,004 ### IoTDB Testcontainer 2023-04-04T02:26:34,004 The Test Support is based on the lib `testcontainers` (https://testcontainers-python.readthedocs.io/en/latest/index.html) which you need to install in your project if you want to use the feature. 2023-04-04T02:26:34,005 To start (and stop) an IoTDB Database in a Docker container simply do: 2023-04-04T02:26:34,005 ```python 2023-04-04T02:26:34,006 class MyTestCase(unittest.TestCase): 2023-04-04T02:26:34,006 def test_something(self): 2023-04-04T02:26:34,007 with IoTDBContainer() as c: 2023-04-04T02:26:34,007 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2023-04-04T02:26:34,007 session.open(False) 2023-04-04T02:26:34,007 result = session.execute_query_statement("SHOW TIMESERIES") 2023-04-04T02:26:34,008 print(result) 2023-04-04T02:26:34,008 session.close() 2023-04-04T02:26:34,008 ``` 2023-04-04T02:26:34,009 by default it will load the image `apache/iotdb:latest`, if you want a specific version just pass it like e.g. `IoTDBContainer("apache/iotdb:0.12.0")` to get version `0.12.0` running. 2023-04-04T02:26:34,010 ### IoTDB DBAPI 2023-04-04T02:26:34,011 IoTDB DBAPI implements the Python DB API 2.0 specification (https://peps.python.org/pep-0249/), which defines a common 2023-04-04T02:26:34,011 interface for accessing databases in Python. 2023-04-04T02:26:34,012 #### Examples 2023-04-04T02:26:34,012 + Initialization 2023-04-04T02:26:34,013 The initialized parameters are consistent with the session part (except for the sqlalchemy_mode). 2023-04-04T02:26:34,013 ```python 2023-04-04T02:26:34,013 from iotdb.dbapi import connect 2023-04-04T02:26:34,014 ip = "127.0.0.1" 2023-04-04T02:26:34,014 port_ = "6667" 2023-04-04T02:26:34,014 username_ = "root" 2023-04-04T02:26:34,015 password_ = "root" 2023-04-04T02:26:34,015 conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="UTC+8",sqlalchemy_mode=False) 2023-04-04T02:26:34,015 cursor = conn.cursor() 2023-04-04T02:26:34,016 ``` 2023-04-04T02:26:34,016 + simple SQL statement execution 2023-04-04T02:26:34,016 ```python 2023-04-04T02:26:34,017 cursor.execute("SELECT * FROM root.*") 2023-04-04T02:26:34,017 for row in cursor.fetchall(): 2023-04-04T02:26:34,017 print(row) 2023-04-04T02:26:34,017 ``` 2023-04-04T02:26:34,018 + execute SQL with parameter 2023-04-04T02:26:34,019 IoTDB DBAPI supports pyformat style parameters 2023-04-04T02:26:34,019 ```python 2023-04-04T02:26:34,019 cursor.execute("SELECT * FROM root.* WHERE time < %(time)s",{"time":"2017-11-01T00:08:00.000"}) 2023-04-04T02:26:34,020 for row in cursor.fetchall(): 2023-04-04T02:26:34,020 print(row) 2023-04-04T02:26:34,020 ``` 2023-04-04T02:26:34,021 + execute SQL with parameter sequences 2023-04-04T02:26:34,021 ```python 2023-04-04T02:26:34,021 seq_of_parameters = [ 2023-04-04T02:26:34,022 {"timestamp": 1, "temperature": 1}, 2023-04-04T02:26:34,022 {"timestamp": 2, "temperature": 2}, 2023-04-04T02:26:34,022 {"timestamp": 3, "temperature": 3}, 2023-04-04T02:26:34,023 {"timestamp": 4, "temperature": 4}, 2023-04-04T02:26:34,023 {"timestamp": 5, "temperature": 5}, 2023-04-04T02:26:34,023 ] 2023-04-04T02:26:34,024 sql = "insert into root.cursor(timestamp,temperature) values(%(timestamp)s,%(temperature)s)" 2023-04-04T02:26:34,024 cursor.executemany(sql,seq_of_parameters) 2023-04-04T02:26:34,024 ``` 2023-04-04T02:26:34,025 + close the connection and cursor 2023-04-04T02:26:34,025 ```python 2023-04-04T02:26:34,025 cursor.close() 2023-04-04T02:26:34,026 conn.close() 2023-04-04T02:26:34,026 ``` 2023-04-04T02:26:34,027 ### IoTDB SQLAlchemy Dialect (Experimental) 2023-04-04T02:26:34,027 The SQLAlchemy dialect of IoTDB is written to adapt to Apache Superset. 2023-04-04T02:26:34,027 This part is still being improved. 2023-04-04T02:26:34,028 Please do not use it in the production environment! 2023-04-04T02:26:34,028 #### Mapping of the metadata 2023-04-04T02:26:34,028 The data model used by SQLAlchemy is a relational data model, which describes the relationships between different entities through tables. 2023-04-04T02:26:34,029 While the data model of IoTDB is a hierarchical data model, which organizes the data through a tree structure. 2023-04-04T02:26:34,029 In order to adapt IoTDB to the dialect of SQLAlchemy, the original data model in IoTDB needs to be reorganized. 2023-04-04T02:26:34,029 Converting the data model of IoTDB into the data model of SQLAlchemy. 2023-04-04T02:26:34,030 The metadata in the IoTDB are: 2023-04-04T02:26:34,031 1. Database 2023-04-04T02:26:34,031 2. Path 2023-04-04T02:26:34,031 3. Entity 2023-04-04T02:26:34,031 4. Measurement 2023-04-04T02:26:34,032 The metadata in the SQLAlchemy are: 2023-04-04T02:26:34,032 1. Schema 2023-04-04T02:26:34,033 2. Table 2023-04-04T02:26:34,033 3. Column 2023-04-04T02:26:34,034 The mapping relationship between them is: 2023-04-04T02:26:34,034 | The metadata in the SQLAlchemy | The metadata in the IoTDB | 2023-04-04T02:26:34,035 | -------------------- | ---------------------------------------------- | 2023-04-04T02:26:34,035 | Schema | Database | 2023-04-04T02:26:34,035 | Table | Path ( from database to entity ) + Entity | 2023-04-04T02:26:34,035 | Column | Measurement | 2023-04-04T02:26:34,036 The following figure shows the relationship between the two more intuitively: 2023-04-04T02:26:34,037 ![sqlalchemy-to-iotdb](https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/API/IoTDB-SQLAlchemy/sqlalchemy-to-iotdb.png?raw=true) 2023-04-04T02:26:34,038 #### Data type mapping 2023-04-04T02:26:34,038 | data type in IoTDB | data type in SQLAlchemy | 2023-04-04T02:26:34,038 |--------------------|-------------------------| 2023-04-04T02:26:34,038 | BOOLEAN | Boolean | 2023-04-04T02:26:34,039 | INT32 | Integer | 2023-04-04T02:26:34,039 | INT64 | BigInteger | 2023-04-04T02:26:34,040 | FLOAT | Float | 2023-04-04T02:26:34,040 | DOUBLE | Float | 2023-04-04T02:26:34,040 | TEXT | Text | 2023-04-04T02:26:34,041 | LONG | BigInteger | 2023-04-04T02:26:34,041 #### Example 2023-04-04T02:26:34,041 + execute statement 2023-04-04T02:26:34,042 ```python 2023-04-04T02:26:34,042 from sqlalchemy import create_engine 2023-04-04T02:26:34,043 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2023-04-04T02:26:34,043 connect = engine.connect() 2023-04-04T02:26:34,044 result = connect.execute("SELECT ** FROM root") 2023-04-04T02:26:34,044 for row in result.fetchall(): 2023-04-04T02:26:34,044 print(row) 2023-04-04T02:26:34,044 ``` 2023-04-04T02:26:34,045 + ORM (now only simple queries are supported) 2023-04-04T02:26:34,046 ```python 2023-04-04T02:26:34,046 from sqlalchemy import create_engine, Column, Float, BigInteger, MetaData 2023-04-04T02:26:34,046 from sqlalchemy.ext.declarative import declarative_base 2023-04-04T02:26:34,047 from sqlalchemy.orm import sessionmaker 2023-04-04T02:26:34,047 metadata = MetaData( 2023-04-04T02:26:34,047 schema='root.factory' 2023-04-04T02:26:34,048 ) 2023-04-04T02:26:34,048 Base = declarative_base(metadata=metadata) 2023-04-04T02:26:34,049 class Device(Base): 2023-04-04T02:26:34,049 __tablename__ = "room2.device1" 2023-04-04T02:26:34,050 Time = Column(BigInteger, primary_key=True) 2023-04-04T02:26:34,050 temperature = Column(Float) 2023-04-04T02:26:34,050 status = Column(Float) 2023-04-04T02:26:34,051 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2023-04-04T02:26:34,052 DbSession = sessionmaker(bind=engine) 2023-04-04T02:26:34,052 session = DbSession() 2023-04-04T02:26:34,053 res = session.query(Device.status).filter(Device.temperature > 1) 2023-04-04T02:26:34,054 for row in res: 2023-04-04T02:26:34,054 print(row) 2023-04-04T02:26:34,054 ``` 2023-04-04T02:26:34,055 ## Developers 2023-04-04T02:26:34,056 ### Introduction 2023-04-04T02:26:34,056 This is an example of how to connect to IoTDB with python, using the thrift rpc interfaces. Things are almost the same on Windows or Linux, but pay attention to the difference like path separator. 2023-04-04T02:26:34,058 ### Prerequisites 2023-04-04T02:26:34,058 Python3.7 or later is preferred. 2023-04-04T02:26:34,059 You have to install Thrift (0.11.0 or later) to compile our thrift file into python code. Below is the official tutorial of installation, eventually, you should have a thrift executable. 2023-04-04T02:26:34,060 ``` 2023-04-04T02:26:34,060 http://thrift.apache.org/docs/install/ 2023-04-04T02:26:34,060 ``` 2023-04-04T02:26:34,061 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2023-04-04T02:26:34,061 ```shell 2023-04-04T02:26:34,061 pip install -r requirements_dev.txt 2023-04-04T02:26:34,062 ``` 2023-04-04T02:26:34,063 ### Compile the thrift library and Debug 2023-04-04T02:26:34,064 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2023-04-04T02:26:34,064 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2023-04-04T02:26:34,064 This folder is ignored from git and should **never be pushed to git!** 2023-04-04T02:26:34,065 **Notice** Do not upload `iotdb/thrift` to the git repo. 2023-04-04T02:26:34,067 ### Session Client & Example 2023-04-04T02:26:34,067 We packed up the Thrift interface in `client-py/src/iotdb/Session.py` (similar with its Java counterpart), also provided an example file `client-py/src/SessionExample.py` of how to use the session module. please read it carefully. 2023-04-04T02:26:34,068 Or, another simple example: 2023-04-04T02:26:34,069 ```python 2023-04-04T02:26:34,069 from iotdb.Session import Session 2023-04-04T02:26:34,070 ip = "127.0.0.1" 2023-04-04T02:26:34,070 port_ = "6667" 2023-04-04T02:26:34,071 username_ = "root" 2023-04-04T02:26:34,071 password_ = "root" 2023-04-04T02:26:34,071 session = Session(ip, port_, username_, password_) 2023-04-04T02:26:34,071 session.open(False) 2023-04-04T02:26:34,072 zone = session.get_time_zone() 2023-04-04T02:26:34,072 session.close() 2023-04-04T02:26:34,072 ``` 2023-04-04T02:26:34,074 ### Tests 2023-04-04T02:26:34,074 Please add your custom tests in `tests` folder. 2023-04-04T02:26:34,075 To run all defined tests just type `pytest .` in the root folder. 2023-04-04T02:26:34,075 **Notice** Some tests need docker to be started on your system as a test instance is started in a docker container using [testcontainers](https://testcontainers-python.readthedocs.io/en/latest/index.html). 2023-04-04T02:26:34,077 ### Futher Tools 2023-04-04T02:26:34,077 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2023-04-04T02:26:34,078 Both can be run by `black .` or `flake8 .` respectively. 2023-04-04T02:26:34,079 ## Releasing 2023-04-04T02:26:34,079 To do a release just ensure that you have the right set of generated thrift files. 2023-04-04T02:26:34,080 Then run linting and auto-formatting. 2023-04-04T02:26:34,080 Then, ensure that all tests work (via `pytest .`). 2023-04-04T02:26:34,080 Then you are good to go to do a release! 2023-04-04T02:26:34,082 ### Preparing your environment 2023-04-04T02:26:34,082 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2023-04-04T02:26:34,083 ### Doing the Release 2023-04-04T02:26:34,084 There is a convenient script `release.sh` to do all steps for a release. 2023-04-04T02:26:34,084 Namely, these are 2023-04-04T02:26:34,085 * Remove all transient directories from last release (if exists) 2023-04-04T02:26:34,085 * (Re-)generate all generated sources via mvn 2023-04-04T02:26:34,086 * Run Linting (flake8) 2023-04-04T02:26:34,086 * Run Tests via pytest 2023-04-04T02:26:34,086 * Build 2023-04-04T02:26:34,086 * Release to pypi 2023-04-04T02:26:34,127 running bdist_wheel 2023-04-04T02:26:34,207 running build 2023-04-04T02:26:34,207 running build_py 2023-04-04T02:26:34,226 creating build 2023-04-04T02:26:34,226 creating build/lib 2023-04-04T02:26:34,228 creating build/lib/iotdb 2023-04-04T02:26:34,230 copying iotdb/IoTDBContainer.py -> build/lib/iotdb 2023-04-04T02:26:34,234 copying iotdb/Session.py -> build/lib/iotdb 2023-04-04T02:26:34,241 copying iotdb/__init__.py -> build/lib/iotdb 2023-04-04T02:26:34,247 creating build/lib/tests 2023-04-04T02:26:34,248 copying tests/test_one_device.py -> build/lib/tests 2023-04-04T02:26:34,252 copying tests/test_tablet.py -> build/lib/tests 2023-04-04T02:26:34,256 copying tests/test_template.py -> build/lib/tests 2023-04-04T02:26:34,260 copying tests/test_session.py -> build/lib/tests 2023-04-04T02:26:34,264 copying tests/test_aligned_timeseries.py -> build/lib/tests 2023-04-04T02:26:34,269 copying tests/test_todf.py -> build/lib/tests 2023-04-04T02:26:34,273 copying tests/test_dataframe.py -> build/lib/tests 2023-04-04T02:26:34,276 copying tests/tablet_performance_comparison.py -> build/lib/tests 2023-04-04T02:26:34,281 copying tests/__init__.py -> build/lib/tests 2023-04-04T02:26:34,284 copying tests/test_numpy_tablet.py -> build/lib/tests 2023-04-04T02:26:34,288 copying tests/test_delete_data.py -> build/lib/tests 2023-04-04T02:26:34,294 creating build/lib/iotdb/utils 2023-04-04T02:26:34,295 copying iotdb/utils/SessionDataSet.py -> build/lib/iotdb/utils 2023-04-04T02:26:34,300 copying iotdb/utils/Field.py -> build/lib/iotdb/utils 2023-04-04T02:26:34,303 copying iotdb/utils/RowRecord.py -> build/lib/iotdb/utils 2023-04-04T02:26:34,307 copying iotdb/utils/NumpyTablet.py -> build/lib/iotdb/utils 2023-04-04T02:26:34,311 copying iotdb/utils/IoTDBRpcDataSet.py -> build/lib/iotdb/utils 2023-04-04T02:26:34,316 copying iotdb/utils/__init__.py -> build/lib/iotdb/utils 2023-04-04T02:26:34,320 copying iotdb/utils/IoTDBConstants.py -> build/lib/iotdb/utils 2023-04-04T02:26:34,323 copying iotdb/utils/BitMap.py -> build/lib/iotdb/utils 2023-04-04T02:26:34,327 copying iotdb/utils/Tablet.py -> build/lib/iotdb/utils 2023-04-04T02:26:34,332 creating build/lib/iotdb/tsfile 2023-04-04T02:26:34,334 copying iotdb/tsfile/__init__.py -> build/lib/iotdb/tsfile 2023-04-04T02:26:34,339 creating build/lib/iotdb/thrift 2023-04-04T02:26:34,340 copying iotdb/thrift/__init__.py -> build/lib/iotdb/thrift 2023-04-04T02:26:34,345 creating build/lib/iotdb/dbapi 2023-04-04T02:26:34,347 copying iotdb/dbapi/Connection.py -> build/lib/iotdb/dbapi 2023-04-04T02:26:34,351 copying iotdb/dbapi/Exceptions.py -> build/lib/iotdb/dbapi 2023-04-04T02:26:34,354 copying iotdb/dbapi/Cursor.py -> build/lib/iotdb/dbapi 2023-04-04T02:26:34,359 copying iotdb/dbapi/__init__.py -> build/lib/iotdb/dbapi 2023-04-04T02:26:34,364 creating build/lib/iotdb/sqlalchemy 2023-04-04T02:26:34,365 copying iotdb/sqlalchemy/IoTDBSQLCompiler.py -> build/lib/iotdb/sqlalchemy 2023-04-04T02:26:34,370 copying iotdb/sqlalchemy/IoTDBDialect.py -> build/lib/iotdb/sqlalchemy 2023-04-04T02:26:34,374 copying iotdb/sqlalchemy/IoTDBTypeCompiler.py -> build/lib/iotdb/sqlalchemy 2023-04-04T02:26:34,378 copying iotdb/sqlalchemy/IoTDBIdentifierPreparer.py -> build/lib/iotdb/sqlalchemy 2023-04-04T02:26:34,382 copying iotdb/sqlalchemy/__init__.py -> build/lib/iotdb/sqlalchemy 2023-04-04T02:26:34,387 creating build/lib/iotdb/template 2023-04-04T02:26:34,388 copying iotdb/template/Template.py -> build/lib/iotdb/template 2023-04-04T02:26:34,392 copying iotdb/template/TemplateQueryType.py -> build/lib/iotdb/template 2023-04-04T02:26:34,396 copying iotdb/template/MeasurementNode.py -> build/lib/iotdb/template 2023-04-04T02:26:34,399 copying iotdb/template/InternalNode.py -> build/lib/iotdb/template 2023-04-04T02:26:34,403 copying iotdb/template/TemplateNode.py -> build/lib/iotdb/template 2023-04-04T02:26:34,406 copying iotdb/template/__init__.py -> build/lib/iotdb/template 2023-04-04T02:26:34,411 creating build/lib/iotdb/tsfile/utils 2023-04-04T02:26:34,413 copying iotdb/tsfile/utils/ReadWriteIOUtils.py -> build/lib/iotdb/tsfile/utils 2023-04-04T02:26:34,417 copying iotdb/tsfile/utils/Pair.py -> build/lib/iotdb/tsfile/utils 2023-04-04T02:26:34,420 copying iotdb/tsfile/utils/__init__.py -> build/lib/iotdb/tsfile/utils 2023-04-04T02:26:34,425 creating build/lib/iotdb/tsfile/common 2023-04-04T02:26:34,427 copying iotdb/tsfile/common/__init__.py -> build/lib/iotdb/tsfile/common 2023-04-04T02:26:34,432 creating build/lib/iotdb/tsfile/common/constant 2023-04-04T02:26:34,433 copying iotdb/tsfile/common/constant/TsFileConstant.py -> build/lib/iotdb/tsfile/common/constant 2023-04-04T02:26:34,437 copying iotdb/tsfile/common/constant/__init__.py -> build/lib/iotdb/tsfile/common/constant 2023-04-04T02:26:34,442 creating build/lib/iotdb/thrift/rpc 2023-04-04T02:26:34,444 copying iotdb/thrift/rpc/IClientRPCService.py -> build/lib/iotdb/thrift/rpc 2023-04-04T02:26:34,469 copying iotdb/thrift/rpc/constants.py -> build/lib/iotdb/thrift/rpc 2023-04-04T02:26:34,473 copying iotdb/thrift/rpc/ttypes.py -> build/lib/iotdb/thrift/rpc 2023-04-04T02:26:34,491 copying iotdb/thrift/rpc/__init__.py -> build/lib/iotdb/thrift/rpc 2023-04-04T02:26:34,496 creating build/lib/iotdb/thrift/common 2023-04-04T02:26:34,498 copying iotdb/thrift/common/constants.py -> build/lib/iotdb/thrift/common 2023-04-04T02:26:34,502 copying iotdb/thrift/common/ttypes.py -> build/lib/iotdb/thrift/common 2023-04-04T02:26:34,509 copying iotdb/thrift/common/__init__.py -> build/lib/iotdb/thrift/common 2023-04-04T02:26:34,514 creating build/lib/iotdb/thrift/datanode 2023-04-04T02:26:34,516 copying iotdb/thrift/datanode/IDataNodeRPCService.py -> build/lib/iotdb/thrift/datanode 2023-04-04T02:26:34,545 copying iotdb/thrift/datanode/constants.py -> build/lib/iotdb/thrift/datanode 2023-04-04T02:26:34,549 copying iotdb/thrift/datanode/ttypes.py -> build/lib/iotdb/thrift/datanode 2023-04-04T02:26:34,565 copying iotdb/thrift/datanode/__init__.py -> build/lib/iotdb/thrift/datanode 2023-04-04T02:26:34,568 copying iotdb/thrift/datanode/MPPDataExchangeService.py -> build/lib/iotdb/thrift/datanode 2023-04-04T02:26:34,575 creating build/lib/iotdb/dbapi/tests 2023-04-04T02:26:34,577 copying iotdb/dbapi/tests/test_cursor.py -> build/lib/iotdb/dbapi/tests 2023-04-04T02:26:34,581 copying iotdb/dbapi/tests/test_connection.py -> build/lib/iotdb/dbapi/tests 2023-04-04T02:26:34,584 copying iotdb/dbapi/tests/__init__.py -> build/lib/iotdb/dbapi/tests 2023-04-04T02:26:34,589 creating build/lib/iotdb/sqlalchemy/tests 2023-04-04T02:26:34,591 copying iotdb/sqlalchemy/tests/__init__.py -> build/lib/iotdb/sqlalchemy/tests 2023-04-04T02:26:34,594 copying iotdb/sqlalchemy/tests/test_dialect.py -> build/lib/iotdb/sqlalchemy/tests 2023-04-04T02:26:34,654 installing to build/bdist.linux-armv7l/wheel 2023-04-04T02:26:34,655 running install 2023-04-04T02:26:34,716 running install_lib 2023-04-04T02:26:34,734 creating build/bdist.linux-armv7l 2023-04-04T02:26:34,735 creating build/bdist.linux-armv7l/wheel 2023-04-04T02:26:34,738 creating build/bdist.linux-armv7l/wheel/iotdb 2023-04-04T02:26:34,742 creating build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,744 copying build/lib/iotdb/utils/SessionDataSet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,749 copying build/lib/iotdb/utils/Field.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,753 copying build/lib/iotdb/utils/RowRecord.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,757 copying build/lib/iotdb/utils/NumpyTablet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,762 copying build/lib/iotdb/utils/IoTDBRpcDataSet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,767 copying build/lib/iotdb/utils/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,771 copying build/lib/iotdb/utils/IoTDBConstants.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,775 copying build/lib/iotdb/utils/BitMap.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,779 copying build/lib/iotdb/utils/Tablet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2023-04-04T02:26:34,784 copying build/lib/iotdb/IoTDBContainer.py -> build/bdist.linux-armv7l/wheel/iotdb 2023-04-04T02:26:34,790 creating build/bdist.linux-armv7l/wheel/iotdb/tsfile 2023-04-04T02:26:34,793 creating build/bdist.linux-armv7l/wheel/iotdb/tsfile/utils 2023-04-04T02:26:34,795 copying build/lib/iotdb/tsfile/utils/ReadWriteIOUtils.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/utils 2023-04-04T02:26:34,799 copying build/lib/iotdb/tsfile/utils/Pair.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/utils 2023-04-04T02:26:34,803 copying build/lib/iotdb/tsfile/utils/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/utils 2023-04-04T02:26:34,807 copying build/lib/iotdb/tsfile/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile 2023-04-04T02:26:34,812 creating build/bdist.linux-armv7l/wheel/iotdb/tsfile/common 2023-04-04T02:26:34,815 creating build/bdist.linux-armv7l/wheel/iotdb/tsfile/common/constant 2023-04-04T02:26:34,817 copying build/lib/iotdb/tsfile/common/constant/TsFileConstant.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/common/constant 2023-04-04T02:26:34,822 copying build/lib/iotdb/tsfile/common/constant/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/common/constant 2023-04-04T02:26:34,826 copying build/lib/iotdb/tsfile/common/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/common 2023-04-04T02:26:34,830 copying build/lib/iotdb/Session.py -> build/bdist.linux-armv7l/wheel/iotdb 2023-04-04T02:26:34,837 copying build/lib/iotdb/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb 2023-04-04T02:26:34,842 creating build/bdist.linux-armv7l/wheel/iotdb/thrift 2023-04-04T02:26:34,844 creating build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-04-04T02:26:34,846 copying build/lib/iotdb/thrift/rpc/IClientRPCService.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-04-04T02:26:34,869 copying build/lib/iotdb/thrift/rpc/constants.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-04-04T02:26:34,873 copying build/lib/iotdb/thrift/rpc/ttypes.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-04-04T02:26:34,893 copying build/lib/iotdb/thrift/rpc/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2023-04-04T02:26:34,897 copying build/lib/iotdb/thrift/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift 2023-04-04T02:26:34,902 creating build/bdist.linux-armv7l/wheel/iotdb/thrift/common 2023-04-04T02:26:34,904 copying build/lib/iotdb/thrift/common/constants.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/common 2023-04-04T02:26:34,908 copying build/lib/iotdb/thrift/common/ttypes.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/common 2023-04-04T02:26:34,916 copying build/lib/iotdb/thrift/common/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/common 2023-04-04T02:26:34,922 creating build/bdist.linux-armv7l/wheel/iotdb/thrift/datanode 2023-04-04T02:26:34,924 copying build/lib/iotdb/thrift/datanode/IDataNodeRPCService.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/datanode 2023-04-04T02:26:34,949 copying build/lib/iotdb/thrift/datanode/constants.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/datanode 2023-04-04T02:26:34,953 copying build/lib/iotdb/thrift/datanode/ttypes.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/datanode 2023-04-04T02:26:34,969 copying build/lib/iotdb/thrift/datanode/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/datanode 2023-04-04T02:26:34,973 copying build/lib/iotdb/thrift/datanode/MPPDataExchangeService.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/datanode 2023-04-04T02:26:34,979 creating build/bdist.linux-armv7l/wheel/iotdb/dbapi 2023-04-04T02:26:34,981 copying build/lib/iotdb/dbapi/Connection.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi 2023-04-04T02:26:34,985 copying build/lib/iotdb/dbapi/Exceptions.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi 2023-04-04T02:26:34,988 copying build/lib/iotdb/dbapi/Cursor.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi 2023-04-04T02:26:34,995 creating build/bdist.linux-armv7l/wheel/iotdb/dbapi/tests 2023-04-04T02:26:34,997 copying build/lib/iotdb/dbapi/tests/test_cursor.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi/tests 2023-04-04T02:26:35,002 copying build/lib/iotdb/dbapi/tests/test_connection.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi/tests 2023-04-04T02:26:35,006 copying build/lib/iotdb/dbapi/tests/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi/tests 2023-04-04T02:26:35,009 copying build/lib/iotdb/dbapi/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi 2023-04-04T02:26:35,014 creating build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2023-04-04T02:26:35,016 copying build/lib/iotdb/sqlalchemy/IoTDBSQLCompiler.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2023-04-04T02:26:35,021 copying build/lib/iotdb/sqlalchemy/IoTDBDialect.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2023-04-04T02:26:35,025 copying build/lib/iotdb/sqlalchemy/IoTDBTypeCompiler.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2023-04-04T02:26:35,029 copying build/lib/iotdb/sqlalchemy/IoTDBIdentifierPreparer.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2023-04-04T02:26:35,034 creating build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy/tests 2023-04-04T02:26:35,036 copying build/lib/iotdb/sqlalchemy/tests/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy/tests 2023-04-04T02:26:35,040 copying build/lib/iotdb/sqlalchemy/tests/test_dialect.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy/tests 2023-04-04T02:26:35,044 copying build/lib/iotdb/sqlalchemy/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2023-04-04T02:26:35,049 creating build/bdist.linux-armv7l/wheel/iotdb/template 2023-04-04T02:26:35,050 copying build/lib/iotdb/template/Template.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2023-04-04T02:26:35,055 copying build/lib/iotdb/template/TemplateQueryType.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2023-04-04T02:26:35,058 copying build/lib/iotdb/template/MeasurementNode.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2023-04-04T02:26:35,062 copying build/lib/iotdb/template/InternalNode.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2023-04-04T02:26:35,066 copying build/lib/iotdb/template/TemplateNode.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2023-04-04T02:26:35,069 copying build/lib/iotdb/template/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2023-04-04T02:26:35,074 creating build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,076 copying build/lib/tests/test_one_device.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,080 copying build/lib/tests/test_tablet.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,084 copying build/lib/tests/test_template.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,088 copying build/lib/tests/test_session.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,093 copying build/lib/tests/test_aligned_timeseries.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,098 copying build/lib/tests/test_todf.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,102 copying build/lib/tests/test_dataframe.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,106 copying build/lib/tests/tablet_performance_comparison.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,110 copying build/lib/tests/__init__.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,114 copying build/lib/tests/test_numpy_tablet.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,118 copying build/lib/tests/test_delete_data.py -> build/bdist.linux-armv7l/wheel/tests 2023-04-04T02:26:35,122 running install_egg_info 2023-04-04T02:26:35,182 running egg_info 2023-04-04T02:26:35,192 writing apache_iotdb.egg-info/PKG-INFO 2023-04-04T02:26:35,198 writing dependency_links to apache_iotdb.egg-info/dependency_links.txt 2023-04-04T02:26:35,202 writing entry points to apache_iotdb.egg-info/entry_points.txt 2023-04-04T02:26:35,205 writing requirements to apache_iotdb.egg-info/requires.txt 2023-04-04T02:26:35,207 writing top-level names to apache_iotdb.egg-info/top_level.txt 2023-04-04T02:26:35,247 reading manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2023-04-04T02:26:35,255 adding license file 'LICENSE' 2023-04-04T02:26:35,269 writing manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2023-04-04T02:26:35,272 Copying apache_iotdb.egg-info to build/bdist.linux-armv7l/wheel/apache_iotdb-1.1.0-py3.7.egg-info 2023-04-04T02:26:35,297 running install_scripts 2023-04-04T02:26:35,346 creating build/bdist.linux-armv7l/wheel/apache_iotdb-1.1.0.dist-info/WHEEL 2023-04-04T02:26:35,351 creating '/tmp/pip-wheel-8vdqb6w0/.tmp-ogs2xu8a/apache_iotdb-1.1.0-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-04-04T02:26:35,359 adding 'iotdb/IoTDBContainer.py' 2023-04-04T02:26:35,372 adding 'iotdb/Session.py' 2023-04-04T02:26:35,375 adding 'iotdb/__init__.py' 2023-04-04T02:26:35,380 adding 'iotdb/dbapi/Connection.py' 2023-04-04T02:26:35,383 adding 'iotdb/dbapi/Cursor.py' 2023-04-04T02:26:35,386 adding 'iotdb/dbapi/Exceptions.py' 2023-04-04T02:26:35,389 adding 'iotdb/dbapi/__init__.py' 2023-04-04T02:26:35,392 adding 'iotdb/dbapi/tests/__init__.py' 2023-04-04T02:26:35,395 adding 'iotdb/dbapi/tests/test_connection.py' 2023-04-04T02:26:35,398 adding 'iotdb/dbapi/tests/test_cursor.py' 2023-04-04T02:26:35,402 adding 'iotdb/sqlalchemy/IoTDBDialect.py' 2023-04-04T02:26:35,405 adding 'iotdb/sqlalchemy/IoTDBIdentifierPreparer.py' 2023-04-04T02:26:35,409 adding 'iotdb/sqlalchemy/IoTDBSQLCompiler.py' 2023-04-04T02:26:35,412 adding 'iotdb/sqlalchemy/IoTDBTypeCompiler.py' 2023-04-04T02:26:35,414 adding 'iotdb/sqlalchemy/__init__.py' 2023-04-04T02:26:35,418 adding 'iotdb/sqlalchemy/tests/__init__.py' 2023-04-04T02:26:35,421 adding 'iotdb/sqlalchemy/tests/test_dialect.py' 2023-04-04T02:26:35,425 adding 'iotdb/template/InternalNode.py' 2023-04-04T02:26:35,427 adding 'iotdb/template/MeasurementNode.py' 2023-04-04T02:26:35,430 adding 'iotdb/template/Template.py' 2023-04-04T02:26:35,433 adding 'iotdb/template/TemplateNode.py' 2023-04-04T02:26:35,435 adding 'iotdb/template/TemplateQueryType.py' 2023-04-04T02:26:35,438 adding 'iotdb/template/__init__.py' 2023-04-04T02:26:35,441 adding 'iotdb/thrift/__init__.py' 2023-04-04T02:26:35,445 adding 'iotdb/thrift/common/__init__.py' 2023-04-04T02:26:35,447 adding 'iotdb/thrift/common/constants.py' 2023-04-04T02:26:35,455 adding 'iotdb/thrift/common/ttypes.py' 2023-04-04T02:26:35,490 adding 'iotdb/thrift/datanode/IDataNodeRPCService.py' 2023-04-04T02:26:35,503 adding 'iotdb/thrift/datanode/MPPDataExchangeService.py' 2023-04-04T02:26:35,506 adding 'iotdb/thrift/datanode/__init__.py' 2023-04-04T02:26:35,509 adding 'iotdb/thrift/datanode/constants.py' 2023-04-04T02:26:35,537 adding 'iotdb/thrift/datanode/ttypes.py' 2023-04-04T02:26:35,573 adding 'iotdb/thrift/rpc/IClientRPCService.py' 2023-04-04T02:26:35,583 adding 'iotdb/thrift/rpc/__init__.py' 2023-04-04T02:26:35,585 adding 'iotdb/thrift/rpc/constants.py' 2023-04-04T02:26:35,614 adding 'iotdb/thrift/rpc/ttypes.py' 2023-04-04T02:26:35,623 adding 'iotdb/tsfile/__init__.py' 2023-04-04T02:26:35,627 adding 'iotdb/tsfile/common/__init__.py' 2023-04-04T02:26:35,631 adding 'iotdb/tsfile/common/constant/TsFileConstant.py' 2023-04-04T02:26:35,633 adding 'iotdb/tsfile/common/constant/__init__.py' 2023-04-04T02:26:35,637 adding 'iotdb/tsfile/utils/Pair.py' 2023-04-04T02:26:35,640 adding 'iotdb/tsfile/utils/ReadWriteIOUtils.py' 2023-04-04T02:26:35,642 adding 'iotdb/tsfile/utils/__init__.py' 2023-04-04T02:26:35,646 adding 'iotdb/utils/BitMap.py' 2023-04-04T02:26:35,650 adding 'iotdb/utils/Field.py' 2023-04-04T02:26:35,652 adding 'iotdb/utils/IoTDBConstants.py' 2023-04-04T02:26:35,657 adding 'iotdb/utils/IoTDBRpcDataSet.py' 2023-04-04T02:26:35,661 adding 'iotdb/utils/NumpyTablet.py' 2023-04-04T02:26:35,664 adding 'iotdb/utils/RowRecord.py' 2023-04-04T02:26:35,667 adding 'iotdb/utils/SessionDataSet.py' 2023-04-04T02:26:35,670 adding 'iotdb/utils/Tablet.py' 2023-04-04T02:26:35,673 adding 'iotdb/utils/__init__.py' 2023-04-04T02:26:35,677 adding 'tests/__init__.py' 2023-04-04T02:26:35,681 adding 'tests/tablet_performance_comparison.py' 2023-04-04T02:26:35,685 adding 'tests/test_aligned_timeseries.py' 2023-04-04T02:26:35,688 adding 'tests/test_dataframe.py' 2023-04-04T02:26:35,691 adding 'tests/test_delete_data.py' 2023-04-04T02:26:35,694 adding 'tests/test_numpy_tablet.py' 2023-04-04T02:26:35,698 adding 'tests/test_one_device.py' 2023-04-04T02:26:35,702 adding 'tests/test_session.py' 2023-04-04T02:26:35,705 adding 'tests/test_tablet.py' 2023-04-04T02:26:35,708 adding 'tests/test_template.py' 2023-04-04T02:26:35,711 adding 'tests/test_todf.py' 2023-04-04T02:26:35,716 adding 'apache_iotdb-1.1.0.dist-info/LICENSE' 2023-04-04T02:26:35,723 adding 'apache_iotdb-1.1.0.dist-info/METADATA' 2023-04-04T02:26:35,726 adding 'apache_iotdb-1.1.0.dist-info/WHEEL' 2023-04-04T02:26:35,728 adding 'apache_iotdb-1.1.0.dist-info/entry_points.txt' 2023-04-04T02:26:35,729 adding 'apache_iotdb-1.1.0.dist-info/top_level.txt' 2023-04-04T02:26:35,733 adding 'apache_iotdb-1.1.0.dist-info/RECORD' 2023-04-04T02:26:35,743 removing build/bdist.linux-armv7l/wheel 2023-04-04T02:26:35,790 /tmp/pip-build-env-5ggwxfha/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'website' 2023-04-04T02:26:35,791 warnings.warn(msg) 2023-04-04T02:26:35,923 Building wheel for apache-iotdb (pyproject.toml): finished with status 'done' 2023-04-04T02:26:35,948 Created wheel for apache-iotdb: filename=apache_iotdb-1.1.0-py3-none-any.whl size=154875 sha256=17b0261e5e0602df730baf1bdd055750c850a2fd0163d2ce09d0083dfcf169f4 2023-04-04T02:26:35,951 Stored in directory: /tmp/pip-ephem-wheel-cache-e113_bt4/wheels/c6/ec/12/a8bb808c94807147f44e15f2e87797f9f94b5b9b1906c04cf8 2023-04-04T02:26:35,989 Successfully built apache-iotdb 2023-04-04T02:26:36,010 Removed build tracker: '/tmp/pip-build-tracker-bjwlcw98'