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.1.tar.gz (947.7 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.1-cp314-cp314-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.14Windows x86-64

megatensors-0.0.1-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.1-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.1-cp313-cp313-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.13Windows x86-64

megatensors-0.0.1-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.1-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.1-cp312-cp312-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.12Windows x86-64

megatensors-0.0.1-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.1-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.1-cp311-cp311-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.11Windows x86-64

megatensors-0.0.1-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.1-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.1-cp310-cp310-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.10Windows x86-64

megatensors-0.0.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: megatensors-0.0.1.tar.gz
  • Upload date:
  • Size: 947.7 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.1.tar.gz
Algorithm Hash digest
SHA256 8eabc7363c7e5f554de0ce153f4c6d04c2b897b9a3860cf6cffa7ca7993a3a7f
MD5 74084a9222e73dd921b2a1a96eac7af3
BLAKE2b-256 d6ad2b8abf46462bb97aaa6d7baa34f44295e9ffb6c32ee1f7c11b1bb49719be

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1.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.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 437be1fb67adabf29bec2976ed979ef27a11480cf2b2eb1c1f46fb614654d3dc
MD5 29e58b7cc93eb234e1f745d341058a3f
BLAKE2b-256 7b376f4309bfc48ca039dd5c6248fb705f5e77d38fb8eab4e53195e6b553dffa

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a231dc297365023e448628c12f3657bd81f45c9fbbe90f16e113320f7723f327
MD5 1169ab229e32d807272f52070b92f34c
BLAKE2b-256 04a1a2226da1a05a7d23fb601897ad1c63556946d5b2e1574c9a650d33d56ff8

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a4c246603b8a15720e49767c4c482f284ad7205474539ef6cca5d287fbe3ead5
MD5 8cf458645618887dc3101e738b94ab90
BLAKE2b-256 a7ce697d5e130db118c80c48cdd15223836db5438227ae4e9e9f8f5e7e7e83d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6da8ac0335772dbc36bf94433ae899e9da9675f4ab5f1411a10a98b4caea10de
MD5 cc89db9ebb16ed9d398a8b07629f7bc3
BLAKE2b-256 3be356146c36970a58f20d0c0e82c991499ae9da59fd1225babb1b42ae86e9d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3da615c95c9959850a2b5a40da05ed08696821faaa594230398377c72d5b0909
MD5 de39ffb6e31cb40a6c7136750a74b10f
BLAKE2b-256 ccf341c95f7ce95571de2ea5568e2ccc633bd37e275a9d69c9e8b4d97f8ce62a

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c173e890b843f7e2195d9e6363ba4e64389b9bd6946e305469acee3c3e3910c4
MD5 64ecfee363ef1298adf4607887685188
BLAKE2b-256 b4b0d9e8b9275fb3ee03d7b4677fbfcb1993875139ed6fe0b67f5dc34fe9dd05

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f579d3ffa507ddbbe02c3edde538ee598978d9f3a869f552aab35178e2455fd1
MD5 d3ce6594f176609c17782bb9ea8d6a1a
BLAKE2b-256 21e7a282351ba2170754aaddca25c34cc1c97b38297de67de4b7a4a5e9ee10df

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 150c4c79947c3f941171b1f52b7fc2f7d9ca2f238acc813b98a310e075f7a734
MD5 bf85373948539f63372279d00b507710
BLAKE2b-256 a0643de239038cd7f348c2ec3774407e45ee9eb2b5390cdfcc8c5274cb0ccb0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ad40cab5f604c5e94d60a6264edd70744e3b573750cc29703ae328448f0eab93
MD5 e1a6923bfc144c4fa43b7ae17ad3b1f8
BLAKE2b-256 1aaa604254913f681f6aaeaa50e7caa01c9ee3310c02f6a6ef7b3c282812c3b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 13d72b5d75487608ac98e3569a8d9dc5dba53094df7e607ba5551fc81e38af39
MD5 905f8ce0dac2b99ad63f6bf8b2878267
BLAKE2b-256 af895982db1906724ff0fc9fb61b2c9a55132adc62be2151efd158cc1ca72397

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cf0815a72846aeee7553c9648250f1e14241cd40614f6b14bc7381510c8a66a0
MD5 091c1d8b38c8a37d335b04bda3fd411d
BLAKE2b-256 ed430730fa51c66c06d45db0f68765d6f54a042d72bc6759be840fb2b704aae2

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e97909247c3d7d3de355b3a30a2d8b51645a89f66aadfd67bba775397dc3ccfa
MD5 e9b2fc395d386a2f610d046936c9f4fc
BLAKE2b-256 feb057b1c476dc6005980d77a527473ce327d3236a3d2c454982ee3163e9accb

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 68149c6421f26352490bb233c0418c009938b83d40c20e8b574d240248e866b2
MD5 e3331d96864de40ca9b6457200eebe61
BLAKE2b-256 3968a81e76ff3a0b7c2cecc793c30638702a3774923763d1766aead29c068e6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9ad330d9d2c1e9e30fdcfb8727142936ad051502dca2d5a4e6d91b5496afc142
MD5 db5353efb514f1dde90cbb9af02e87a6
BLAKE2b-256 33739ee950ef9e85ed353b6e20e68d64e2c7f62ad0c0ca8f552d66f6db420cc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for megatensors-0.0.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 37d870eb1a2d42be6cb626dd4702f5dcc0bbf991a892a59a1ce1393de647ab1f
MD5 b6b6434e556c48d8b165c33266d0eec7
BLAKE2b-256 bc687467801f57ba812f900ba56b5de94fddd3c71d5bd3ceb39f7f8321828454

See more details on using hashes here.

Provenance

The following attestation bundles were made for megatensors-0.0.1-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