Google Drive Spreadsheets的Python ORM框架:butterdb
jopen
10年前
butterdb是一个针对Google Drive Spreadsheets的Python ORM框架。
What works? ---------- * 将数据存储在 Google Spreadsheets 中 (the cloud!!!) * Models from classes * Fields as attributes. decimals, ints and strings only (as far as I know) * Commits * Mocked unit tests, mock database * Arbitrary cell execution with `=blah()` (free stored procedures?) * Auto backup/bad patch control
import butterdb database = butterdb.Database("MyDatabaseSheet", "foo@google.com", "password") @butterdb.register(database) class User(butterdb.Model): def __init__(self, name, password): self.name = self.field(name) self.password = self.field(password) barry = User("Barry", "hunter2") barry.name = "Steve" barry.commit() users = User.get_instances()