Skip to content

Commit 792f658

Browse files
authored
Add self_serve arg to project creation. (#35)
* Add self_serve arg to project creation. * Formatting fixes
1 parent 8094e65 commit 792f658

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

scaleapi/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,11 @@ def get_batches(
504504
has_more = batches.has_more
505505

506506
def create_project(
507-
self, project_name: str, task_type: TaskType, params: Dict = None
507+
self,
508+
project_name: str,
509+
task_type: TaskType,
510+
params: Dict = None,
511+
self_serve: bool = False,
508512
) -> Project:
509513
"""Creates a new project.
510514
https://docs.scale.com/reference#project-creation
@@ -524,7 +528,12 @@ def create_project(
524528
Project: [description]
525529
"""
526530
endpoint = "projects"
527-
payload = dict(type=task_type.value, name=project_name, params=params)
531+
payload = dict(
532+
type=task_type.value,
533+
name=project_name,
534+
params=params,
535+
self_serve=self_serve,
536+
)
528537
projectdata = self.api.post_request(endpoint, body=payload)
529538
return Project(projectdata, self)
530539

0 commit comments

Comments
 (0)