create_project

imerit_ango.sdk.SDK.

create_project(name, description)

Creates a new project with the specified name and description.

Parameters

  • name: string

    • The name of the project to be created. This field is required and cannot be left empty.

    • Example: 'Project One'

  • description: string, optional, default ""

    • A brief description of the project.

    • Example: 'Vehicle Classification Project'

Returns:

  • output: dict

Example

import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')

ango_sdk = SDK(api_key)

response = ango_sdk.create_project(name="Created from SDK",
                                   description="I created this from the SDK.")

project_id = response.get("data", {}).get("project", {}).get("_id")
Returns
{
    "status": "success",
    "data": {
        "project": {
            "errorSchema": {
                "Missing": [],
                "Wrong": [],
                "Unqualified": []
            },
            "role": "<USER ROLE>",
            "description": "I created this from the SDK.",
            "categorySchema": {
                "tools": [],
                "classifications": [],
                "relations": []
            },
            "benchmarkEnabled": false,
            "benchmarkRatio": 10,
            "customValidationEnabled": false,
            "submissionPrevent": false,
            "validationFunction": "",
            "gcSyncEnabled": false,
            "deleted": false,
            "ocrLanguage": "eng",
            "idleTimeout": 300,
            "errorCodesEnabled": false,
            "exportStorageEnabled": false,
            "taskSkipEnabled": true,
            "unassignSkippedTask": false,
            "_id": "<PROJECT ID>",
            "name": "Created from SDK",
            "owner": "<USER EMAIL>",
            "organization": "<ORGANIZATION ID>",
            "createdAt": "<CREATED AT TIME>",
            "assignedTo": [],
            "pluginPresets": [],
            "batches": [],
            "stages": [
                {
                    "logic": {
                        "conditions": []
                    },
                    "assignedTo": [],
                    "next": [
                        "Label"
                    ],
                    "readOnly": false,
                    "rememberAssignee": true,
                    "queueLIFO": false,
                    "autoForward": true,
                    "_id": "<ID>",
                    "id": "Start",
                    "name": "Start",
                    "type": "Start",
                    "position": {
                        "x": 0,
                        "y": 50
                    }
                },
                {
                    "logic": {
                        "conditions": []
                    },
                    "assignedTo": [],
                    "next": [],
                    "readOnly": false,
                    "rememberAssignee": true,
                    "queueLIFO": false,
                    "autoForward": true,
                    "_id": "<ID>",
                    "id": "Complete",
                    "name": "Complete",
                    "type": "Complete",
                    "position": {
                        "x": 600,
                        "y": 78
                    }
                },
                {
                    "logic": {
                        "conditions": []
                    },
                    "assignedTo": [],
                    "next": [
                        "Complete"
                    ],
                    "readOnly": false,
                    "rememberAssignee": true,
                    "queueLIFO": false,
                    "autoForward": true,
                    "_id": "<ID>",
                    "id": "Label",
                    "name": "Label",
                    "type": "Label",
                    "position": {
                        "x": 300,
                        "y": 50
                    }
                }
            ],
            "assetBuilderTemplates": [],
            "__v": 0
        }
    }
}

Last updated