A small iotdb python client
Project description
Python package for IoTDB
This module contains the missing parts from the apache-iotdb
package which can be found here https://pypi.org/project/apache-iotdb/.
Example
Just install the package via pip install iotdb-session-0.10.1
.
The sessions API can be used via:
from iotdb_session.Session import Session
ip = "127.0.0.1"
port_ = "6667"
username_ = 'root'
password_ = 'root'
session = Session(ip, port_, username_, password_)
session.open(False)
zone = session.get_time_zone()
session.close()
self.assertEqual("+08:00", zone)
Test Support for IoTDB
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.
To start (and stop) an IoTDB Database in a Docker container simply do:
class MyTestCase(unittest.TestCase):
def test_something(self):
with IoTDBContainer() as c:
session = Session('localhost', c.get_exposed_port(6667), 'root', 'root')
session.open(False)
result = session.execute_query_statement("SHOW TIMESERIES")
print(result)
session.close()
Release Notes
0.1.4 - Improved Testcontainer:
- Use real containerip
- Use Tag 0.10.1 not latest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
iotdb-session-0.10.1-0.1.4.tar.gz
(13.3 kB
view hashes)
Built Distribution
Close
Hashes for iotdb-session-0.10.1-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a58ff0474ff43a6f3cd0b82d077c711d432bb83c4aac7985d67a1dfe4606827 |
|
MD5 | 18fd81fdac487cffc3fc8e5906da3ecd |
|
BLAKE2b-256 | cd4254113b79e03130313847f0594a1bc79f43561e74eaddd97fdeb817987d5a |
Close
Hashes for iotdb_session_0.10.1-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c842e23ed5ecfbd0a8953c57cf99d5f14244ea9991dc8d0d34480ac371d6404 |
|
MD5 | 3e11369a6496615c67d66670e386d9cf |
|
BLAKE2b-256 | 8b4f53ba0dca3c7c2bcffc643c6877ae509b526251d2f17efd6d4c48a9e20f08 |