Skip to main content

A Python client for uploading and downloading models from SmolHub

Project description

SmolHub Download

A Python client library for uploading and downloading models from SmolHub.

Installation

pip install smolhub_download

Usage

from smolhub_download import SmolHubClient

# Initialize the client
client = SmolHubClient()  # Default URL is http://localhost:5000
# Or specify a custom URL:
# client = SmolHubClient(base_url="https://your-smolhub-instance.com")

# Upload a model
result = client.upload_model(
    model_path="path/to/your/model.pt",
    name="my-model",
    description="My awesome model"  # Optional
)
print(f"Model uploaded: {result}")

# Download a model
model_path = client.download_model(
    model_name="my-model",
    output_path="downloaded_model.pt"  # Optional
)
print(f"Model downloaded to: {model_path}")

# List available models
models = client.list_models()
for model in models:
    print(f"Model: {model['name']}")
    print(f"Description: {model.get('description', 'No description')}")
    print(f"Size: {model['size']} bytes")
    print("---")

Features

  • Upload PyTorch models to SmolHub
  • Download models from SmolHub
  • List available models
  • Support for model descriptions
  • Progress tracking for large uploads/downloads
  • Automatic file handling

Requirements

  • Python >= 3.7
  • requests >= 2.25.0
  • torch >= 1.7.0

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smolhub_download-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smolhub_download-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file smolhub_download-0.1.0.tar.gz.

File metadata

  • Download URL: smolhub_download-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for smolhub_download-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8e3653db213a1a71095c893d103a95185426174b9ea9935d1d01085b0efc6af4
MD5 20a2834979767d344c0362dc1a91de09
BLAKE2b-256 0fe2f317dc4ebdecd54774e6588d2273bdd98709cbe377476b04b42a8d2ef4ea

See more details on using hashes here.

File details

Details for the file smolhub_download-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for smolhub_download-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 420ef9f7596afe8f4a281d7674e6aef65e829993c81a0a363e9dcda7adfca88a
MD5 6e49ef389434e4d71900ff373cc38b54
BLAKE2b-256 e661cf6e7648c6fbcd5d659438a30e91e84d2cb40b33433bd42360caff850e4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page