
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
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.
Ready to dive into the HUB-SDK? Follow these steps to set it up on your machine.
Before you begin, ensure your system meets the following requirements:
You can install the HUB-SDK using either of the following methods:
For the latest stable release, install the HUB-SDK from PyPI using pip:
pip install hub-sdk
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 .
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.
You need to authenticate your client. Choose one of the following methods:
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"}
Alternatively, authenticate using your Ultralytics HUB email and password.
# Authenticate using your email and password
credentials = {"email": "YOUR_EMAIL", "password": "YOUR_PASSWORD"}
Instantiate the HUBClient
with your chosen credentials:
# Initialize the client with your credentials
from hub_sdk import HUBClient
client = HUBClient(credentials)
The following code snippets demonstrate how to perform CRUD operations on Projects, Models, and Datasets using the initialized client.
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
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 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.
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!
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 offers two licensing options to accommodate different use cases:
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!
FAQs
Ultralytics HUB Client SDK.
We found that hub-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.