Evaluation¶
Contained within this file are experimental interfaces for working with the Synapse Python Client. Unless otherwise noted these interfaces are subject to change at any time. Use at your own risk.
API reference¶
synapseclient.models.Evaluation
dataclass
¶
Bases: EvaluationSynchronousProtocol
An Evaluation is the core object of the Evaluation API, used to support collaborative data analysis challenges in Synapse.
An Evaluation object represents an evaluation queue in Synapse:
https://rest-docs.synapse.org/rest/org/sagebionetworks/evaluation/model/Evaluation.html
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
The unique immutable ID for this Evaluation. |
etag |
Synapse employs an Optimistic Concurrency Control (OCC) scheme to handle concurrent updates. The eTag changes every time an Evaluation is updated; it is used to detect when a client's copy of an Evaluation is out-of-date. |
name |
The name of this Evaluation. |
description |
A text description of this Evaluation. |
owner_id |
The ID of the Synapse user who created this Evaluation. |
created_on |
The date on which Evaluation was created. |
content_source |
The Synapse ID of the Entity to which this Evaluation belongs, e.g. a reference to a Synapse project. |
submission_instructions_message |
Message to display to users detailing acceptable formatting for Submissions to this Evaluation. |
submission_receipt_message |
Message to display to users upon successful submission to this Evaluation. |
Create a new evaluation in a project
Create a new evaluation on Synapse by storing an evaluation object with the required fields. If there are any fields missing, an error will be raised.
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(
name="My Challenge Evaluation",
description="Evaluation for my data challenge",
content_source="syn123456",
submission_instructions_message="Submit CSV files only",
submission_receipt_message="Thank you for your submission!",
)
created = evaluation.store()
Update an existing evaluation retrieved from Synapse by ID
You can use the store method to create and update evaluations.
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(id="9999999").get()
evaluation.description = "Updated description for my evaluation"
updated = evaluation.store()
Retrieve and update the ACL of an evaluation
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(id="9999999").get()
acl = evaluation.get_acl()
# Let's grant this team READ and SUBMIT permissions
team_id = "123456"
evaluation.update_acl(principal_id=team_id, access_type=["READ", "SUBMIT"])
# Now let's revoke all permissions from this team
team_to_revoke_from = "654321"
evaluation.update_acl(principal_id=team_to_revoke_from, access_type=[])
Delete an evaluation
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(id="9999999").get()
evaluation.delete()
Source code in synapseclient/models/evaluation.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 | |
Functions¶
store
¶
store(*, synapse_client: Optional[Synapse] = None) -> Evaluation
Create a new Evaluation or update an existing one in Synapse.
If the Evaluation object has an ID and etag, it will be updated. Otherwise, a new Evaluation will be created.
| PARAMETER | DESCRIPTION |
|---|---|
synapse_client
|
If not passed in and caching was not disabled by
|
| RETURNS | DESCRIPTION |
|---|---|
Evaluation
|
The created or updated Evaluation object. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If required fields are missing. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Create a new evaluation in a project with ID "syn123456"
Create a new evaluation on Synapse by storing an evaluation object with the required fields. If there are any fields missing, an error will be raised.
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(
name="My Challenge Evaluation",
description="Evaluation for my data challenge",
content_source="syn123456",
submission_instructions_message="Submit CSV files only",
submission_receipt_message="Thank you for your submission!"
).store()
Update an evaluation that was retrieved from Synapse
You can use the store method to create and update evaluations.
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(id="9999999").get()
evaluation.description = "Updated description for my evaluation"
updated_evaluation = evaluation.store()
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If required fields are missing. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Source code in synapseclient/models/protocols/evaluation_protocol.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
get
¶
get(*, synapse_client: Optional[Synapse] = None) -> Evaluation
Get this Evaluation from Synapse by its ID or name.
| PARAMETER | DESCRIPTION |
|---|---|
synapse_client
|
If not passed in and caching was not disabled by
|
| RETURNS | DESCRIPTION |
|---|---|
Evaluation
|
The retrieved Evaluation object. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If neither id nor name is set. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Get an evaluation by ID
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(id="9999999").get()
Get an evaluation by name
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(name="My Challenge Evaluation").get()
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If neither id nor name is set. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Source code in synapseclient/models/protocols/evaluation_protocol.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
delete
¶
Delete this Evaluation from Synapse. ID must be set in order to delete the Evaluation.
| PARAMETER | DESCRIPTION |
|---|---|
synapse_client
|
If not passed in and caching was not disabled by
|
| RETURNS | DESCRIPTION |
|---|---|
None
|
None |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If evaluation_id is not set. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Delete an evaluation by ID
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
Evaluation(id="9614112").delete()
Get and then delete an evaluation
If you do not have the ID of the evaluation, you can first retrieve it from Synapse by name. That will populate the ID attribute in your Evaluation object, at which point you can delete it.
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
# First get the evaluation by name, so the ID attribute is set in your
# Evaluation object, then delete it.
evaluation = Evaluation(name="My Challenge Evaluation").get()
evaluation.delete()
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If evaluation_id is not set. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Source code in synapseclient/models/protocols/evaluation_protocol.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
get_all_evaluations
staticmethod
¶
get_all_evaluations(access_type: Optional[str] = None, active_only: Optional[bool] = None, evaluation_ids: Optional[List[str]] = None, offset: Optional[int] = None, limit: Optional[int] = None, *, synapse_client: Optional[Synapse] = None) -> List[Evaluation]
Get a list of all Evaluations, within a given range.
| PARAMETER | DESCRIPTION |
|---|---|
access_type
|
The type of access for the user to filter for, optional and defaults to ACCESS_TYPE.READ. |
active_only
|
If True then return only those evaluations with rounds defined and for which the current time is in one of the rounds. |
evaluation_ids
|
An optional list of evaluation IDs to which the response is limited. |
offset
|
The offset index determines where this page will start from. An index of 0 is the first entity. When null it will default to 0. |
limit
|
Limits the number of entities that will be fetched for this page. When null it will default to 10. |
synapse_client
|
If not passed in and caching was not disabled by
|
| RETURNS | DESCRIPTION |
|---|---|
List[Evaluation]
|
List[Evaluation]: A list of all evaluations. |
| RAISES | DESCRIPTION |
|---|---|
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Get all evaluations the user has at least READ access to
A default call will return evaluations where the user has READ access, without needing to specify access type.
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
all_evaluations = Evaluation.get_all_evaluations()
Get only active evaluations with a limit
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
active_evaluations = Evaluation.get_all_evaluations(
active_only=True,
limit=20
)
| RAISES | DESCRIPTION |
|---|---|
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Source code in synapseclient/models/protocols/evaluation_protocol.py
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | |
get_available_evaluations
staticmethod
¶
get_available_evaluations(active_only: Optional[bool] = None, evaluation_ids: Optional[List[str]] = None, offset: Optional[int] = None, limit: Optional[int] = None, *, synapse_client: Optional[Synapse] = None) -> List[Evaluation]
Get a list of Evaluations to which the user has SUBMIT permission, within a given range.
| PARAMETER | DESCRIPTION |
|---|---|
active_only
|
If True then return only those evaluations with rounds defined and for which the current time is in one of the rounds. |
evaluation_ids
|
An optional list of evaluation IDs to which the response is limited. |
offset
|
The offset index determines where this page will start from. An index of 0 is the first entity. When null it will default to 0. |
limit
|
Limits the number of entities that will be fetched for this page. When null it will default to 10. |
synapse_client
|
If not passed in and caching was not disabled by
|
| RETURNS | DESCRIPTION |
|---|---|
List[Evaluation]
|
List[Evaluation]: A list of available evaluations. |
| RAISES | DESCRIPTION |
|---|---|
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Get all evaluations where the current user has SUBMIT permission
A default call will return evaluations where the user has SUBMIT permission, without needing to specify access type.
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
available_evaluations = Evaluation.get_available_evaluations()
Get the first 5 evaluations where the current user has SUBMIT permission
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
limited_evaluations = Evaluation.get_available_evaluations(
limit=5
)
| RAISES | DESCRIPTION |
|---|---|
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Source code in synapseclient/models/protocols/evaluation_protocol.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | |
get_evaluations_by_project
staticmethod
¶
get_evaluations_by_project(project_id: str, access_type: Optional[str] = None, active_only: Optional[bool] = None, evaluation_ids: Optional[List[str]] = None, offset: Optional[int] = None, limit: Optional[int] = None, *, synapse_client: Optional[Synapse] = None) -> List[Evaluation]
Get Evaluations tied to a project.
| PARAMETER | DESCRIPTION |
|---|---|
project_id
|
The ID of the project (e.g., "syn123456").
TYPE:
|
access_type
|
The type of access for the user to filter for, optional and defaults to ACCESS_TYPE.READ. |
active_only
|
If True then return only those evaluations with rounds defined and for which the current time is in one of the rounds. |
evaluation_ids
|
An optional list of evaluation IDs to which the response is limited. |
offset
|
The offset index determines where this page will start from. An index of 0 is the first entity. When null it will default to 0. |
limit
|
Limits the number of entities that will be fetched for this page. When null it will default to 10. |
synapse_client
|
If not passed in and caching was not disabled by
|
| RETURNS | DESCRIPTION |
|---|---|
List[Evaluation]
|
List[Evaluation]: A list of Evaluations tied to the project. |
| RAISES | DESCRIPTION |
|---|---|
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Get all evaluations for a project
The user must have at least READ access to the evaluations to retrieve the evaluations from a given project.
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
project_evaluations = Evaluation.get_evaluations_by_project(
project_id="syn123456"
)
Get a limited set of evaluations for a project
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
limited_project_evaluations = Evaluation.get_evaluations_by_project(
project_id="syn123456",
limit=5
)
| RAISES | DESCRIPTION |
|---|---|
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Source code in synapseclient/models/protocols/evaluation_protocol.py
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | |
get_acl
¶
Get the access control list (ACL) governing this evaluation.
| PARAMETER | DESCRIPTION |
|---|---|
synapse_client
|
If not passed in and caching was not disabled by
|
| RETURNS | DESCRIPTION |
|---|---|
Dict
|
The ACL for this Evaluation. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If evaluation_id is not set. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Get the ACL for an evaluation
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(id="9999999").get()
acl = evaluation.get_acl()
Source code in synapseclient/models/protocols/evaluation_protocol.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
update_acl
¶
update_acl(principal_id: Optional[Union[str, int]] = None, access_type: Optional[List[str]] = None, acl: Optional[dict] = None, *, synapse_client: Optional[Synapse] = None) -> Dict
Update the access control list (ACL) for this evaluation.
You can either:
1. Provide a principal_id and access_type list to update permissions for a specific user/team
2. Provide a complete ACL dictionary to update all permissions at once
To remove a principal from the ACL completely, provide an empty list for access_type.
The available access types are:
- 'CREATE'
- 'SUBMIT'
- 'READ_PRIVATE_SUBMISSION'
- 'DELETE_SUBMISSION'
- 'UPDATE_SUBMISSION'
- 'CHANGE_PERMISSIONS'
- 'READ'
- 'DELETE'
- 'UPDATE'
| PARAMETER | DESCRIPTION |
|---|---|
acl
|
An AccessControlList object or dictionary containing the ACL data to update. |
synapse_client
|
If not passed in and caching was not disabled by
|
| RETURNS | DESCRIPTION |
|---|---|
Dict
|
The updated ACL. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If neither (principal_id and access_type) nor acl is provided, or if the ACL object is invalid. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Update permissions for a specific principal (user/team)
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
# Get the evaluation first
evaluation = Evaluation(id="9999999").get()
# Update permissions for user with ID 12345
updated_acl = evaluation.update_acl(
principal_id="12345",
access_type=["READ", "SUBMIT"]
)
Remove a principal (user/team) from the ACL
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
# Get the evaluation first
evaluation = Evaluation(id="9999999").get()
# Remove user with ID 12345 from the ACL by providing an empty list
updated_acl = evaluation.update_acl(
principal_id="12345",
access_type=[]
)
Update the entire ACL manually
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
# Get the evaluation first
evaluation = Evaluation(id="9999999").get()
# Get the current ACL
acl = evaluation.get_acl()
# Modify the ACL manually
acl["resourceAccess"].append({
"principalId": 12345,
"accessType": ["READ", "SUBMIT"]
})
# Update with the modified ACL
updated_acl = evaluation.update_acl(acl=acl)
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the ACL object is invalid or missing required fields. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Source code in synapseclient/models/protocols/evaluation_protocol.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | |
get_permissions
¶
Get the user permissions for this evaluation.
| PARAMETER | DESCRIPTION |
|---|---|
synapse_client
|
If not passed in and caching was not disabled by
|
| RETURNS | DESCRIPTION |
|---|---|
Dict
|
The permissions for the specified user. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If evaluation_id is not set. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Get permissions for the current user
from synapseclient.models import Evaluation
from synapseclient import Synapse
syn = Synapse()
syn.login()
evaluation = Evaluation(id="9999999").get()
my_permissions = evaluation.get_permissions()
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If evaluation_id is not set. |
SynapseHTTPError
|
If the service rejects the request or an HTTP error occurs. |
Source code in synapseclient/models/protocols/evaluation_protocol.py
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | |