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

Metadata

Release files for megatensors 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for megatensors 0.0.5
File Size Uploaded
megatensors-0.0.5.tar.gz 959.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for megatensors 0.0.5
File
megatensors-0.0.5-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
megatensors-0.0.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
megatensors-0.0.5-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details
megatensors-0.0.5-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
megatensors-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
megatensors-0.0.5-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
megatensors-0.0.5-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
megatensors-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
megatensors-0.0.5-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
megatensors-0.0.5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
megatensors-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
megatensors-0.0.5-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
megatensors-0.0.5-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
megatensors-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
megatensors-0.0.5-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details

Total release size: 47.7 MB

Release files / megatensors-0.0.5.tar.gz

Download URL megatensors-0.0.5.tar.gz
Size 959.2 kB
Tags Source
SHA-256 checksum
How to use checksums
df7e201e76b1d0bdc5b27e28d6a6fac97b70d36cfd507b9a2eb5bd02a0d6b3fc
BLAKE2b-256 checksum
How to use checksums
fedd75329c38bef8c97946e5c43324fac6be9f5bae492f700cf69223c75a6d8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp314-cp314-win_amd64.whl

Download URL megatensors-0.0.5-cp314-cp314-win_amd64.whl
Size 3.9 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
c4d6bee8ce700e5cbb7cbd1decbe8e963b484bf7e32a9bb299a5cf61eecc32f1
BLAKE2b-256 checksum
How to use checksums
a0aec1a7b646069b477f02b4ccd0fb064a4cf4d3eb161de38871aa0dd83d6989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL megatensors-0.0.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a1256f26644d8b1ad571be9344485656eb36c28f008e699156156e90485f5409
BLAKE2b-256 checksum
How to use checksums
cd2847066b316023315ecd6198c9b4eaa6337f142d2f7785f6bcdf2d8a02cf4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL megatensors-0.0.5-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 2.7 MB
Tags CPython 3.14 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
cba2e188c0631c5c4b517403d702bc126d26a7c1c04c7c3f97532f696836f429
BLAKE2b-256 checksum
How to use checksums
82c3b7aded6ecfdef391f56bfac82823352a1dc4cf7d228ce51c2da211f97e6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp313-cp313-win_amd64.whl

Download URL megatensors-0.0.5-cp313-cp313-win_amd64.whl
Size 3.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
140d48a244ec974de1f9fb961f4dd7f57f7960ba3f225104c94e155977d28baf
BLAKE2b-256 checksum
How to use checksums
f1b02beed3caec2412c458a22a61c6eaba5dc51b054cc967558acc899ecb421e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL megatensors-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2cac35f9cdadc980c24d2c191c390d1fbafcb209e8f0f67d01fe04e4eab6b7f5
BLAKE2b-256 checksum
How to use checksums
3fd2e5de0a33aefe0e90f8bfe1b99050e75cad3111d7a39815fa5fad644543c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL megatensors-0.0.5-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 2.7 MB
Tags CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
7ee057b595c7149e3ab3d1c57340f7a996203be04fe3034db1735d3f04758998
BLAKE2b-256 checksum
How to use checksums
38d3223e1bb27e4727b1c7bc41a82d0acb6ebdd12bde9ca520be690b88e584db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp312-cp312-win_amd64.whl

Download URL megatensors-0.0.5-cp312-cp312-win_amd64.whl
Size 3.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
b01ea10b24c469093fa09d6eaf70cd3481fc9f0df378e7560fc1edde12184943
BLAKE2b-256 checksum
How to use checksums
e32e77a9f153b77eeac125bae6200c80c13d41de49ebda589bd908cac73b48a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL megatensors-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
af7957125003d557c433ea1238bc89268d954755c71e61f7628f5a6ef8638107
BLAKE2b-256 checksum
How to use checksums
eb9d253eb09c543d9ee5bc578cc3a35517d880af0ddf4644c0cffbddbcfabc94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL megatensors-0.0.5-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 2.7 MB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
bd1450e789c39c6f73a88b5e08fedc4ef31262eb98142c8ffe359abd0d415acd
BLAKE2b-256 checksum
How to use checksums
b4de3ee0c5a8f5f469160beb447c58a4066b74acebdceb39a29c32e63754be0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp311-cp311-win_amd64.whl

Download URL megatensors-0.0.5-cp311-cp311-win_amd64.whl
Size 3.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
32b348bc98d1cd6f0e1a8a5428c7c3d49c3b81e6d5b2ae5a87f46e1c456383ca
BLAKE2b-256 checksum
How to use checksums
604ac8e40cd3d0bf5f69f70b9e926d4862082c633be543f80e649b6d10d6c99d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL megatensors-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
37a7138f9d109514082cf1aab808d868c712619582eb7ddf8423f1a3023a48f1
BLAKE2b-256 checksum
How to use checksums
314764f31e668cefc982d77e2748d6787a711b5a75ec9a1c63edd180da68d8ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL megatensors-0.0.5-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 2.7 MB
Tags CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
810419810d5da8f2e285770de58c8a1b0bddf3396938b070e17e42a8ec4001c1
BLAKE2b-256 checksum
How to use checksums
550683bb059932fab810b62301036f87849fce25e5c5dc0a99a3c8d9f5e4093c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp310-cp310-win_amd64.whl

Download URL megatensors-0.0.5-cp310-cp310-win_amd64.whl
Size 3.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
92672f9ae23037ec108be1dcc091534a24f1a172cfbefcee63148c0d0dd73b33
BLAKE2b-256 checksum
How to use checksums
3be9b5b5b350dbe2d2c9bdfcfa381fecd3592dc6d7ac7ff7344228336f1773b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL megatensors-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
82ed3d3eef2a45398c450e05fe709e430977603b1eda9d407f1d43bcb9426200
BLAKE2b-256 checksum
How to use checksums
6d6cae2f4d4cddcfd80c229ab5a638dde544d4e62f270c62a19307ca66b23bdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / megatensors-0.0.5-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL megatensors-0.0.5-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 2.7 MB
Tags CPython 3.10 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
8a96a7d5c9cbd843f6edca4d482d90c0c1304276b77b70d0736bddb21bf9c5cc
BLAKE2b-256 checksum
How to use checksums
291d2b496167b61b9833fe0adc6ce87508d94e717d00063bb3ec261911e9637c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.5 This release

16 release files

0.0.3

16 release files

0.0.2

16 release files

0.0.1

16 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page