Model for contributors list file
 
Definition at line 44 of file contributor_list.py.
 
◆ __init__()
      
        
          | def coordinator.contributor_list.ContributorList.__init__  | 
          ( | 
            | 
          self,  | 
        
        
           | 
           | 
          List[Contributor]  | 
          contributors  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 48 of file contributor_list.py.
   48     def __init__(self, contributors: List[Contributor]):
 
   49         self.contributors = contributors
 
 
 
 
◆ __getitem__()
      
        
          |  Contributor coordinator.contributor_list.ContributorList.__getitem__  | 
          ( | 
            | 
          self,  | 
        
        
           | 
           | 
          int  | 
          key  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 77 of file contributor_list.py.
   77     def __getitem__(self, key: int) -> Contributor:
 
   78         return self.contributors[key]
 
 
 
 
◆ __len__()
      
        
          |  int coordinator.contributor_list.ContributorList.__len__  | 
          ( | 
            | 
          self | ) | 
           | 
        
      
 
Definition at line 80 of file contributor_list.py.
   80     def __len__(self) -> int:
 
   81         return len(self.contributors)
 
 
 
 
◆ ensure_validity()
      
        
          |  None coordinator.contributor_list.ContributorList.ensure_validity  | 
          ( | 
            | 
          self | ) | 
           | 
        
      
 
Checks the server configuration. If there are any problems, throw an
exception with a message.
 
Definition at line 51 of file contributor_list.py.
   51     def ensure_validity(self) -> None:
 
   53         Checks the server configuration. If there are any problems, throw an 
   54         exception with a message. 
   60         for contr 
in self.contributors:
 
   62                 raise Exception(f
"Key for {contr.email} has invalid evidence")
 
 
 
 
◆ from_json()
  
  
      
        
          |  ContributorList coordinator.contributor_list.ContributorList.from_json  | 
          ( | 
          str  | 
          json_str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 87 of file contributor_list.py.
   87     def from_json(json_str: str) -> ContributorList:
 
   88         return ContributorList._from_json_dict(json.loads(json_str))
 
 
 
 
◆ get_contributor_index()
      
        
          |  Optional[int] coordinator.contributor_list.ContributorList.get_contributor_index  | 
          ( | 
            | 
          self,  | 
        
        
           | 
           | 
          VerificationKey  | 
          verification_key  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Return the index of the contributor, if present.
 
Definition at line 64 of file contributor_list.py.
   64     def get_contributor_index(
 
   66             verification_key: VerificationKey) -> Optional[int]:
 
   68         Return the index of the contributor, if present. 
   73                     for c 
in self.contributors].index(key)
 
 
 
 
◆ to_json()
      
        
          |  str coordinator.contributor_list.ContributorList.to_json  | 
          ( | 
            | 
          self | ) | 
           | 
        
      
 
Definition at line 83 of file contributor_list.py.
   83     def to_json(self) -> str:
 
   84         return json.dumps(self._to_json_dict(), indent=4)
 
 
 
 
◆ contributors
      
        
          | coordinator.contributor_list.ContributorList.contributors | 
        
      
 
 
The documentation for this class was generated from the following file: