Commit e0a7b516d9c9a8e56ec61eaaff72e19fdff5d404
1 parent
d8b16588
Exists in
master
Try out ABC.
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
flaskr/core.py
1 | +import abc | |
1 | 2 | from datetime import datetime |
2 | 3 | from uuid import uuid4 |
3 | 4 | |
... | ... | @@ -7,3 +8,13 @@ def generate_unique_id(): |
7 | 8 | :return: a unique identifier that can be sorted chronologically. |
8 | 9 | """ |
9 | 10 | return datetime.now().strftime('%Y-%m-%d_%H:%M:%S_') + str(uuid4())[0:4] |
11 | + | |
12 | + | |
13 | +# def estimate_travel_carbon_footprint(from_address, to_address): | |
14 | +# return 1 | |
15 | + | |
16 | + | |
17 | +class FootprintEstimatorDriver(abc.ABCMeta): | |
18 | + @abc.abstractmethod | |
19 | + def get_travel_footprint(self, from_location, to_location): # TBD | |
20 | + pass | ... | ... |