client for the tourbillon service
Project description
# Tourbillon Client
## Usage
### Connection
```python
from tourbillon_client import Client
client = Client('http[s]://<tourbillon instance>[:<tourbillon port>]/')
```
### Create a table
```python
client.create('ham')
```
### Delete a table
```python
client.delete('ham')
```
### Write data to a table
```python
client.create('ham')
sample_data = [
('2016-11-03 01:00', 10),
('2016-11-03 02:00', 20),
('2016-11-03 04:00', 40),
('2016-11-03 05:00', 50),
]
client.write('ham', sample_data)
```
### Read back data
```python
result = client.read('ham', '2016-11-01', '2016-11-05')
print(result)
# value
# index
# 2016-11-03 01:00:00 10
# 2016-11-03 02:00:00 20
# 2016-11-03 04:00:00 40
# 2016-11-03 05:00:00 50
```
## Usage
### Connection
```python
from tourbillon_client import Client
client = Client('http[s]://<tourbillon instance>[:<tourbillon port>]/')
```
### Create a table
```python
client.create('ham')
```
### Delete a table
```python
client.delete('ham')
```
### Write data to a table
```python
client.create('ham')
sample_data = [
('2016-11-03 01:00', 10),
('2016-11-03 02:00', 20),
('2016-11-03 04:00', 40),
('2016-11-03 05:00', 50),
]
client.write('ham', sample_data)
```
### Read back data
```python
result = client.read('ham', '2016-11-01', '2016-11-05')
print(result)
# value
# index
# 2016-11-03 01:00:00 10
# 2016-11-03 02:00:00 20
# 2016-11-03 04:00:00 40
# 2016-11-03 05:00:00 50
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file tourbillon-client-0.0.1.dev3.tar.gz
.
File metadata
- Download URL: tourbillon-client-0.0.1.dev3.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75f6a438a6b8e8108b7f0862f2b4f5e2c6ac6adb3a8b92995a471081f4f9dc55 |
|
MD5 | 330c2f9b616b3335bc17cd86e46bcf8c |
|
BLAKE2b-256 | 618d1e66e25c74e86601f654bcfccc1335d40c73ff4add597c85580ad94d9004 |