Skip to main content

Ultralytics HUB Client SDK.

Project description

Ultralytics logo

Ultralytics HUB-SDK

HUB-SDK CI Ultralytics Discord Ultralytics Forums Ultralytics Reddit

Welcome to the Ultralytics HUB-SDK documentation! 📖 This guide will walk you through the installation process and help you get started using the HUB-SDK for your machine learning (ML) projects. The SDK provides tools to interact programmatically with Ultralytics HUB.

🚀 Quickstart: Installing HUB-SDK

Ready to dive into the HUB-SDK? Follow these steps to set it up on your machine.

Prerequisites

Before you begin, ensure your system meets the following requirements:

  • Python: The HUB-SDK requires Python 3.8 or later. If you don't have Python installed, download it from the official Python website.
  • Git (Optional): If you plan to install the HUB-SDK directly from the GitHub repository or contribute to the project, you'll need Git. Install Git from git-scm.com if necessary.

Installation Methods

You can install the HUB-SDK using either of the following methods:

Install from PyPI

PyPI version Downloads

For the latest stable release, install the HUB-SDK from PyPI using pip:

pip install hub-sdk

Install from GitHub

To get the very latest development version, you can clone the repository and install it locally:

git clone https://github.com/ultralytics/hub-sdk.git
cd hub-sdk
pip install -e .

🛠️ Usage

Let's get started using the HUB-SDK to perform Create, Read, Update, and Delete (CRUD) operations for Models, Datasets, and Projects on Ultralytics HUB.

1. Import HUB-SDK

Begin by importing the HUBClient class from the hub_sdk module:


2. Authenticate with Credentials

You need to authenticate your client. Choose one of the following methods:

Using an API Key

You can find or generate your API key in your Ultralytics HUB account settings.

# Authenticate using your API key
credentials = {"api_key": "YOUR_API_KEY"}

Using Email and Password

Alternatively, authenticate using your Ultralytics HUB email and password.

# Authenticate using your email and password
credentials = {"email": "YOUR_EMAIL", "password": "YOUR_PASSWORD"}

3. Initialize the HUBClient

Instantiate the HUBClient with your chosen credentials:

# Initialize the client with your credentials
client = HUBClient(credentials)

Operations

The following code snippets demonstrate how to perform CRUD operations on Projects, Models, and Datasets using the initialized client.

Project Operations

Manage your projects easily:

# Get a specific project by its ID
project = client.project("PROJECT_ID")

# Create a new project (replace "PROJECT_DATA" with actual project details)
# create_project = project.create_project("PROJECT_DATA") # Assuming create_project exists and takes data

# List projects
projects = client.projects()  # Assuming a method to list projects exists

# Update an existing project (replace "UPDATE_DATA" with new data)
# update_project = project.update("UPDATE_DATA") # Assuming update exists and takes data

# Delete the project
# deleted_project = project.delete() # Assuming delete exists

Model Operations

Handle your models efficiently:

# Get a specific model by its ID
model = client.model("MODEL_ID")

# Upload a new model (replace "MODEL_DATA" with actual model details/path)
# create_model = client.upload_model("MODEL_DATA") # Assuming upload_model exists

# List models associated with a project or account
models = client.models()  # Assuming a method to list models exists

# Update model details (replace "UPDATE_DATA" with new data)
# update_model = model.update("UPDATE_DATA") # Assuming update exists

# Delete the model
# deleted_model = model.delete() # Assuming delete exists

Dataset Operations

Dataset management is straightforward:

# Get a specific dataset by its ID
dataset = client.dataset("DATASET_ID")

# Upload a new dataset (replace "DATASET_DATA" with actual dataset details/path)
# create_dataset = client.upload_dataset("DATASET_DATA") # Assuming upload_dataset exists

# List datasets
datasets = client.datasets()  # Assuming a method to list datasets exists

# Update dataset details (replace "UPDATE_DATA" with new information)
# update_dataset = dataset.update("UPDATE_DATA") # Assuming update exists

# Delete the dataset
# deleted_dataset = dataset.delete() # Assuming delete exists

Note: The exact method names (create_project, update, delete, upload_model, upload_dataset, projects, models, datasets) might differ. Please refer to the specific HUB-SDK documentation or source code for the correct API calls.

⭐ Ultralytics HUB

Experience seamless AI development with Ultralytics HUB ⭐, the ultimate platform for building, training, and deploying computer vision models. Visualize your datasets, train Ultralytics YOLO models like YOLO11 🚀, and deploy them to real-world applications without writing any code. Explore our user-friendly Ultralytics App and leverage cutting-edge tools to bring your AI visions to life. Start your journey for Free today!

Ultralytics HUB preview image

💡 Contribute

We welcome contributions to our open-source projects! Your support helps us improve and grow. To get involved, please see our Contributing Guide. We also appreciate feedback – let us know your thoughts via our Survey. Thank you 🙏 to all our contributors!

Ultralytics open-source contributors

📄 License

Ultralytics offers two licensing options to accommodate different use cases:

  • AGPL-3.0 License: This OSI-approved open-source license is ideal for students, researchers, and enthusiasts who wish to share their work and collaborate openly. See the LICENSE file for full details.
  • Enterprise License: Designed for commercial use, this license allows for the integration of Ultralytics software and AI models into commercial products and services without the open-source requirements of AGPL-3.0. If your scenario involves commercial deployment, please contact us via Ultralytics Licensing.

🤝 Contact

For bug reports and feature requests related to the HUB-SDK, please use GitHub Issues. For questions, support, and discussions with the Ultralytics team and the wider community, join our Discord!


Ultralytics GitHub space Ultralytics LinkedIn space Ultralytics Twitter space Ultralytics YouTube space Ultralytics TikTok space Ultralytics BiliBili space Ultralytics Discord

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

hub_sdk-0.0.21.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

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

hub_sdk-0.0.21-py3-none-any.whl (44.9 kB view details)

Uploaded Python 3

File details

Details for the file hub_sdk-0.0.21.tar.gz.

File metadata

  • Download URL: hub_sdk-0.0.21.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hub_sdk-0.0.21.tar.gz
Algorithm Hash digest
SHA256 b8d93bf1a697ee1be3a148219edd909e99fb110090381f93a35792eec715264e
MD5 1f9cdf99f9d0d48ae7ac52f7f32512b0
BLAKE2b-256 dbad90ce066c16071c8a33eb86196fcf53c971516b74de9f92696f0f56bc8203

See more details on using hashes here.

Provenance

The following attestation bundles were made for hub_sdk-0.0.21.tar.gz:

Publisher: publish.yml on ultralytics/hub-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hub_sdk-0.0.21-py3-none-any.whl.

File metadata

  • Download URL: hub_sdk-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 44.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hub_sdk-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 09a0b8017c73bb2b7d5e105970329e3148ade41e13987ca02eebd3e03822bfac
MD5 6a97458dba650463cd50b19232ef7774
BLAKE2b-256 aeb24697f398d7b50c0e1b62f1207294e4c9557f83e2f740482007437a23fc42

See more details on using hashes here.

Provenance

The following attestation bundles were made for hub_sdk-0.0.21-py3-none-any.whl:

Publisher: publish.yml on ultralytics/hub-sdk

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 Pingdom Monitoring Sentry Error logging StatusPage Status page