RapidCanvas Docs
  • Welcome
  • GETTING STARTED
    • Quick start guide
    • Introduction to RapidCanvas
    • RapidCanvas Concepts
    • Accessing the platform
  • BASIC
    • Projects
      • Projects Overview
        • Creating a project
        • Reviewing the Projects listing page
        • Duplicating a Project
        • Modifying the project settings
        • Deleting Project(s)
        • Configuring global variables at the project level
        • Working on a project
        • Generating the about content for the project
        • Generating AI snippets for each node on the Canvas
        • Marking & Unmarking a Project as Favorite
      • Canvas overview
        • Shortcut options on canvas
        • Queuing the Recipes
        • Bulk Deletion of Canvas Nodes
        • AI Guide
      • Recipes
        • AI-assisted recipe
        • Rapid model recipe
        • Template recipe
        • Code Recipe
        • RAG Recipes
      • Scheduler overview
        • Creating a scheduler
        • Running the scheduler manually
        • Managing schedulers in a project
        • Viewing the schedulers in a project
        • Viewing the run history of a specific scheduler
        • Publishing the updated data pipeline to selected jobs from canvas
        • Fetching the latest data pipeline to a specific scheduler
        • Comparing the canvas of the scheduler with current canvas of the project
      • Predictions
        • Manual Prediction
        • Prediction Scheduler
      • Segments and Scenarios
      • DataApps
        • Model DataApp
        • Project Canvas Datasets
        • Custom Uploaded Datasets
        • SQL Sources
        • Documents and PDFs
        • Prediction Service
        • Scheduler
        • Import DataApp
    • Connectors
      • Importing dataset(s) from the local system
      • Importing Text Files from the Local System
      • Connectors overview
      • Connect to external connectors
        • Importing data from Google Cloud Storage (GCS)
        • Importing data from Amazon S3
        • Importing data from Azure Blob
        • Importing data from Mongo DB
        • Importing data from Snowflake
        • Importing data from MySQL
        • Importing data from Amazon Redshift
        • Importing data from Fivetran connectors
    • Workspaces
      • User roles and permissions
    • Artifacts & Models
      • Adding Artifacts at the Project Level
      • Adding Models at the Project Level
      • Creating an artifact at the workspace level
      • Managing artifacts at the workspace level
      • Managing Models at the Workspace Level
      • Prediction services
    • Environments Overview
      • Creating an environment
      • Editing the environment details
      • Deleting an environment
      • Monitoring the resource utilization in an environment
  • ADVANCED
    • Starter Guide
      • Quick Start
    • Setup and Installation
      • Installing and setting up the SDK
    • Helper Functions
    • Notebook Guide
      • Introduction
      • Create a template
      • Code Snippets
      • DataApps
      • Prediction Service
      • How to
        • How to Authenticate
        • Create a new project
        • Create a Custom Environment
        • Add a dataset
        • Add a recipe to the dataset
        • Manage cloud connection
        • Code recipes
        • Display a template on the UI
        • Create Global Variables
        • Scheduler
        • Create new scenarios
        • Create Template
        • Use a template in a flow notebook
      • Reference Implementations
        • DataApps
        • Artifacts
        • Connectors
        • Feature Store
        • ML model
        • ML Pipeline
        • Multiple Files
      • Sample Projects
        • Model build and predict
    • Rapid Rag
  • Additional Reading
    • Release Notes
      • May 14, 2025
      • April 21, 2025
      • April 01, 2025
      • Mar 18, 2025
      • Feb 27, 2025
      • Jan 27, 2025
      • Dec 26, 2024
      • Nov 26, 2024
      • Oct 24, 2024
      • Sep 11, 2024
        • Aug 08, 2024
      • Aug 29, 2024
      • July 18, 2024
      • July 03, 2024
      • June 19, 2024
      • May 30, 2024
      • May 15, 2024
      • April 17, 2024
      • Mar 28, 2024
      • Mar 20, 2024
      • Feb 28, 2024
      • Feb 19, 2024
      • Jan 30, 2024
      • Jan 16, 2024
      • Dec 12, 2023
      • Nov 07, 2023
      • Oct 25, 2023
      • Oct 01, 2024
    • Glossary
Powered by GitBook
On this page
  • Project creation
  • Parameters
  • Deleting a project
  • Fetching all projects in a tenant
  • Fetching all datasets in a project
  • Fetching all scenarios in a project
  • Fetching all recipes in a project
  • Fetching all variables in a project
  • Adding a dataset in Jupyter Notebook to a project
  • Parameters
  • Deleting a dataset in a project
  • Fetching all datasets in a project
  1. ADVANCED
  2. Notebook Guide
  3. How to

Create a new project

import sys

from utils.rc.client.requests import Requests
from utils.rc.client.auth import AuthClient

from utils.rc.dtos.project import Project

import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
Requests.setRootHost("http://staging.dev.rapidcanvas.net/api/")
AuthClient.setToken(token="")  # you can find your token in RapidCanvas UI under tools/tokenf

Note: If you are opening the Notebook editor from the UI, you do not have to pass any token.

Project creation

Project creation needs to have an associated environment. Ensure to create an environment before creating a project because you have to pass the env.id in which you want to execute this project.

project = Project.create(
    name='Employee',
    description='Employee_promotion',
    createEmpty=True,
    envId=env.id
)
project.id

If you want to run the project in an environment, create an environment and use its ID in the project. For more information to create an environment, see creating an environment.

Parameters

Parameter name
Parameter description
Data type
Required
Example

name

The name of the project.

String

Yes

Employee

description

The description for the project.

String

No

Employee_promotion

createEmpty

Indicates if a new project should be created deleting the existing project with the same name

Boolean

Yes

True or False

envId

The environment in which you want to execute the project. For this, you have to provide the ID of the environment.

String

Yes

'4dae540d-1717-4b87-8c1e-e60357c7f7f4'

Deleting a project

The following code block must be used to delete a project.

project.deleteProject(project.id)

Sample code block for deleting a project:

project.deleteProject('617fea9f-b7d6-40d8-9237-a9c19ac6c386')

Fetching all projects in a tenant

Use this code block to get the list of projects in a tenant.

project.getAllProjects()

Example response:

{
    'featureselection': <utils.rc.dtos.project.Project at 0x7f779ad889a0>,
    'dropduplicates': <utils.rc.dtos.project.Project at 0x7f779ad882b0>,
    'onehotencoding': <utils.rc.dtos.project.Project at 0x7f779ad88a90>,
    'tsfresh': <utils.rc.dtos.project.Project at 0x7f77a03d9540>,
    'Timetoevent': <utils.rc.dtos.project.Project at 0x7f77a03d83a0>,
    'forwardfill': <utils.rc.dtos.project.Project at 0x7f77a03d9180>,
    'project1test': <utils.rc.dtos.project.Project at 0x7f779acb7b20>,
    'newproject1': <utils.rc.dtos.project.Project at 0x7f779acb7c10>,
    'test': <utils.rc.dtos.project.Project at 0x7f779acb7d30>,
    'newtimeseries': <utils.rc.dtos.project.Project at 0x7f779acb7ca0>,
    'Employee': <utils.rc.dtos.project.Project at 0x7f779acb7cd0>,
    'Employeepromotion': <utils.rc.dtos.project.Project at 0x7f779acb7be0>
}

Fetching all datasets in a project

Use this code block to get all the datasets in a project.

project.getAllDatasets()

Example response:

{
    'view_Recipe': <utils.rc.dtos.dataset.Dataset at 0x7f779ab0d3f0>,
    'output_duplicate ': <utils.rc.dtos.dataset.Dataset at 0x7f779ab308b0>,
    'dataset_new1': <utils.rc.dtos.dataset.Dataset at 0x7f779ab31db0>,
    'output_duplicates': <utils.rc.dtos.dataset.Dataset at 0x7f779ab31a20>,
    'raw_w_drop_bad_cols': <utils.rc.dtos.dataset.Dataset at 0x7f779ab32d40>
}

Fetching all scenarios in a project

Use this code block to fetch all scenarios in a project.

project.get_all_scenarios()

Example response:

[
    Scenario(name='DEFAULT', project_id='011d76b2-9dfb-43a8-8ea8-fe9ab36ffdd6', _id='50a6a293-cfa9-4941-ab7a-c0b2538ebb5d', description='Default scenario without segments', variables=[], shared_variables={}, segment_ids=[])
]

Fetching all recipes in a project

Use this code block to fetch all recipes in a project.

project.getAllRecipes()

Example response:

{
    'dataset_new1 Recipe 2': <utils.rc.dtos.recipe.Recipe at 0x7f5f0c644a90>,
    'Recipe': <utils.rc.dtos.recipe.Recipe at 0x7f5f0c6454b0>,
    'dataset_new1 Recipe': <utils.rc.dtos.recipe.Recipe at 0x7f5f0c645570>
}

Fetching all variables in a project

Use this code block to fetch all variables in a project.

project.get_all_variables()

Example response:

[
    Scenario.Variable(variable_name='input_dataset', variable_value='dataset_new1', recipe_name='dataset_new1 Recipe 2', transform_name='Drop Duplicates'),
    Scenario.Variable(variable_name='output_dataset', variable_value='output_duplicate ', recipe_name='dataset_new1 Recipe 2', transform_name='Drop Duplicates'),
    Scenario.Variable(variable_name='inputDataset', variable_value='output_duplicate ', recipe_name='Recipe', transform_name='Drop Bad Columns Regression'),
    Scenario.Variable(variable_name='dropConstantCols', variable_value='Yes', recipe_name='Recipe', transform_name='Drop Bad Columns Regression'),
    Scenario.Variable(variable_name='dropIDLikeCols', variable_value='Yes', recipe_name='Recipe', transform_name='Drop Bad Columns Regression'),
    Scenario.Variable(variable_name='dropMissingCols', variable_value='Yes', recipe_name='Recipe', transform_name='Drop Bad Columns Regression'),
    Scenario.Variable(variable_name='dropHighlyCorrCols', variable_value='No', recipe_name='Recipe', transform_name='Drop Bad Columns Regression'),
    Scenario.Variable(variable_name='targetCol', variable_value='price', recipe_name='Recipe', transform_name='Drop Bad Columns Regression'),
    Scenario.Variable(variable_name='OutputDataset', variable_value='raw_w_drop_bad_cols', recipe_name='Recipe', transform_name='Drop Bad Columns Regression'),
    Scenario.Variable(variable_name='input_dataset', variable_value='dataset_new1', recipe_name='dataset_new1 Recipe', transform_name='Drop Duplicates'),
    Scenario.Variable(variable_name='output_dataset', variable_value='output_duplicates', recipe_name='dataset_new1 Recipe', transform_name='Drop Duplicates')
]

Adding a dataset in Jupyter Notebook to a project

Use this code block to add a dataset to a project.

employee = project.addDataset(
    dataset_name='employee',
    dataset_description='Employee Promotion Dataset',
    dataset_file_path='Car_Price.csv'  # path as per your folder structure in Jupyter
)

Example response:

INFO:Creating new dataset by name:employee1
INFO:Uploading file Car_Price.csv ....
INFO:Uploading Done

Parameters

The following table describes each parameter you must pass in the code block to add a dataset to a project.

Parameter name
Parameter description
Data type
Required
Example

dataset_name

The name of the dataset.

String

Yes

employee

dataset_description

The description for the dataset.

String

No

Employee Promotion Dataset

dataset_file_path

The path of the file. This should be as per the folder structure in Jupyter.

String

Yes

Car_Price.csv

Deleting a dataset in a project

Use this code block to delete a dataset from the project.

project.deleteDataset('id')

Sample code:

project.deleteDataset('c4bef95e-c16f-42f8-a82c-1262d14d7d69')

Example response:

INFO:Dataset deleted

Fetching all datasets in a project

Use this code block to fetch all input and output datasets in a project.

project.getAllDatasets()

Example response:

{
    'view_Recipe': <utils.rc.dtos.dataset.Dataset at 0x7fe7a55c2b00>,
    'employee1': <utils.rc.dtos.dataset.Dataset at 0x7fe7a55c1c00>,
    'output_duplicate ': <utils.rc.dtos.dataset.Dataset at 0x7fe7a55c3490>,
    'dataset_new1': <utils.rc.dtos.dataset.Dataset at 0x7fe7a55c0e80>,
    'output_duplicates': <utils.rc.dtos.dataset.Dataset at 0x7fe7a55c3b80>,
    'raw_w_drop_bad_cols': <utils.rc.dtos.dataset.Dataset at 0x7fe7a55c1c30>,
    'employee': <utils.rc.dtos.dataset.Dataset at 0x7fe7e85dc4c0>
}
PreviousHow to AuthenticateNextCreate a Custom Environment

Last updated 2 months ago