Skip to main content

Async and sync http MyScale client for python 3.6+

Project description

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.

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

myscaledb-client-2.0.6.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

myscaledb_client-2.0.6-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

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

Hashes for myscaledb-client-2.0.6.tar.gz
Algorithm Hash digest
SHA256 ad6e06850aaf6660194e1961381efe30416a524f7ab592551a18864439429cc1
MD5 43db641f5cdbcbf716f76d4350974124
BLAKE2b-256 48ca69607c44e0789d1c512d374ecf1c914c2ac48a47e1aafa789b0aee0615c4

See more details on using hashes here.

File details

Details for the file myscaledb_client-2.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for myscaledb_client-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3d61277a8ba4dea0628c72b38668bb5968e9b71d6e7dc00443bf1ede5d1f2131
MD5 0deb6021ceb3a16adaa2e515f7adfafc
BLAKE2b-256 e8a056d4e84f3c286adf726357288b1ae1887c574f2a60cdaefdc02be4cf4de9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page