Async and sync http MyScale client for python 3.6+
Project description
MyScale Database Client
myscaledb-client
is an async/sync http(s) MyScale client for python 3.6+ supporting
type conversion in both directions, streaming, lazy decoding on select queries,
and a fully typed interface.
Table of Contents
Installation
We recommend you to install it with command:
pip install myscaledb-client
Quick Start
Connecting to MyScale
The quickest way to get up and running with myscaledb-client
is to simply connect
and check MyScale is alive.
# This is a demo using Client.
# Client works in sync mode and is simple to use.
from myscaledb import Client
def main():
client = Client(url='http://localhost:8123')
alive = client.is_alive()
print(f"Is MyScale alive? -> {alive}")
if __name__ == '__main__':
main()
Querying the database
Create a table with 4 dimensional vectors:
client.execute(
"""CREATE TABLE default.test
(
id UInt64,
name String,
vector FixedArray(Float32, 4)
)
ENGINE = MergeTree ORDER BY id"""
)
View all tables in current database:
res = client.fetch(query="show tables")
print([row[0] for row in res])
Documentation
To check out the API docs, visit the readthedocs site.
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
Built Distribution
File details
Details for the file myscaledb-client-2.0.6.tar.gz
.
File metadata
- Download URL: myscaledb-client-2.0.6.tar.gz
- Upload date:
- Size: 32.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad6e06850aaf6660194e1961381efe30416a524f7ab592551a18864439429cc1 |
|
MD5 | 43db641f5cdbcbf716f76d4350974124 |
|
BLAKE2b-256 | 48ca69607c44e0789d1c512d374ecf1c914c2ac48a47e1aafa789b0aee0615c4 |
File details
Details for the file myscaledb_client-2.0.6-py3-none-any.whl
.
File metadata
- Download URL: myscaledb_client-2.0.6-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d61277a8ba4dea0628c72b38668bb5968e9b71d6e7dc00443bf1ede5d1f2131 |
|
MD5 | 0deb6021ceb3a16adaa2e515f7adfafc |
|
BLAKE2b-256 | e8a056d4e84f3c286adf726357288b1ae1887c574f2a60cdaefdc02be4cf4de9 |