Skip to content

Commit 4724691

Browse files
committed
[CLIENT] Closing UNB-2434: Projects.
1 parent aed452b commit 4724691

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

unboxapi/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def __init__(self, api_key: str = None):
9797

9898
def create_project(
9999
self, name: str, task_type: TaskType, description: Optional[str] = None
100-
):
100+
) -> Project:
101101
"""Creates a project on the Unbox platform.
102102
103103
Parameters
@@ -148,10 +148,12 @@ def create_project(
148148
project_data = self.api.post_request(endpoint, body=payload)
149149

150150
project = Project(project_data, self.upload, self.subscription_plan, self)
151-
print(f"Created your project. Check out https://unbox.ai/projects!")
151+
print(
152+
f"Created your project. Navigate to {project.links['app']} to see it in the UI."
153+
)
152154
return project
153155

154-
def load_project(self, name: str):
156+
def load_project(self, name: str) -> Project:
155157
"""Loads an existing project from the Unbox platform.
156158
157159
Parameters
@@ -182,7 +184,11 @@ def load_project(self, name: str):
182184
"""
183185
endpoint = f"me/projects/{name}"
184186
project_data = self.api.get_request(endpoint)
185-
return Project(project_data, self.upload, self.subscription_plan, self)
187+
project = Project(project_data, self.upload, self.subscription_plan, self)
188+
print(
189+
f"Found your project. Navigate to {project.links['app']} to see it in the UI."
190+
)
191+
return project
186192

187193
def create_or_load_project(
188194
self, name: str, task_type: TaskType, description: Optional[str] = None

0 commit comments

Comments
 (0)