Group
Group
Bases: BaseClassWithFieldData
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
id of the group |
name |
str
|
name of the group |
shortid |
str
|
shortid of the group |
files |
List[File]
|
List of files belonging to this group. See File for more information. |
fielddata |
List[FieldData]
|
List of field data belonging to this group. See FieldData for more information. |
samples |
List[Sample]
|
This list contains 'sample' objects belonging to this group. These objects are partially fetched, providing only the name and ID. To retrieve the entire object, invoke the 'get()' method on the 'sample'. Refer to nested objects in Getting Started for further details. For a comprehensive understanding of 'sample' objects, see the provided Sample. |
experiments |
List[Experiment]
|
This list contains 'experiment' objects belonging to this group. These objects are partially fetched, providing only the name and ID. To retrieve the entire object, invoke the 'get()' method on the 'experiment'. Refer to nested objects in Getting Started for further details. For a comprehensive understanding of 'experiment' objects, see the provided Experiment. |
researchitems |
Dict[str, List[ResearchItem]]
|
This is a dictionary with category name as keys and lists with the corresponding |
sub_groups |
List[Group]
|
This list contains 'group' objects that are subgroups of this group. These objects are partially fetched, providing only the name and ID. To retrieve the entire object, invoke the 'get()' method on the 'group'. Refer to nested objects in Getting Started for further details. For a comprehensive understanding of 'group' objects, see the provided Group. |
parent_group |
Group
|
If the group is a subgroup, the attribute holds its parent group. This object is partially fetched, providing only the name and ID. To retrieve the entire object, invoke the 'get()' method on the 'group'. Refer to nested objects in Getting Started for further details. For a comprehensive understanding of 'group' objects, see the provided Group. |
_fetched |
bool
|
This is a Boolean attribute indicating whether all attributes have been retrieved from the server or only the name and ID are present. |
Source code in furthrmind\collection\group.py
8 9 10 11 12 13 14 15 16 17 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 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 |
|
add_field(field_name='', field_type='', field_id='', value=None, unit=None, position=None)
Method to add a field to the current item
Parameters:
Name | Type | Description | Default |
---|---|---|---|
field_name |
str
|
Name of field that should be added. If fieldname provided, also fieldtype must be specified. Either fieldname and fieldtype or field_id must be specified. |
''
|
field_type |
str
|
Type of field. Must be one of:
|
''
|
field_id |
str
|
Id of field that should be added. |
''
|
value |
Any
|
Value of the field. The data type of the value depends on the field_type:
|
None
|
unit |
Union[Dict, str]
|
Dictionary with id or name, or string representing the name, or string representing the id. |
None
|
position |
int
|
The position where the field should be added in the card. Starting at "0". Optionally. |
None
|
Returns:
Type | Description |
---|---|
FieldData
|
The new FieldData object that was created. |
Source code in furthrmind\collection\baseclass.py
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 |
|
add_many_fields(data_list)
Method to add many fields to the current item
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_list |
List[Dict]
|
List of dictionaries containing the information about the fields to be added. Each dictionary should have the following keys:
|
required |
Returns:
Type | Description |
---|---|
List[FieldData]
|
List of FieldData objects representing the added fields. |
Source code in furthrmind\collection\baseclass.py
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 |
|
create(name, parent_group_id='', project_id='')
classmethod
Method to create a new group.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the item to be created. |
required |
parent_group_id |
str
|
The ID of the parent group where the new group should belong to. Defaults to an empty string. |
''
|
project_id |
str
|
Optionally, create a group in another project as the furthrmind SDK was initiated with |
''
|
Returns:
Type | Description |
---|---|
instance of the group class
|
|
Source code in furthrmind\collection\group.py
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 |
|
create_many(name_list, project_id='')
classmethod
Method to create multiple groups
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_list |
List[str]
|
A list containing names of the groups to be created. |
required |
project_id |
str
|
Optionally to create groups in another project as the furthrmind sdk was initiated with |
''
|
Returns:
Type | Description |
---|---|
List[Self]
|
A list containing instances of the group class corresponding to the groups created. |
Source code in furthrmind\collection\group.py
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 |
|
delete(id='', project_id='')
classmethod
Method to delete an item. Can be called as a classmethod with providing the id to be deleted or on the instance of a class
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
The id of the resource to delete |
''
|
project_id |
str
|
Optionally to delete an item in another project as the furthrmind sdk was initiated with |
''
|
Returns:
Type | Description |
---|---|
str
|
The id of the item |
Source code in furthrmind\collection\baseclass.py
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
|
get(id='', name='', shortid='', parent_group_id='', project_id='')
classmethod
Method to get one group by its id, name, or shortid. If called on an instance of the class, the id of the class is used.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
id or short_id of requested group |
''
|
name |
str
|
name of requested group. For subgroups, see parent_group_id parameter |
''
|
shortid |
str
|
shortid of requested group |
''
|
parent_group_id |
str
|
id of parent group. If a subgroup is requested, the name and the parent_group_id is required |
''
|
project_id |
str
|
Optionally to get a group from another project as the furthrmind sdk was initiated with. Defaults to None |
''
|
Returns:
Type | Description |
---|---|
Self
|
Instance of group class |
Raises:
Type | Description |
---|---|
AssertionError
|
When used as a class method, id, name, or shortid must be specified. |
Source code in furthrmind\collection\group.py
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 |
|
get_all(project_id='')
classmethod
Method to get all groups belonging to one project
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_id |
str
|
Optionally to get groups from another project as the furthrmind sdk was initiated with |
''
|
Returns:
Type | Description |
---|---|
List[Self]
|
A list of instances of the group class. |
Source code in furthrmind\collection\group.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
get_many(ids=(), shortids=(), names=(), project_id='')
classmethod
Method to get many groups
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ids |
List[str]
|
List of ids to filter the groups. |
()
|
shortids |
List[str]
|
List of short_ids to filter the groups. |
()
|
names |
List[str]
|
List of names to filter the groups. |
()
|
project_id |
str
|
Optionally to get groups from another project as the furthrmind sdk was initiated with |
''
|
Returns:
Type | Description |
---|---|
List[Self]
|
List of instances of the Group class. |
Raises:
Type | Description |
---|---|
AssertionError
|
If none of the parameters (ids, shortids, or names) are specified. |
Source code in furthrmind\collection\group.py
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 |
|
remove_field(field_name='', field_id='')
Removes a field from the current item.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
field_name |
str
|
Name of the field that should be removed. Either the |
''
|
field_id |
str
|
ID of the field that should be removed.Either the |
''
|
Returns:
Type | Description |
---|---|
str
|
ID of the item after the field is removed. |
Raises:
Type | Description |
---|---|
ValueError
|
If no field is found with the given |
Source code in furthrmind\collection\baseclass.py
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 |
|
set_calculation_result(value, field_name='', field_id='', fielddata_id='')
Method to update a calculation result
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
dict
|
Dictionary containing the calculation result to be set for the field. |
required |
field_name |
str
|
Name of the field that should be updated. Either |
''
|
field_id |
str
|
ID of the field that should be updated. Either |
''
|
fielddata_id |
str
|
ID of the fielddata that should be updated. Either |
''
|
Returns:
Type | Description |
---|---|
id
|
The ID of the fielddata that was updated. |
Raises:
Type | Description |
---|---|
ValueError
|
If no field is found with the given |
Source code in furthrmind\collection\baseclass.py
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 |
|
to_dict()
Converts the object's attributes to a dictionary representation.
Returns:
Type | Description |
---|---|
dict
|
Dictionary containing the object's attributes (excluding private attributes, callable attributes, and attributes of type Furthrmind). |
Source code in furthrmind\collection\baseclass.py
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
|
update_field_unit(unit, field_name='', field_id='')
Method to update the unit of a field.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
unit |
Union[Dict, str]
|
Dictionary with id or name, or string representing the name, or string representing the id. |
required |
field_name |
str
|
The name of the field that should be updated. Either |
''
|
field_id |
str
|
The ID of the field that should be updated. Either |
''
|
Returns:
Type | Description |
---|---|
id
|
The ID of the updated field. |
Raises:
Type | Description |
---|---|
ValueError
|
If no field is found with the given |
Source code in furthrmind\collection\baseclass.py
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 |
|
update_field_value(value, field_name='', field_id='')
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
various data types
|
The value to be updated in the field.
|
required |
field_name |
str
|
Name of the field that should be updated. Either |
''
|
field_id |
str
|
ID of the field that should be updated. Either |
''
|
Returns:
Type | Description |
---|---|
int
|
The ID of the field that was updated. |
Raises:
Type | Description |
---|---|
ValueError
|
If no field is found with the given |
Source code in furthrmind\collection\baseclass.py
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 |
|