school_api.session   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A SessionStorage.expires_time() 0 2 1
A SessionStorage.delete() 0 2 1
A SessionStorage.get() 0 2 1
A SessionStorage.set() 0 2 1
A SessionStorage.__setitem__() 0 2 1
A SessionStorage.__delitem__() 0 2 1
A SessionStorage.__getitem__() 0 2 1
1
# -*- coding: utf-8 -*-
2
from __future__ import absolute_import, unicode_literals
3
4
5
class SessionStorage(object):
6
7
    def get(self, key, default=None):
8
        raise NotImplementedError()
9
10
    def set(self, key, value, ttl=None):
11
        raise NotImplementedError()
12
13
    def delete(self, key):
14
        raise NotImplementedError()
15
16
    def expires_time(self, key):
17
        raise NotImplementedError()
18
19
    def __getitem__(self, key):
20
        self.get(key)
21
22
    def __setitem__(self, key, value):
23
        self.set(key, value)
24
25
    def __delitem__(self, key):
26
        self.delete(key)
27