Mog spreadsheet engine — Python SDK
Project description
Mog Python SDK
The Python package name is mog-sdk; the import name is mog.
This package is a native-backed wrapper over the Mog compute engine. Package
health gates build and install mog._native; source-only imports are only a
smoke path and do not prove SDK behavior.
Bootstrap
cd ../mog
pnpm check:python-sdk
Examples
import mog
wb = mog.create_workbook()
ws = wb.active_sheet
ws.set_cell("A1", 2)
ws.set_cell("A2", "=A1*3")
wb.calculate()
assert ws.get_value("A2") == 6
wb.dispose()
Load and export XLSX data through the native-backed package:
from pathlib import Path
import mog
wb = mog.load_workbook("input.xlsx")
try:
ws = wb.active_sheet
ws.set_cell("B2", "=SUM(A1:A10)")
wb.calculate()
Path("output.xlsx").write_bytes(wb.to_xlsx())
finally:
wb.dispose()
API Parity Policy
Every generated TypeScript SDK path has a checked Python disposition in
mog/api_dispositions.json. Python may expose snake_case names, but the
mapping is explicit and generated artifacts are checked with:
compute/pyo3/.venv/bin/python compute/pyo3/scripts/generate_python_surface.py --check
compute/pyo3/.venv/bin/python -m mog._tools.verify_surface --strict --json
compute/pyo3/.venv/bin/python -m mog._tools.audit_stubs --strict
Unsupported Behavior
Round 1 removes fake-success behavior. Public paths that are not yet backed by
production workbook state raise mog.UnsupportedApiError with api_path,
python_path, reason_code, and owner_package.
The supported/renamed/unsupported surface is generated from
mog/api_dispositions.json; do not maintain a separate README list. Check the
installed package or run the surface tools above to inspect the current
disposition state.
Wheel Contents
Wheels must include the native extension, py.typed, generated .pyi stubs,
mog/_generated/api_surface.json, and the disposition manifest. Supported
Python versions are currently >=3.9; the release wheel platform matrix is a
release-owner decision before publishing.
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 Distributions
Built Distributions
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 mog_sdk-0.9.1-cp39-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: mog_sdk-0.9.1-cp39-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 22.5 MB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1b48ebe32197307dda99da0a55a94945be097513492a659b8e1cedd9dede11d
|
|
| MD5 |
c97f67a4e79b9c2f6cf50f85c8c32346
|
|
| BLAKE2b-256 |
718b9a89c2f98057a37318b87e5bf6e245a7710be330568062867b827a31e8e8
|
File details
Details for the file mog_sdk-0.9.1-cp39-abi3-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: mog_sdk-0.9.1-cp39-abi3-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 21.4 MB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd46b5f9dbffaff67f5375610bcc6c814f9044cff8bddbd0f0a28b8d22cea070
|
|
| MD5 |
fef0f55abbc3e40dc386a3470848bdc3
|
|
| BLAKE2b-256 |
f7a7cab68a08995ec51914583304de7d4a30fdaa5fd63fd439b0738327d0c0b6
|
File details
Details for the file mog_sdk-0.9.1-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: mog_sdk-0.9.1-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 21.1 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07b49995d667ac934525e65df252e88fe29b0c2bd26140b3ea73e133646e57ce
|
|
| MD5 |
7ef6c9d3db306a87af206a28f180a967
|
|
| BLAKE2b-256 |
0da89076fd6d0976f3ab244ae72640edea813347b8e7d678b1ed14b2d237bf1b
|
File details
Details for the file mog_sdk-0.9.1-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: mog_sdk-0.9.1-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 22.1 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7da2fd8df9883727f3a4420d97a71d28d7493c2b207f43da0d2588a1a2ef9a5d
|
|
| MD5 |
dfb0b234d1337b7698481a1cc043dbd9
|
|
| BLAKE2b-256 |
0a17b12221062ee27906a3a56f72906b42e218c350fd2d2d5684692df6c81e6d
|