Metadata-Version: 2.4
Name: stdb-driver
Version: 0.4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Rust
Classifier: Topic :: Database
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development
Classifier: Typing :: Typed
Requires-Dist: numpy~=2.2 ; extra == 'numpy'
Requires-Dist: pandas~=2.3 ; extra == 'pandas'
Requires-Dist: stdb-driver[numpy,pandas] ; extra == 'convert'
Requires-Dist: stdb-driver[numpy,pandas] ; extra == 'all'
Provides-Extra: numpy
Provides-Extra: pandas
Provides-Extra: convert
Provides-Extra: all
License-File: LICENSE.txt
Summary: Mireo SpaceTime database connector
Keywords: mireo,spacetime,database,connector,table,schema,ingest,spatiotemporal
Author: Mireo
Maintainer-email: Zvonimir Jurelinac <zvonimir.jurelinac@mireo.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://www.mireo.com/spacetime
Project-URL: SpaceTime Live Demo, https://spacetime.mireo.com/

# Mireo SpaceTime database remote connector

**stdb-driver** is a Python module for managing a [Mireo SpaceTime database](https://www.mireo.com/spacetime).

## Features

- Both **blocking** and **asynchronous** modes of operation.
- Listing **nodes**; listing, creating, and dropping **tables**; inserting **rows**; and executing **range queries**.
- Range query results are convertible to **Python lists**, **NumPy arrays**, and **Pandas dataframes**.
- **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) and **Windows** (x86-64 and arm64).

## Installation

```
pip install -U stdb-driver
```

Conversions to NumPy or Pandas data types require optional dependencies:
```
pip install -U stdb-driver[numpy]
pip install -U stdb-driver[pandas]
```

Install optional dependencies for all available conversions:
```
pip install -U stdb-driver[convert]
```

Install all optional dependencies using:
```
pip install -U stdb-driver[all]
```

## Example

```python
import stdb_driver

# Connect (conn_str is a ZooKeeper connection string)
session = stdb_driver.SessionConfig(<conn_str>).build()
print(session.status())  # SessionStatus.Connected

# List live nodes and table schemas in the cluster
print(session.list_nodes())
print(session.list_tables())

# Run a range query — one hyperrectangle per row, RANGE_ALL = unbounded dimension
RALL = stdb_driver.RANGE_ALL
res = session.range_query('segment', [[(1, 10000), RALL, RALL, RALL, RALL, RALL, RALL, RALL, RALL]])

# 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)

# Disconnect
session.stop()
print(session.status())  # SessionStatus.SessionEnded
```

## License
Licensed under [BSD 3-Clause "New" or "Revised" License](https://choosealicense.com/licenses/bsd-3-clause/).

## Credits
Authored and maintained by [Mireo](https://www.mireo.com).

