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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

megatensors-0.0.5-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.5-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.5.tar.gz.

File metadata

  • Download URL: megatensors-0.0.5.tar.gz
  • Upload date:
  • Size: 959.2 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.5.tar.gz
Algorithm Hash digest
SHA256 df7e201e76b1d0bdc5b27e28d6a6fac97b70d36cfd507b9a2eb5bd02a0d6b3fc
MD5 4ca8fdc14f4798e586ea7f212fe340d5
BLAKE2b-256 fedd75329c38bef8c97946e5c43324fac6be9f5bae492f700cf69223c75a6d8a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c4d6bee8ce700e5cbb7cbd1decbe8e963b484bf7e32a9bb299a5cf61eecc32f1
MD5 67d7acf7163528dde28a57b60a171e7b
BLAKE2b-256 a0aec1a7b646069b477f02b4ccd0fb064a4cf4d3eb161de38871aa0dd83d6989

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a1256f26644d8b1ad571be9344485656eb36c28f008e699156156e90485f5409
MD5 8adf6bb1cd40231a75522f81c53d94ed
BLAKE2b-256 cd2847066b316023315ecd6198c9b4eaa6337f142d2f7785f6bcdf2d8a02cf4f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cba2e188c0631c5c4b517403d702bc126d26a7c1c04c7c3f97532f696836f429
MD5 ce2b2efbb5438e88fa0428a18f74419a
BLAKE2b-256 82c3b7aded6ecfdef391f56bfac82823352a1dc4cf7d228ce51c2da211f97e6b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 140d48a244ec974de1f9fb961f4dd7f57f7960ba3f225104c94e155977d28baf
MD5 d55a782f449449faef5b4e67c6e8698c
BLAKE2b-256 f1b02beed3caec2412c458a22a61c6eaba5dc51b054cc967558acc899ecb421e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2cac35f9cdadc980c24d2c191c390d1fbafcb209e8f0f67d01fe04e4eab6b7f5
MD5 a1482bcb80fe7f13039abf85ac11d7fe
BLAKE2b-256 3fd2e5de0a33aefe0e90f8bfe1b99050e75cad3111d7a39815fa5fad644543c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7ee057b595c7149e3ab3d1c57340f7a996203be04fe3034db1735d3f04758998
MD5 0117cf8c959133fa8d5181c37af1fbf2
BLAKE2b-256 38d3223e1bb27e4727b1c7bc41a82d0acb6ebdd12bde9ca520be690b88e584db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b01ea10b24c469093fa09d6eaf70cd3481fc9f0df378e7560fc1edde12184943
MD5 1e9746bb3882ee1f8825186b32e05a8f
BLAKE2b-256 e32e77a9f153b77eeac125bae6200c80c13d41de49ebda589bd908cac73b48a0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af7957125003d557c433ea1238bc89268d954755c71e61f7628f5a6ef8638107
MD5 e0e712464c42faa563c02b214f1434e7
BLAKE2b-256 eb9d253eb09c543d9ee5bc578cc3a35517d880af0ddf4644c0cffbddbcfabc94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bd1450e789c39c6f73a88b5e08fedc4ef31262eb98142c8ffe359abd0d415acd
MD5 b8583c0616926341d1b23ef0a0a7331b
BLAKE2b-256 b4de3ee0c5a8f5f469160beb447c58a4066b74acebdceb39a29c32e63754be0d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 32b348bc98d1cd6f0e1a8a5428c7c3d49c3b81e6d5b2ae5a87f46e1c456383ca
MD5 a4ab67adfc7c5372f3d29432046c8242
BLAKE2b-256 604ac8e40cd3d0bf5f69f70b9e926d4862082c633be543f80e649b6d10d6c99d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 37a7138f9d109514082cf1aab808d868c712619582eb7ddf8423f1a3023a48f1
MD5 7c5c427a579596c2f570f76eaa2f7bba
BLAKE2b-256 314764f31e668cefc982d77e2748d6787a711b5a75ec9a1c63edd180da68d8ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 810419810d5da8f2e285770de58c8a1b0bddf3396938b070e17e42a8ec4001c1
MD5 3472763909ed4fa8f3c0cc4617a257f2
BLAKE2b-256 550683bb059932fab810b62301036f87849fce25e5c5dc0a99a3c8d9f5e4093c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 92672f9ae23037ec108be1dcc091534a24f1a172cfbefcee63148c0d0dd73b33
MD5 645c79f6b077a55615c5a64924591d21
BLAKE2b-256 3be9b5b5b350dbe2d2c9bdfcfa381fecd3592dc6d7ac7ff7344228336f1773b4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 82ed3d3eef2a45398c450e05fe709e430977603b1eda9d407f1d43bcb9426200
MD5 6bce30e7401935aedd136b9e47dc38f4
BLAKE2b-256 6d6cae2f4d4cddcfd80c229ab5a638dde544d4e62f270c62a19307ca66b23bdb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.5-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8a96a7d5c9cbd843f6edca4d482d90c0c1304276b77b70d0736bddb21bf9c5cc
MD5 5410f983630db8c530b4fd40a1f87491
BLAKE2b-256 291d2b496167b61b9833fe0adc6ce87508d94e717d00063bb3ec261911e9637c

See more details on using hashes here.

Provenance

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