Skip to main content

MEGA

The public Python SDK for building, publishing, and running with MEGA.

Documentation Package Last commit Python 3.10+ Apache-2.0 License


Documentation: https://mega.tensorplay.cn/docs/hub/sdk
Source: https://github.com/ohtensorplay/megatensors


Welcome to megatensors

megatensors connects Python applications to MEGA repositories, datasets, Spaces, Jobs, inference, storage, and Xet-backed large files. It combines a high-level Hub client with efficient tensor loading and framework adapters, so the same package can move an artifact, inspect it, and load it for execution.

Key features

  • Discover and manage models, datasets, Spaces, and versioned repositories.
  • Download individual files or complete snapshots with a local cache.
  • Upload files and folders with resumable large-file support.
  • Run inference, remote Jobs, schedules, and Sandbox sessions.
  • Load tensors into PyTorch and Paddle through a shared API.
  • Sign and verify artifacts for reproducible distribution workflows.

Installation

Install from PyPI:

pip install megatensors

Install the latest public source:

pip install "megatensors @ git+https://github.com/ohtensorplay/megatensors.git@main"

For local development:

git clone https://github.com/ohtensorplay/megatensors.git
cd megatensors
pip install -e .

Quick start

Download a repository snapshot:

from megatensors import snapshot_download

local_path = snapshot_download("owner/model-name")
print(local_path)

Use the typed Hub client:

from megatensors import MegaApi

api = MegaApi()
models = api.list_models(search="embedding")
for model in models:
    print(model.id)

Explore the CLI:

mega --help

Repository layout

  • megatensors/ — SDK, CLI, Hub client, tensor loaders, and framework adapters.
  • tests/ — API, storage, CLI, and compatibility contracts.
  • examples/ — runnable loading, generation, and signing examples.

Contributing

Issues and pull requests are welcome. Run the focused tests for the area you change and keep credentials, deployment configuration, and generated artifacts out of the repository.

License

Apache-2.0

Download files

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

Source Distribution

megatensors-0.0.2.tar.gz (949.0 kB view details)

Uploaded Source

Built Distributions

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

megatensors-0.0.2-cp314-cp314-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.14Windows x86-64

megatensors-0.0.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

megatensors-0.0.2-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

megatensors-0.0.2-cp313-cp313-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.13Windows x86-64

megatensors-0.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

megatensors-0.0.2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

megatensors-0.0.2-cp312-cp312-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.12Windows x86-64

megatensors-0.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

megatensors-0.0.2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

megatensors-0.0.2-cp311-cp311-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.11Windows x86-64

megatensors-0.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

megatensors-0.0.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

megatensors-0.0.2-cp310-cp310-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.10Windows x86-64

megatensors-0.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

megatensors-0.0.2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file megatensors-0.0.2.tar.gz.

File metadata

  • Download URL: megatensors-0.0.2.tar.gz
  • Upload date:
  • Size: 949.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for megatensors-0.0.2.tar.gz
Algorithm Hash digest
SHA256 653602bce04f434e2d8e794d1b60a57e19356e2d80af9c42c75d66c08cb89806
MD5 06c58c49ecbc0b12b0d5be5990894e5d
BLAKE2b-256 b5dbdf4bcde3efc76da50a64575d2a3c866fcb026e6f752996c8c926123ad1db

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2.tar.gz:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 fc1d382af6766c81fb78d19655e476b72477c003b2f226a73c5537740cded267
MD5 9bc5919b428f325389a5c59eb8c3d08d
BLAKE2b-256 78359e9b6b4d5222350b409863b4cf6e9611c0f475f04db788263068cbf9b587

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp314-cp314-win_amd64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3cfb3118fa4eeceb18a5d710c535d793b02413616a1b565b1772469a9e0dd9e7
MD5 cf8aebcf81b685fc9bb212f4def2feba
BLAKE2b-256 1172dfb24ff00d75354820d56aba62dc0700e2cc39ee95472ff0a6e4d4782300

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 93721eb9fccb43ae44151af490f223f58a59ee8d8ac534541a238233d5a5e758
MD5 43cc12b5aed571da6812bf95421be232
BLAKE2b-256 6b702aa6dedf271e1cef865e005291b6ee46dd76ba896bc73a50eed9f8bdbc60

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e1e7fcdd2efa7396df5a3d6bab94f7637fa1f157f9a0e02cf9535fb6598802b4
MD5 6e68f6da488739c64c60157e473b5412
BLAKE2b-256 afb1d2e6c33f6235c2b01942ddc6be1c759189a412e2b3cb0507c1b24e0e19ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 58306c74440880dc3f0200520a363bdff8b70db95b3d042745fee22b08671331
MD5 3ac2d141e00e1911dcb516d0d0a58ac0
BLAKE2b-256 2c3d522a9ee3151f0af97e86a71ecb915f15aefeb33ff52527850a314b35c947

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e07ba5929fbc8f0e44f0ee68f69efd2fa6db2eeaf7d663a04188df0d629fd6ee
MD5 6aac528487aaa692dc52402ff1234a64
BLAKE2b-256 aa7acb9bf63c2a24e735fb983dc5d0262e1cf6f4ab76c1a2be7cbbec3538ce02

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e3a07f38f7ac37a6a641c6253fe83b0d1cdb45d9e598f96441d3a1378384f2fa
MD5 956d6b202cc23303324714155c99fc81
BLAKE2b-256 10ec27cfdaabbbdd247db106279ef2ccfda297fe54cf2301efdd5af5260a0826

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fd80669188f26bf4ebd4a20b7d63f97208c4f2b41d3e5707e52611747ee81aab
MD5 176e2d75e903a988960a41a4df6088a4
BLAKE2b-256 794723f2af45cae692c85e249232a41dc2779c7ac7470262da0cd87e67461161

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b4156c55bd7d4e2d4099632728fff897a1fd12707ab0f7d132a6e9a25a914a99
MD5 e95752ad6af6e10558903fd8d97b9ef4
BLAKE2b-256 fc94bafcd5ff591378476c7d4ba2df7fddb2b845ba7248e501fafe2d76bd2b6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6c4f6f1c380357f6ddbf2cdafdb7554aac2f6c6ec1590f1577595dcaa90848d1
MD5 f1f0bcab9281445c5deff288f486f14c
BLAKE2b-256 cea1629d62a3a694a85072f22f76188a0b710a0dcc6edffb484a694765b180bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9fea63930d1576784ba7d8088faa403b0276015f6dab8e719c41f9e5aab61140
MD5 930cf74b1eedfb7c3cb419e75c005eab
BLAKE2b-256 b96d189c540645c546bba6705e52313dfc8463ed323f75a1f3aa7d1a1287e530

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8c111943b28f158dc78eaf705a559bc850db81cf46f51e11d681f655c2cda249
MD5 4205e76d6ca8591be4ebec8a08ab8f98
BLAKE2b-256 200e85b40153ea676aa6ece4d839f45d994585546ec225ae39465b252082402b

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 88b455d233d5ca32f50e8c0dc362af8aed5708f8d1c33d1b0db18453165ac3fa
MD5 47f8ede6af569ef522868aa82b500d38
BLAKE2b-256 abd569f952c5a80fec618a8861c5f9374c73e0ea12266582d5cf9708c0ecdf07

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cab2bee83b77bd7df1e67e146a7d4cc7f20f0de049e5685293628661931533ea
MD5 e0c0a92d4359b15950d293e29fba1e9f
BLAKE2b-256 cde47bb04491f2f649da4eb514e4872de4f9f6a2b943a7c483df12e392cdf425

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file megatensors-0.0.2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f224c3dec5c66d80e6ac465999438691a1f95163d78e4a9221ffbfb592baf3f8
MD5 923a7d7999aaee60a783d23ab31e334e
BLAKE2b-256 8870a1dc6c92463beb3111bded69aeb4e548ce1fba6182e83a02b4b799c694b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on ohtensorplay/megatensors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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