{"id":14961445,"url":"https://github.com/pomb/godot_google_sheets_database","last_synced_at":"2026-01-06T14:04:39.040Z","repository":{"id":251108325,"uuid":"836417713","full_name":"Pomb/godot_google_sheets_database","owner":"Pomb","description":"A simple google sheets data source for a godot project","archived":false,"fork":false,"pushed_at":"2024-08-01T07:15:29.000Z","size":1007,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T23:33:39.579Z","etag":null,"topics":["database","godot","godot-4","google-sheets"],"latest_commit_sha":null,"homepage":"","language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pomb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-31T20:01:51.000Z","updated_at":"2024-09-02T07:11:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3ca5ffc-dc6d-432c-a2ba-faa856d268a8","html_url":"https://github.com/Pomb/godot_google_sheets_database","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"9d96ad4ccb0d99dbf6cfe6712475ede2e8898859"},"previous_names":["pomb/godot_google_sheets_database"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pomb%2Fgodot_google_sheets_database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pomb%2Fgodot_google_sheets_database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pomb%2Fgodot_google_sheets_database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pomb%2Fgodot_google_sheets_database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pomb","download_url":"https://codeload.github.com/Pomb/godot_google_sheets_database/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245581657,"owners_count":20639013,"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":["database","godot","godot-4","google-sheets"],"created_at":"2024-09-24T13:25:13.404Z","updated_at":"2026-01-06T14:04:38.943Z","avatar_url":"https://github.com/Pomb.png","language":"GDScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Godot Google Sheets Database\n\nThis implementation allows loading data from a google sheet to be used as a data source for a Godot project.\n\nThis is currently a oneway data source from Google Sheets into Godot, with local persistence.\n\n---\n\n[TOC]\n\n---\n\n## Setup\n\n### Config file\n\n1. Duplicate the configuration file: `res://code/sheet_db/SecretConfigSample.cfg`\n2. Rename it to `SecretConfig.cfg`\n3. [Setup a google api key](https://support.google.com/googleapi/answer/6158862?hl=en)\n4. Fill out the details from your google sheet\n\n### Google sheet\n\n1. Your version tab needs must have the version specified at A1\n\n \u003eI recommed linking the version cell in the databse tab with this formula `=version!A1` where `version` is the name of the version tab.\n\n2. Row 1 is reserved for the column names, the current transformer uses these as keys for a dictionary, more on this below.\n\n3. Column A is empty, besides A1 reserved for the version number\n\n4. Column B is used as the root ID or KEY into the data when it gets transformed into a dictionary, more on this below.\n\n![version example](/docs/version_tab_example.png)\n![database example](/docs/database_tab_example.png)\n\n### Transformer\n\n`res://code/sheet_db/Transformer.gd`\n\nThe transformer is responsible for the conversion of the data into the data structure that your app or game wants to use.\n\nAs an example the `REQUIRED` column data is split into an array of strings.\n\nThe transformer example takes in the following data structure that comes back from the http request:\n\n```gdscript\n[\n    [\n        \"0.0.1\",\n        \"ID\",\n        \"DATA\",\n        \"REQUIRED\",\n        \"ITEM_REWARDS\",\n        \"ZONE_UNLOCK\"\n    ],\n    [\n        \"\",\n        \"001\",\n        \"a\",\n        \"\",\n        \"map\",\n        \"zone_1\"\n    ],\n    [\n        \"\",\n        \"002\",\n        \"b\",\n        \"001\",\n        \"straw\"\n    ],\n    [\n        \"\",\n        \"003\",\n        \"c\",\n        \"001,002\",\n        \"sticks\",\n        \"zone_2\"\n    ]\n]\n```\n\nand outputs the following:\n\n```gdscript\n{\n    \"001\": {\n        \"DATA\": \"a\",\n        \"ID\": \"001\",\n        \"ITEM_REWARDS\": \"map\",\n        \"REQUIRED\": [],\n        \"ZONE_UNLOCK\": \"zone_1\"\n    },\n    \"002\": {\n        \"DATA\": \"b\",\n        \"ID\": \"002\",\n        \"ITEM_REWARDS\": \"straw\",\n        \"REQUIRED\": [ \"001\" ]\n    },\n    \"003\": {\n        \"DATA\": \"c\",\n        \"ID\": \"003\",\n        \"ITEM_REWARDS\": \"sticks\",\n        \"REQUIRED\": [ \"001\", \"002\" ],\n        \"ZONE_UNLOCK\": \"zone_2\"\n    },\n    \"version\": \"0.0.1\"\n}\n```\n\nThe modification of the transformer is left as an exercise for the reader to adapt to their own data structure needs.\n\n---\n\n## Updates\n\nData is downloaded on the first launch and then stored locally in the `user://` directory.\nSee [Godot's docs](https://docs.godotengine.org/en/stable/tutorials/io/data_paths.html) for more info on data paths.\n\n| OS      | Path |\n|:--------|:-----|\n| Windows | %APPDATA%\\Godot\\app_userdata\\\\[project_name] |\n| macOS   | ~/Library/Application Support/Godot/app_userdata/[project_name] |\n| Linux   | ~/.local/share/godot/app_userdata/[project_name] |\n\nSubsequent launches will then perform a version check and offer to update when the db version differs from the local one.\n\nWith this you can simply update the data in the sheet, change the version value and the next time the game is launched it will offer the user to update data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomb%2Fgodot_google_sheets_database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpomb%2Fgodot_google_sheets_database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomb%2Fgodot_google_sheets_database/lists"}