NumPy engine plugin for tigrbl with array-to-table helpers.
Project description
tigrbl_engine_numpy
A tigrbl engine plugin that registers kind="numpy" where each array/matrix is a single-table database-like object.
Features
- Registers a
numpyengine through thetigrbl.engineentry-point group. - Treats one NumPy array/matrix as one table.
- Provides a first-class
NumpySession(subclass ofTigrblSessionBase) without pandas dependencies. - Supports loading
.npy/.npzvianp.load(...), memory-mapped arrays vianp.memmap(...), and persistence vianp.save(...).
Installation
uv
uv add tigrbl_engine_numpy
pip
pip install tigrbl_engine_numpy
Usage
import numpy as np
from tigrbl.engine import EngineSpec
spec = EngineSpec(kind="numpy", mapping={"array": np.array([[1, 2], [3, 4]]), "columns": ["id", "value"], "table": "matrix", "pk": "id"})
provider = spec.provider()
engine, session_factory = provider.build()
session = session_factory()
print(session.array())
print(session.to_records())
session.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tigrbl_engine_numpy-0.1.1.tar.gz
(14.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tigrbl_engine_numpy-0.1.1.tar.gz.
File metadata
- Download URL: tigrbl_engine_numpy-0.1.1.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- 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":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c904d5068ff690bc7c8fc6f1e6e4b3bc435e39700a7d270e614bc9aa8717f06c
|
|
| MD5 |
b842a575f83da0beaa3929b89881cf03
|
|
| BLAKE2b-256 |
0422a5749e64ba440d187e48ecab9f58d5f8ebab32ae9c6222ff48af99ec8382
|
File details
Details for the file tigrbl_engine_numpy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tigrbl_engine_numpy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- 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":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e48f60466c0451435230c9714c957f5e3c6f4edfef32f0fff6761734221d5c3e
|
|
| MD5 |
64144f076af39a79ff2d932031545e6d
|
|
| BLAKE2b-256 |
c09ae9ef422eb2877b252051e7c181531f25ed23a460b0d17b9cdbc43e627c0b
|