Skip to main content

Mireo SpaceTime MSQL connector

Project description

Mireo SpaceTime MSQL connector

msql-driver is a Python module for querying a Mireo SpaceTime database using the MSQL query language.

Features

  • Both blocking and asynchronous modes of operation.
  • Query results are convertible to Python lists, NumPy arrays, and Pandas dataframes.
  • Streamlit integration with support for asynchronous querying.
  • Type stubs included — full IDE autocompletion and type checking.
  • Requires CPython 3.10+.
  • Available for Linux (glibc 2.17+ and musl 1.2+; x86-64 and arm64), Windows (x86-64 and arm64), and macOS (10.12+ x86-64 and 11.0+ arm64).

Installation

pip install -U msql-driver

Conversions to NumPy or Pandas data types require optional dependencies:

pip install -U msql-driver[numpy]
pip install -U msql-driver[pandas]

Install optional dependencies for all available conversions:

pip install -U msql-driver[convert]

Streamlit integration requires an optional dependency:

pip install -U msql-driver[streamlit]

Install all optional dependencies using:

pip install -U msql-driver[all]

Example

import msql_driver

# Connect
session = msql_driver.SessionConfig().host(<address>).user(<org>, <user>, <password>).build()
print(session.status())  # SessionStatus.Connected

# Run a query (returns one Rows object per result set)
res, = session.run_query("select * from st.segment limit 10")

# Print column names, MSQL data types, and nullability
print(res.row_type.columns)

# Iterating over rows lazily converts each to a tuple of native Python types
for row in res:
    print(row)

# Or convert the whole result at once:
rows = res.to_list()    # list of tuples of native Python types
arr = res.to_numpy()    # NumPy array (requires numpy)
df = res.to_pandas()    # Pandas dataframe (requires pandas)

# Cancellable query execution
result, cancel = session.submit_query("select * from st.segment")
# ... cancel.cancel() to abort
res_list = result.try_get()  # non-blocking, returns None if not ready
res_list = result.get()      # blocks until ready

# Disconnect
session.stop()
print(session.status())  # SessionStatus.Stopped

License

Licensed under BSD 3-Clause "New" or "Revised" License.

Credits

Authored and maintained by Mireo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

msql_driver-0.10.0-cp310-abi3-win_arm64.whl (915.5 kB view details)

Uploaded CPython 3.10+Windows ARM64

msql_driver-0.10.0-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

msql_driver-0.10.0-cp310-abi3-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

msql_driver-0.10.0-cp310-abi3-musllinux_1_2_aarch64.whl (972.4 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

msql_driver-0.10.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

msql_driver-0.10.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (972.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

msql_driver-0.10.0-cp310-abi3-macosx_11_0_arm64.whl (916.0 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

msql_driver-0.10.0-cp310-abi3-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file msql_driver-0.10.0-cp310-abi3-win_arm64.whl.

File metadata

  • Download URL: msql_driver-0.10.0-cp310-abi3-win_arm64.whl
  • Upload date:
  • Size: 915.5 kB
  • Tags: CPython 3.10+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for msql_driver-0.10.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 1ab8b4b7ebb637942e0a50ef6b6f05560ce0c02ad262d070aae9389fb5854c43
MD5 ab44cd78b0909111d8ee068139823d42
BLAKE2b-256 793e8e4c6a4f6e5282d70ca6d8c193352824fc99a7a9d4315efd181ccef395ab

See more details on using hashes here.

File details

Details for the file msql_driver-0.10.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: msql_driver-0.10.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for msql_driver-0.10.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9a57d31405a83631b4b545bdb41d410c05dda269a4d5408c6e1182aebaf33ba6
MD5 150d153ca9f987a2854a21d865bc2080
BLAKE2b-256 bc2d2e9b59f1bcabc0ccfaf389089a965185660e6822ba67fe9472dbc1d6d36a

See more details on using hashes here.

File details

Details for the file msql_driver-0.10.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: msql_driver-0.10.0-cp310-abi3-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for msql_driver-0.10.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 04284fa4fef3dcebf1751626562880b9e01f3bff5e94c9e9d2710d44ce790348
MD5 fee8aba97721e2eb06f0c35ec1ba0872
BLAKE2b-256 46c098bbb01c47d1e1e9dc4440b0b5801d0e8332567f64f17b955987497b6622

See more details on using hashes here.

File details

Details for the file msql_driver-0.10.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

  • Download URL: msql_driver-0.10.0-cp310-abi3-musllinux_1_2_aarch64.whl
  • Upload date:
  • Size: 972.4 kB
  • Tags: CPython 3.10+, musllinux: musl 1.2+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for msql_driver-0.10.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 128bea64a863f2e980c6628f72e8a582971e51889aa46a2c87ebe13dd644eec1
MD5 ca1212156413ec45d4fa48c6afe1ddf3
BLAKE2b-256 6accfd541ac1f770d3f8e656ab3b8a0446b6f1a2b4958a759cfa9d66d777f1cc

See more details on using hashes here.

File details

Details for the file msql_driver-0.10.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: msql_driver-0.10.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for msql_driver-0.10.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1f51aa00c51c0a0cd4fe3329aaf2235b59f51c930e41536fce6f84fbc361597c
MD5 cc7ea6e06f5fa1d4436582168ac822f5
BLAKE2b-256 bb0ca206eb0a92d04d306c9983b1a582ad37dacd71ba61dfe8f69b5f4b59894e

See more details on using hashes here.

File details

Details for the file msql_driver-0.10.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: msql_driver-0.10.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 972.3 kB
  • Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for msql_driver-0.10.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3d04ba0aa2185ce7f4c01fecfe3176f37575faddb0e74bd7a0c6b2f1e4fc097c
MD5 82b074be25e383db9486ca502505d9c4
BLAKE2b-256 4a768f6a9b6c64549eab0df81cb2511ec3802aab2e1fa3bcd6c573c8fc81bc8f

See more details on using hashes here.

File details

Details for the file msql_driver-0.10.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: msql_driver-0.10.0-cp310-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 916.0 kB
  • Tags: CPython 3.10+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for msql_driver-0.10.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa670d8eaf738d7a45aff295aff61715c545aadaf32fe8b57a7b19035e443838
MD5 a42edec979d4d983921bc0e9f92fd318
BLAKE2b-256 a2af060e5d2a8e124e850409351c16355fa3b75e7a1f0ea0f987e81cce003683

See more details on using hashes here.

File details

Details for the file msql_driver-0.10.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: msql_driver-0.10.0-cp310-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.10+, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for msql_driver-0.10.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5f06024f9ef5bd4112db1174672c352c9f5ddc658a5aea0f3bde67b55d1af2bb
MD5 d5fadf9a8ab43b7a84fb3fdae0d6be5d
BLAKE2b-256 6fdde1a917061be0af18959eaa382088a612904937558c0c6d1834e5d53aef2d

See more details on using hashes here.

Supported by

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