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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

megatensors-0.0.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: megatensors-0.0.4.tar.gz
  • Upload date:
  • Size: 958.1 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.4.tar.gz
Algorithm Hash digest
SHA256 43c7c53e747d11c27a41c11c9cf12e77e9de0187f7b2ff93dc8db0c587ab1c3e
MD5 9bc036806c3a8a65f7ed7a5b1ca49a27
BLAKE2b-256 08cb9401fc1b49fdbb2fe65d7b8543893130d2e0c6a21184cd2519b22ab051ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 33d35c1126f5b17b2bfa0b86db5f212ce1f484660187d8141b92d45d474390a3
MD5 f38d0678d1e7368bc8508b0b37d47d3f
BLAKE2b-256 d32ebc5e960b889b37977351c380f74dae7a7aaf4f59821524e55dbe73e8ba4f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b19e768f89eaabb104d4a9264a1b07d28706e657ba06deee198208029770bd76
MD5 fd58cdf66b29db48b4ba4a8b8cfe8c5a
BLAKE2b-256 925f66ed032b7740367f20f66e40b2e27b1d9d1a6f520cb99d3dcb04fae843b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 55b14256cb79f29d5b33b26e4554bc5ad1595d58ba41c993ebd8f24f42fc4bf0
MD5 ed86e5c2e5be7972126fca3096123da6
BLAKE2b-256 6cad9670f0c2f497ba5ff465b2107e9e3a33b490f270f5ec6aaf3cdbd4d20696

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c68c79bd5211a3d4509fa8d2f16f31e57619f5a76ee6241a05752fc083865cf0
MD5 380efd3b270851e66384b6a000b7427f
BLAKE2b-256 2d830105c32ab40a097de0e92c469ddb24d393eda50f26d26e8a5ed695241530

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 299bed602246aca689a2de87e013dbaa71dda5a9c0e310619e48a5beaddc4935
MD5 e6b9e22d89f64a77cca6d3b7ef411bd3
BLAKE2b-256 ec7d114f42abfecdf943a0f267be7638e42bf88572a214eb721b617f59f984e9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 00320bc39801c8c19f158007bcb60a531831c220ee72e4930d80c5f89ae141d2
MD5 1210e8698dfc10fe11b9b81b5f5cc58e
BLAKE2b-256 e1ded2bd5184b7475cc55729a38a254e2f1b4c6cf0a4a7d57b6488ad668f9c4f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3361055d356da857abb8331216d5f4402e5971eb34b4344d55ef392d2ff1439e
MD5 7e4d5b1033b30031c383767b2a6e0321
BLAKE2b-256 38c54ddc8982fe9b0a4eff86ceb9695f2249369a39a1bef53ed54c95b5ee5ce0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ebde608e3890d28367cfe1768cc9f37d68b7d6f33f847a7eefad2e83e7c86256
MD5 7891e6640d5a30589fb35340b25df499
BLAKE2b-256 8d7e31b29106f9053809a2b782f5b0e46e3f4fb598667b2428ac50a32d304454

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5e204bd05c163d039cc4557c94f5e3ce1ade6705ff1613b2e71edd0ffc568494
MD5 a7a48ed2ab07abeb239a204346d5eab8
BLAKE2b-256 51f6aab777c8f014bd2adb537439f34960b8904b39bbff7866fbb0807402c12c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 98d19c4013fed2b114ecb2cc737fa53c44434002f5765e86ea0e9257e3ea7065
MD5 48388737d01eb8e559d3ddba2e0fcd29
BLAKE2b-256 6aafb874022b7730e68404f52271ca59437faf3460ae16efcb46fe7c8a204d22

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 885337ad28390dea3685163ccf9ab87e6bc6977d3fd719b17cbdafa275a8c469
MD5 8cc9609e6b69ccc4e359ad09315880aa
BLAKE2b-256 0f3a4b4d92df010f0bf58e43695311c33eaf61c5e15d32ceb5e62c012d9a7e5e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 73b5dfedade5709bfaefa5af44f5cf33949dfe883e63cd3fb6caa7360ee3f1df
MD5 c3288ee6fa742833868fab9925c043b6
BLAKE2b-256 fe40cdfeea194d5b5283a53a10e7c5bdc12bd4fe45da84ea0bdd1684a54c3227

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6234895a4efbeab7a89eef5c8b44f0d1091a75ca68a5bc1d38cf410f04f095d5
MD5 6a821bc0b7489d51bfb9c11e26fbad62
BLAKE2b-256 c8483c73d8bb17a0eb65067128a74d1771251377259a729d1e13ba94aaeec850

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 90e9f8b5a5fafebb94dfd80fbed49cb19de73aa499ff860bc9380454f0f14ee2
MD5 6900e7eb36dbc5574c087a33238dc1e5
BLAKE2b-256 5861a7530d1bd1161aa72c8df18c86a35dc7356bf7e949fc9543759c8670deef

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.4-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 50ce4c19194075ee2f692e26d72bd8e524a0a30466196acf94895a736fc48642
MD5 9de48a0cd2a760c9f43b253224565cc3
BLAKE2b-256 0bb2fbbeabc455c294cd2f6b96863fae3f5ba425e81b6154b603e1c589937ada

See more details on using hashes here.

Provenance

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