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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

megatensors-0.0.3-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.3-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.3.tar.gz.

File metadata

  • Download URL: megatensors-0.0.3.tar.gz
  • Upload date:
  • Size: 953.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.3.tar.gz
Algorithm Hash digest
SHA256 e83d4eb23cd8c191010e0638662731324a77249b06c6c1278743a43719f4e08d
MD5 a587c5ee3e39b6351d8511135e83f1df
BLAKE2b-256 ee71854d6fb3edc1221da0da70af17cea397c21fb601d6dfef7eb596cf5203a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 adde5c77530a1f64d3f0ed7f873b3fcc2e37aed015b7a95d90e2bc8456720966
MD5 b717476acad8843d7b3607f20381c4f7
BLAKE2b-256 77081b465f4fa64596812985a331974a5fb2bddd4411ad31a3bc35fcc00ab6eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd911cfbbe757adc28c78781c4232c85b39584cf3857b2ac6e61b71f0187bcf6
MD5 304237ebb5c6a76209166a775479575c
BLAKE2b-256 c1bc567d7fd41939f4ab64837e0ca4e592b0a3bde4f48267ae84d9986b0bd536

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7901900fe28ae72b8bdaf2ec208ae4d58da5b655c9c18cf0d73d3272f5964907
MD5 cc179c4421dbca7a125200524e8dbe5a
BLAKE2b-256 aa5dfe0d273fb11137c31f9bc237ac5a8aeca590bbb2582542f8ca0ec102e457

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d62dd77c13e72e1564e5ffc343f2cefdda5a2dbfb937c923604e7b10213c51e5
MD5 3816f455aaf13c23bf06dbb82117cc0a
BLAKE2b-256 906e9d856c105a0d40f344b3a4d2e3a3cf5b1cab312d2f47c497b8cb0679fb4d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5481bba26c846cb27c7b36d02047548b649f7872c838425b31b130db407ee11a
MD5 5b0dc0b479a00c623bc72471580f6640
BLAKE2b-256 d4f3e1817a7cdf6a5774217cc9ddb42659de4308671cf58dc7c55c6bb35c58c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d85e721d8c53e3761459b95516ba843054d3dd4b59c4799b427cbc5e7b4715df
MD5 77d6083fbcd1640ecdf366c76fd98972
BLAKE2b-256 b8a249cd4f8675616e0b5cc51dc40ba49def716e6e637b7cf9cc5d08c3c7c18c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 653f13dedec8e363024e7d7720d54401a2fa38f0cb7a9d22d9cc061b3f87bdac
MD5 b2aa15f2a7619bc16d9280027a6af890
BLAKE2b-256 d752cdb8c04b085dbd4749356ae63132a4edd47318541b919ac1e0eb78e817be

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 375d4f1e13cda11e4be9e3524d56cec580d3449a86471ebc25579c5d5a9e62e6
MD5 659591897e93f06731dd20ba9981d0f6
BLAKE2b-256 c27fea2c5b3bb45b8342daf1ee59ef2ac3abd95cdbc0b9fbc098309aeec4eff5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 16cbab44deeb7befda71c8a6f573d9441b979e84a39892b2555d8b5a67b16acd
MD5 cdf3bf48ad39a2aa54e14d7a3074e699
BLAKE2b-256 ba8571934a911c027278bbea71ae8e72231533cad5f955ead7d8f07854c7724f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 13d9dedc935309773f2e4a03f2d689ffdc8276d68ee0c9064ff50cbc74cb5ceb
MD5 d8f95680128ce3b7c813f6153562f422
BLAKE2b-256 20ddc1d827902334eb510a578cb65fbb219be3bf5825f2fd17399e6feb35a986

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 db2b551195bc6976d76c17c31c5516291fa1fb710deb4b1bde13994491b6bbde
MD5 8bbf1d2918205489c3d560da3ee73426
BLAKE2b-256 659797b7eced5ebfdbc6555831bbc807d46af70a27427b0ccfb0481ba995ce60

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b6e883c0af9fe158812eecbde35f19cd2c71adfd0589418433bd0d10a51fc652
MD5 eb5e140dcd2e484679882d69c84520f7
BLAKE2b-256 57a7e19aedf8c294bf9a04afe4071ab897dd7e9d093cba9926da09602493caf0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d3247b7c70e7e94e92020e0e4969136fa6858d199f41d6a495316bae040ddf72
MD5 e6b35c219087aad65bfaf9f35e38ff8f
BLAKE2b-256 bc15a702b70ae0cd958551e4f425090b19eb8fb74d009ff33cbf1a448c7829c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fcf13dac89e0e2ada23dd23ba0d7fddc72ac3dbbb1ceaaca51ad68adea8d7217
MD5 437c54816bb895065ef9a9eabd7be4ec
BLAKE2b-256 9189dc4aab14070ebb203f82c5068ccb868fd66e513f04ca3da7b6500e523c15

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for megatensors-0.0.3-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 06e09bf4215fc4d294faaee49fbf2aa2ddadc9d8f8e69d2dc358e03a38a0179d
MD5 05ea29794decafc759c75208e06e3faf
BLAKE2b-256 c84a8bb7a83d3bcbb584a94d4dff8254fa13cd0f4f0702f828b882e5bb1ee104

See more details on using hashes here.

Provenance

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