{"id":13720882,"url":"https://github.com/tbdsux/detanim","last_synced_at":"2025-05-07T13:30:47.701Z","repository":{"id":136174229,"uuid":"401520803","full_name":"tbdsux/detanim","owner":"tbdsux","description":"Deta SDK for NimLang","archived":true,"fork":false,"pushed_at":"2022-12-22T02:10:53.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-02T16:06:43.643Z","etag":null,"topics":["deta","detabase","detanim"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/tbdsux.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}},"created_at":"2021-08-31T00:11:26.000Z","updated_at":"2024-09-19T19:27:03.000Z","dependencies_parsed_at":"2023-05-13T16:45:12.975Z","dependency_job_id":null,"html_url":"https://github.com/tbdsux/detanim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbdsux%2Fdetanim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbdsux%2Fdetanim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbdsux%2Fdetanim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbdsux%2Fdetanim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbdsux","download_url":"https://codeload.github.com/tbdsux/detanim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224573328,"owners_count":17333808,"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":["deta","detabase","detanim"],"created_at":"2024-08-03T01:01:09.363Z","updated_at":"2024-11-14T10:30:39.133Z","avatar_url":"https://github.com/tbdsux.png","language":"Nim","funding_links":[],"categories":["SDK's"],"sub_categories":["Nim SDK"],"readme":"# detanim\n\nDeta SDK for NimLang\n\n## Install\n\n```sh\nnimble install https://github.com/TheBoringDude/detanim.git\n```\n\n## Usage\n\n```nim\nimport detanim, os, json\n\nlet\n    r = Deta(getEnv(\"API_KEY\"))\n    base = r.Base(\"sample\")\n\necho \"putting new data for key `hello`\"\nlet x = base.put(@[%*{\"key\": \"123\", \"hello\": \"world\"}])\necho $x\n\n\necho \"getting data of key `hello`\"\nlet (data, _) = base.get(\"123\")\necho $data\n```\n\n- Async support\n\n  ```nim\n  import detanim, json, asyncdispatch\n\n  let\n      r = newDeta()\n      base = r.newAsyncBase(\"sample\")\n\n  type\n      Data = object\n          key: string\n          hello: string\n          number: int\n          boolean: bool\n\n  proc main() {.async.} =\n      echo \"putting new data with key: [123]\"\n      let key = await base.put(%*{\"hello\": \"world\",\n              \"number\": 99, \"boolean\": false}, \"123\")\n\n      echo \"key: \", key\n\n\n      echo \"getting data with key: [123]\"\n      let (resp, exists) = await base.get(\"123\")\n\n      if not exists:\n          quit(\"Key does not exist!\")\n\n      let data = to(resp, Data)\n\n      echo(data.hello)\n\n\n  waitFor main()\n  ```\n\n## Currently Implemented Functions\n\nFunctions are not fully tested, please file issues if they are not working as expected.\n\n- **Base**\n\n  - get\n  - put\n  - putMany\n  - insert\n  - delete\n  - query\n  - update\n\n- **Drive**\n\n  - put - only 10Mb put files (chunk upload not yet supported)\n  - download - `get`\n  - list\n  - delete\n\n##\n\n**\u0026copy; 2021 | [tbdsux](https://tbdsux.github.io/)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbdsux%2Fdetanim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbdsux%2Fdetanim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbdsux%2Fdetanim/lists"}