Skip to main content

MyScale Database Client

PyPI version Documentation Status

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.

Metadata

Release files for myscaledb-client 2.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for myscaledb-client 2.0.6
File Size Uploaded
myscaledb-client-2.0.6.tar.gz 32.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for myscaledb-client 2.0.6
File Interpreter ABI Platform
myscaledb_client-2.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 64.0 kB

Release files / myscaledb-client-2.0.6.tar.gz

Download URL myscaledb-client-2.0.6.tar.gz
Size 32.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ad6e06850aaf6660194e1961381efe30416a524f7ab592551a18864439429cc1
BLAKE2b-256 checksum
How to use checksums
48ca69607c44e0789d1c512d374ecf1c914c2ac48a47e1aafa789b0aee0615c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / myscaledb_client-2.0.6-py3-none-any.whl

Download URL myscaledb_client-2.0.6-py3-none-any.whl
Size 31.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d61277a8ba4dea0628c72b38668bb5968e9b71d6e7dc00443bf1ede5d1f2131
BLAKE2b-256 checksum
How to use checksums
e8a056d4e84f3c286adf726357288b1ae1887c574f2a60cdaefdc02be4cf4de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

2.0.6 This release

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page