Skip to content

newskooler/py-questdb-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuestDB Client Library for Python

This library makes it easy to insert data into QuestDB.

This client library implements QuestDB's variant of the InfluxDB Line Protocol (ILP) over TCP.

ILP provides the fastest way to insert data into QuestDB.

This implementation supports authentication and full-connection encryption with TLS.

Quickstart

The latest version of the library is 1.1.0.

python3 -m pip install questdb
from questdb.ingress import Sender

with Sender('localhost', 9009) as sender:
    sender.row(
        'sensors',
        symbols={'id': 'toronto1'},
        columns={'temperature': 20.0, 'humidity': 0.5})
    sender.flush()

You can also send Pandas dataframes:

import pandas as pd
from questdb.ingress import Sender

df = pd.DataFrame({
    'id': pd.Categorical(['toronto1', 'paris3']),
    'temperature': [20.0, 21.0],
    'humidity': [0.5, 0.6],
    'timestamp': pd.to_datetime(['2021-01-01', '2021-01-02'])'})

with Sender('localhost', 9009) as sender:
    sender.dataframe(df, table_name='sensors')

Docs

https://py-questdb-client.readthedocs.io/

Code

https://github.com/questdb/py-questdb-client

Package on PyPI

https://pypi.org/project/questdb/

Community

If you need help, have additional questions or want to provide feedback, you may find us on Slack.

You can also sign up to our mailing list to get notified of new releases.

License

The code is released under the Apache License 2.0.

About

Python client for QuestDB InfluxDB Line Protocol over TCP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 60.7%
  • Cython 33.5%
  • Rust 4.3%
  • C 1.4%
  • C++ 0.1%
  • Shell 0.0%