quivr/backend/modules/analytics/repository/analytics_interface.py
Antoine Dewez 8d3bc79a7e
feat(analytics): added analytics page (#2416)
# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
2024-04-10 02:20:21 -07:00

15 lines
531 B
Python

from abc import ABC, abstractmethod
from typing import Optional
from uuid import UUID
from modules.analytics.entity.analytics import BrainsUsages, Range
class AnalyticsInterface(ABC):
@abstractmethod
def get_brains_usages(self, user_id: UUID, graph_range: Range = Range.WEEK, brain_id: Optional[UUID] = None) -> BrainsUsages:
"""
Get user brains usage
Args:
user_id (UUID): The id of the user
brain_id (Optional[UUID]): The id of the brain, optional
"""
pass