编码应该简单有趣。当然我会选择宽恕。
forgive的Python项目详细描述
徽标
- 如果没人接受你的公关怎么办?
- 如果lib升级了它们的依赖关系呢?
- 如果你有一个全新的要求呢?
原谅
lowdb是javascript, tinydb不是 那么小。ForgiveDB是你的 命运。
是一个小型的独立数据库,支持内存或 json文件存储。
安装
使用pip。哦,你应该学会。
pipinstallforgive
用法
代码是最好的文档。(因为我们不擅长写作 文档。)
fromforgiveimportForgiveDBfile_db=ForgiveDB('/some/path')# file_db = ForgiveDB(r'C:\\some\\path') # windowsfile_db.set('key','value')value=file_db.get('key')default_value=file_db.get('no-such-key','default-value')# Or in memorymemory_db=ForgiveDB()memory_db.set(ForgiveDB,'simple and interesting')memory_db.get(ForgiveDB)# simple and interesting