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.1.tar.gz (4.6 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.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smolhub_download-0.1.1.tar.gz
  • Upload date:
  • Size: 4.6 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.1.tar.gz
Algorithm Hash digest
SHA256 a0bf167ce122ce89ce338d6d9e3420b323aa3247cff813b71279199a472e5ed0
MD5 b8331506d98745220012ec485df1fe62
BLAKE2b-256 19be2280e25dab27a7de26696f938e2d661266bcc407fafa36deb328cb9f4679

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for smolhub_download-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77fcb220fd43b819af80812036558680da0275b233516cbd3649194749780525
MD5 0b0353c82a955a42cf35c8aff704093a
BLAKE2b-256 e4c2d52ecf05876ab39a8bf05d91c28eea6f0ad97b21f841c77716e511de2043

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