Blame view

flaskr/core.py 492 Bytes
e0a7b516   Goutte   Try out ABC.
1
import abc
984b691d   Goutte   Add the core libr...
2
3
4
5
6
7
8
9
10
from datetime import datetime
from uuid import uuid4


def generate_unique_id():
    """
    :return: a unique identifier that can be sorted chronologically.
    """
    return datetime.now().strftime('%Y-%m-%d_%H:%M:%S_') + str(uuid4())[0:4]
e0a7b516   Goutte   Try out ABC.
11
12
13
14
15
16
17
18
19
20


# def estimate_travel_carbon_footprint(from_address, to_address):
#     return 1


class FootprintEstimatorDriver(abc.ABCMeta):
    @abc.abstractmethod
    def get_travel_footprint(self, from_location, to_location):  # TBD
        pass