This release is a pre-release and may not be stable for production use.
MOI Python SDK
Python client for the MatrixOrigin MOI Catalog Service, mirroring the feature
set provided by the Go SDK (moi-go-sdk). It offers both a low-level
RawClient (1:1 HTTP bindings) and a high-level SDKClient with productivity
helpers for role/table workflows.
Installation
方式一:从 PyPI 安装(推荐)
如果包已发布到 PyPI,可以直接安装:
pip install moi-python-sdk
方式二:从 GitHub 直接安装
无需下载源码,直接从 GitHub 仓库安装:
pip install git+https://github.com/matrixorigin/moi-python-sdk.git
或者安装特定版本/分支:
# 安装特定分支
pip install git+https://github.com/matrixorigin/moi-python-sdk.git@main
# 安装特定标签版本
pip install git+https://github.com/matrixorigin/moi-python-sdk.git@v0.1.0
方式三:本地开发安装
如果需要修改源码或进行开发:
# 克隆仓库
git clone https://github.com/matrixorigin/moi-python-sdk.git
cd moi-python-sdk
# 安装依赖和包
pip install -r requirements.txt
pip install -e . # 可编辑模式安装,修改代码后无需重新安装
Quick Start
from moi import RawClient, SDKClient, TablePrivInfo
raw = RawClient(
base_url="https://api.example.com",
api_key="your-api-key",
)
# Low-level call
catalog = raw.create_catalog({"name": "analytics", "description": "Prod catalog"})
# High-level helpers
sdk = SDKClient(raw)
role_id, created = sdk.create_table_role(
role_name="analytics_reader",
comment="Read-only access",
table_privs=[
TablePrivInfo(
table_id=123,
priv_codes=["DT8"], # SELECT
),
],
)
Features
- Full coverage of Catalog/Database/Table/Volume/File/Folder APIs
- Detailed per-method references in
docs/api_reference.md(EN) anddocs/api_reference_zh.md(中文) - Connector workflows: local uploads, connector imports, preview
- User/Role/Privilege management
- GenAI, NL2SQL, Health, and Log endpoints
- Streaming downloads via
FileStream - High-level helpers for table role management and file-to-table import
Development
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
Code style follows standard pyproject-less tooling (feel free to add linters
or tests). Contributions are welcome—please align new APIs with the Go SDK
behavior to keep parity between implementations.
Metadata
Release files for moi-python-sdk 0.1.1.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| moi_python_sdk-0.1.1.dev0.tar.gz | 58.8 kB | Without provenance | Details for moi_python_sdk-0.1.1.dev0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| moi_python_sdk-0.1.1.dev0-py3-none-any.whl | Python 3 | none | any | Details for moi_python_sdk-0.1.1.dev0-py3-none-any.whl |
Total release size: 97.8 kB
Release files / moi_python_sdk-0.1.1.dev0.tar.gz
| Download URL | moi_python_sdk-0.1.1.dev0.tar.gz |
|---|---|
| Size | 58.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4b9c4ce5e0ddb92189ffc42244b5f342463bb06b9bcfdf01877bbcd9ef461d4
|
|
BLAKE2b-256 checksum How to use checksums |
fa36aa137fc6ad26d3a4c7731d1104e3fd8a61449d3b2e84228620d77c04fba0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.0
|
Release files / moi_python_sdk-0.1.1.dev0-py3-none-any.whl
| Download URL | moi_python_sdk-0.1.1.dev0-py3-none-any.whl |
|---|---|
| Size | 39.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
953b64ee91978c4d1b7c29449265f6309f5bcb1c174d8fc3ce7c620d409353ad
|
|
BLAKE2b-256 checksum How to use checksums |
e863fdec7a3a869f029221b3530a0e8fea49c9602ba8bb01c01ba9b282f786a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.0
|
Security for moi-python-sdk 0.1.1.dev0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.