src/pybel/manager/models.py
def to_json(self, include_id: bool = False) -> Mapping[str, str]:
        """Return the most useful entries as a dictionary.

        :param include_id: If true, includes the model identifier
        """
        result = {
            'keyword': self.keyword,
            'name': self.name,
            'version': self.version,
        }

        if self.url:
            result['url'] = self.url
        else:
            result['pattern'] = self.pattern

        if include_id:
            result['id'] = self.id

        return result
Return the most useful entries as a dictionary.

        :param include_id: If true, includes the model identifier
        
Return the most useful entries as a dictionary.
Return the most useful entries as a dictionary .
def to_json(self, include_id: bool = False) -> Mapping[str, str]:
        result = {
            'keyword': self.keyword,
            'name': self.name,
            'version': self.version,
        }
        if self.url:
            result['url'] = self.url
        else:
            result['pattern'] = self.pattern
        if include_id:
            result['id'] = self.id
        return result
def to_json ( self , include_id : bool = False ) -> Mapping [ str , str ] : result = { 'keyword' : self . keyword , 'name' : self . name , 'version' : self . version , } if self . url : result [ 'url' ] = self . url else : result [ 'pattern' ] = self . pattern if include_id : result [ 'id' ] = self . id return result
Return the most useful entries as a dictionary.
Return the most useful entries as a dictionary .
"""Return the most useful entries as a dictionary.

        :param include_id: If true, includes the model identifier
        """
self
include_id
bool
If true, includes the model identifier
If true includes the model identifier