From 09318cbafa08ce1a129b1a22cb9c3f0f31de8645 Mon Sep 17 00:00:00 2001 From: Erol444 Date: Tue, 13 Jan 2026 18:29:10 +0100 Subject: [PATCH 1/2] Updated readme - usage of python sdk --- README.md | 25 ++++++++++--------------- docs/index.md | 33 ++++++++++++++++----------------- 2 files changed, 26 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 31518ca9..24ac711e 100644 --- a/README.md +++ b/README.md @@ -104,21 +104,19 @@ Below are some common methods used with the Roboflow Python package, presented c ```python import roboflow -roboflow.login() +# Pass API key or use roboflow.login() +rf = roboflow.Roboflow(api_key="MY_API_KEY") -rf = roboflow.Roboflow() +workspace = rf.workspace() -# create a project -rf.create_project( - project_name="project name", - project_type="project-type", - license="project-license" # "private" for private projects +# creating object detection model that will detect flowers +project = workspace.create_project( + project_name="Flower detector", + project_type="object-detection", # Or "classification", "instance-segmentation", "semantic-segmentation" + project_license="MIT", # "private" for private projects, only available for paid customers + annotation="flowers" # If you plan to annotate lillys, sunflowers, etc. ) -workspace = rf.workspace("WORKSPACE_URL") -project = workspace.project("PROJECT_URL") -version = project.version("VERSION_NUMBER") - # upload a dataset workspace.upload_dataset( dataset_path="./dataset/", @@ -128,12 +126,9 @@ workspace.upload_dataset( project_type="object-detection" ) -# upload model weights -version.deploy(model_type="yolov8", model_path=f”{HOME}/runs/detect/train/”) +version = project.version("VERSION_NUMBER") # upload model weights - yolov10 -# Before attempting to upload YOLOv10 models install ultralytics like this: -# pip install git+https://github.com/THU-MIG/yolov10.git version.deploy(model_type="yolov10", model_path=f”{HOME}/runs/detect/train/”, filename="weights.pt") # run inference diff --git a/docs/index.md b/docs/index.md index 431d8ab2..0545fa22 100644 --- a/docs/index.md +++ b/docs/index.md @@ -66,23 +66,20 @@ rf = roboflow.Roboflow(api_key="") Below are some common methods used with the Roboflow Python package, presented concisely for reference. For a full library reference, refer to the [Roboflow API reference documentation](https://docs.roboflow.com/api-reference). ```python -import roboflow - -roboflow.login() - -rf = roboflow.Roboflow() - -# create a project -rf.create_project( - project_name="project name", - project_type="project-type", - license="project-license" # "private" for private projects +import roboflow + +# Pass API key or use roboflow.login() +rf = roboflow.Roboflow(api_key="MY_API_KEY") + +workspace = rf.workspace() +# creating object detection model that will detect flowers +project = workspace.create_project( + project_name="Flower detector", + project_type="object-detection", # Or "classification", "instance-segmentation", "semantic-segmentation" + project_license="MIT", # "private" for private projects, only available for paid customers + annotation="flowers" # If you plan to annotate lillys, sunflowers, etc. ) -workspace = rf.workspace("WORKSPACE_URL") -project = workspace.project("PROJECT_URL") -version = project.version("VERSION_NUMBER") - # upload a dataset workspace.upload_dataset( dataset_path="./dataset/", @@ -92,8 +89,10 @@ workspace.upload_dataset( project_type="object-detection" ) -# upload model weights -version.deploy(model_type="yolov8", model_path=f”{HOME}/runs/detect/train/”) +version = project.version("VERSION_NUMBER") + +# upload model weights - yolov10 +version.deploy(model_type="yolov10", model_path=f”{HOME}/runs/detect/train/”, filename="weights.pt") # run inference model = version.model From 0cde72e4c6b23b9ae034eab415c53db428e94080 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 17:30:35 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix(pre=5Fcommit):=20=F0=9F=8E=A8=20auto=20?= =?UTF-8?q?format=20pre-commit=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 0545fa22..542d11b2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -66,7 +66,7 @@ rf = roboflow.Roboflow(api_key="") Below are some common methods used with the Roboflow Python package, presented concisely for reference. For a full library reference, refer to the [Roboflow API reference documentation](https://docs.roboflow.com/api-reference). ```python -import roboflow +import roboflow # Pass API key or use roboflow.login() rf = roboflow.Roboflow(api_key="MY_API_KEY")