forked from ExpDev07/coronavirus-tracker-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
28 lines (22 loc) · 640 Bytes
/
__init__.py
File metadata and controls
28 lines (22 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""app.services.location"""
from abc import ABC, abstractmethod
class LocationService(ABC):
"""
Service for retrieving locations.
"""
@abstractmethod
async def get_all(self):
"""
Gets and returns all of the locations.
:returns: The locations.
:rtype: List[Location]
"""
raise NotImplementedError
@abstractmethod
async def get(self, id): # pylint: disable=redefined-builtin,invalid-name
"""
Gets and returns location with the provided id.
:returns: The location.
:rtype: Location
"""
raise NotImplementedError