Skip to main content

A Python client for downloading models and datasets from SmolHub via Supabase

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.3.tar.gz (6.4 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.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smolhub_download-0.1.3.tar.gz
  • Upload date:
  • Size: 6.4 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.3.tar.gz
Algorithm Hash digest
SHA256 8c074be24f041e1acd74f27d31c3ae5af0e3e4af905f72ee23f1f551522cdcf8
MD5 a77b4e05217f95119f9fb968eec796a1
BLAKE2b-256 34ea8b26a0217ea51065f039ba5116dcf9e505a31eb0ad1075197723c1611ff2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for smolhub_download-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 979cc57a7574815728a692f04cf2dc1edf02ad72f236abbb05a0f369e940841f
MD5 30b43ea2c8a5828f4c4cec3606770736
BLAKE2b-256 ed1198db32ff6e3d22fb34a196f2f01296c9f4ccb27c629cde1020a676f0087e

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