forked from Sage-Bionetworks/synapsePythonClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.py
More file actions
29 lines (21 loc) · 894 Bytes
/
Copy pathproject.py
File metadata and controls
29 lines (21 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
Here is where you'll find the code for the Project tutorial.
"""
# Step 1: Create a new project
import synapseclient
from synapseclient import Project
syn = synapseclient.login()
# Project names must be globally unique
project = Project(name="My uniquely named project about Alzheimer's Disease")
project = syn.store(obj=project)
# Step 2: Print stored attributes about your project
print(f"My project ID is: {project.id}")
print(f"I created my project on: {project.createdOn}")
print(f"The ID of the user that created my project is: {project.createdBy}")
print(f"My project was last modified on: {project.modifiedOn}")
# Step 3: Get an existing project
my_project_id = syn.findEntityId(
name="My uniquely named project about Alzheimer's Disease"
)
my_project_object = syn.get(entity=my_project_id)
print(f"I just got my project: {my_project_object.name}, id: {my_project_id}")