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.2.tar.gz (5.5 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.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for smolhub_download-0.1.2.tar.gz
Algorithm Hash digest
SHA256 48d008d93fd5737535dcf8c64c8ea604e151eca8159c0e806d2ecca7cc2a6e19
MD5 33dcc70a4dd4d9dd35ce815453fd5d10
BLAKE2b-256 c89218fe850d17b59af171f75ef78bf67f965925631723ce0a3685592db1f18f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for smolhub_download-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1255bf9176418c43c2a278585da9b10c6ba98c212aac6678f3803025d618fdb
MD5 82afa43a41454ce9232ccad09a1aa208
BLAKE2b-256 55d1c094f69774936827b879efd96d2a23f934c225dcb15ab0294fed2c48074f

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