{"id":13502223,"url":"https://github.com/terrible-ideas/butterdb","last_synced_at":"2025-03-29T10:32:50.394Z","repository":{"id":12411925,"uuid":"15065854","full_name":"terrible-ideas/butterdb","owner":"terrible-ideas","description":"butterdb is a Python object mapper for Google Drive Spreadsheets. Still in development, but usable.","archived":false,"fork":false,"pushed_at":"2015-06-12T06:22:17.000Z","size":469,"stargazers_count":345,"open_issues_count":9,"forks_count":16,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-04-14T06:31:56.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/butterdb","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terrible-ideas.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-10T03:18:02.000Z","updated_at":"2024-04-12T19:55:27.000Z","dependencies_parsed_at":"2022-08-07T06:16:59.197Z","dependency_job_id":null,"html_url":"https://github.com/terrible-ideas/butterdb","commit_stats":null,"previous_names":["widdershin/butterdb","widdershin/fuckitdb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrible-ideas%2Fbutterdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrible-ideas%2Fbutterdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrible-ideas%2Fbutterdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrible-ideas%2Fbutterdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terrible-ideas","download_url":"https://codeload.github.com/terrible-ideas/butterdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246174207,"owners_count":20735406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:02:06.578Z","updated_at":"2025-03-29T10:32:49.988Z","avatar_url":"https://github.com/terrible-ideas.png","language":"Python","funding_links":[],"categories":["ORM","Python","Awesome Python","ODM, ORM, Active Record"],"sub_categories":["ORM"],"readme":"butterdb\n========\n\n| Master: |Build Status Master|\n| Develop: |Build Status Develop|\n\n`Documentation`_ | `butterdb on PyPi`_\n\nbutterdb is a library to help you work with Google Spreadsheet data. It lets you model your data as Python objects, to be easily manipulated or created.\n\nHow do I use it?\n-----\n.. image:: http://i.imgur.com/h75z1k6.png\n\n::\n\n   import butterdb\n   import json\n\n   # For getting OAuth Credential JSON file see http://gspread.readthedocs.org/en/latest/oauth2.html\n   # Ensure that the client_email has been granted privileges to any workbooks you wish to access.\n\n   with open('SomeGoogleProject-2a31d827b2a9.json') as credentials_file:\n      json_key = json.load(credentials_file)\n\n   client_email = json_key['client_email']\n   private_key = str(json_key['private_key']).encode('utf-8')\n   \n   database = butterdb.Database(name=\"MyDatabaseSheet\", client_email=client_email, private_key=private_key)\n   \n   @butterdb.register(database)\n   class User(butterdb.Model):\n       def __init__(self, name, password):\n           self.name = self.field(name)\n           self.password = self.field(password)\n   \n   users = User.get_instances()\n   \n   marianne = users[1]\n   \n   print(marianne.password) # rainbow_trout\n   \n   marianne.password = \"hunter2\"\n   marianne.commit()\n\n\nHow do I make instances?\n=================\n\n::\n\n   bob = User(\"bob\", \"BestPassword!\")\n   bob.commit()\n\n\nWhere do I get it?\n------------\n\n``pip install butterdb``\n\nSimple as that?\n---------------\nYep! butterdb is a simple interface around `gspread`_. Just .commit() your objects when you want to update the spreadsheet!\n\nHow do I run the tests?\n-----\n`nosetests`\n\nWhat works?\n----------\n* Store data in Google Spreadsheets (the cloud!!!)\n* Models from classes\n* Fields as attributes. decimals, ints and strings only (as far as I know)\n* Commits\n* Mocked unit tests, mock database\n* Arbitrary cell execution with `=blah()` (free stored procedures?)\n* Auto backup/bad patch control\n\nWhat's missing?\n---------------\n* Spreadsheets must exist before connecting\n* References\n* Collections\n* Customizable fields\n* Customizable table size (arbitrarily hardcoded)\n\nFeedback\n--------\nComments, concerns, issues and pull requests welcomed. Reddit /u/Widdershiny or email me at ncwjohnstone@gmail.com.\n\nLicense\n-------\n\nMIT License. See LICENSE file for full text.\n\n.. _Documentation: http://butterdb.readthedocs.org\n.. _butterdb on PyPi: https://pypi.python.org/pypi/butterdb\n.. _gspread: https://github.com/burnash/gspread\n\n.. |Build Status Master| image:: https://travis-ci.org/Widdershin/butterdb.png?branch=master\n   :target: https://travis-ci.org/Widdershin/butterdb\n.. |Build Status Develop| image:: https://travis-ci.org/Widdershin/butterdb.png?branch=develop\n   :target: https://travis-ci.org/Widdershin/butterdb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrible-ideas%2Fbutterdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrible-ideas%2Fbutterdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrible-ideas%2Fbutterdb/lists"}