функционал впринипе есть, нужно пользовательский интерфейс
вот тут возникли сложности, может ли кто то помочь в написании
# -*- coding: utf-8 -*- __author__ = 'user' import redis import pickle class Task: def __init__(self, id, description, deadline, importance): self.id = id self.description = description self.deadline = deadline self.importance = importance def __str__(self): return str(self.id) + " " + self.description + " " + self.deadline + " " + str(self.importance) class Day: def __init__(self, date): self.id = 1 self.date = date self.tasks = [] def add_task(self, args): self.tasks.append(Task(self.id, *args)) self.id += 1 def remove_task(self, id): for i in self.tasks: if i.id == id: self.tasks.remove(i) def redact(self, id, new_description): for i in self.tasks: if i.id == id: i.description = new_description def __str__(self): ret = "" ret += self.date + "\n" for i in self.tasks: ret += "\t" + i.__str__() + "\n" return ret class ToDoList: def __init__(self): self.days = [] def add_day(self, date): self.r = redis.Redis('localhost') self.validate_day(date) day = Day(date) binaries = pickle.dumps(day) self.r.set(date,binaries) self.r.save() def remove_day(self, date): for i in self.days: if i.date == date: self.days.remove(i) def validate_day(self, date): for i in self.days: if i.date == date: raise ValueError("day is already exists") def __str__(self): ret = "" for i in self.days: ret += i.__str__() + "\n" return ret class Manager: def __init__(self): self.todolist = ToDoList() self.r = redis.Redis('localhost') def serialize(self): self.binaries = pickle.dumps(self.todolist) def deserialize(self): self.todolist1 = pickle.loads(self.binaries) def redis_import(self): r = redis.StrictRedis() r.get("key") def redis_export(self): self.binaries = pickle.dumps(self.todolist) r = redis.StrictRedis() r.set("key", self.binaries) if __name__ == "__main__": a = Manager() key = True while (key): print 'Меню' print '[1] - Новый день' print '[2] - Новая задача' print '[3] - Редактировать задачу' print '[4] - Удалить задачу' print '[5] - Список задач' print '[6] - Новый день' rez = raw_input('Сделайте выбор:') day = None if (rez == '1'): day = raw_input('Введите день : ') a.todolist.add_day(day) elif (rez == '2'): day = raw_input('Введите день : ') d = a.r.get(day) m_day = a.deserialize(d) a.serialize(m_day) m_day.add_task(id='1', description='vdfvfd', deadline='3', importance='5') elif (rez == '3'): my_id = raw_input('Введите id задачи : ') aa.Day.redact(id) elif (rez == '4'): print a.todolist.__str__() raw_input() elif (rez == '5'): key = False