{"id":19191373,"url":"https://github.com/leits/aiodeta","last_synced_at":"2025-05-08T07:41:44.408Z","repository":{"id":47678753,"uuid":"396460434","full_name":"leits/aiodeta","owner":"leits","description":" asyncio client for Deta Cloud (https://deta.sh)","archived":false,"fork":false,"pushed_at":"2021-08-18T22:14:15.000Z","size":24,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-05T15:56:46.527Z","etag":null,"topics":["asyncio","deta","python"],"latest_commit_sha":null,"homepage":"","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/leits.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}},"created_at":"2021-08-15T19:02:39.000Z","updated_at":"2023-04-01T03:01:00.000Z","dependencies_parsed_at":"2022-08-30T07:42:15.526Z","dependency_job_id":null,"html_url":"https://github.com/leits/aiodeta","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/leits%2Faiodeta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leits%2Faiodeta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leits%2Faiodeta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leits%2Faiodeta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leits","download_url":"https://codeload.github.com/leits/aiodeta/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253025317,"owners_count":21842406,"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":["asyncio","deta","python"],"created_at":"2024-11-09T11:42:47.668Z","updated_at":"2025-05-08T07:41:44.388Z","avatar_url":"https://github.com/leits.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aiodeta\n\n[![Build](https://github.com/leits/aiodeta/actions/workflows/testing.yml/badge.svg?branch=main)](https://github.com/leits/aiodeta/actions/workflows/testing.yml)\n[![codecov](https://codecov.io/gh/leits/aiodeta/branch/main/graph/badge.svg?token=2W3AhfHpPT)](https://codecov.io/gh/leits/aiodeta)\n[![PyPI version](https://badge.fury.io/py/aiodeta.svg)](https://badge.fury.io/py/aiodeta)\n\nUnofficial client for [Deta Clound](https://deta.sh)\n\n## Install\n\n```shell\npip install aiodeta\n```\n\n## Supported functionality\n\n- [x] Deta Base\n- [ ] Deta Drive\n- [ ] Decorator for cron tasks\n\n## Examples\n\n```python\nimport asyncio\nfrom aiodeta import Deta\n\nDETA_PROJECT_KEY = \"xxx_yyy\"\n\n\nasync def go():\n    db_name = \"users\"\n\n    # Initialize Deta client\n    deta = Deta(DETA_PROJECT_KEY)\n\n    # Initialize Deta Base client\n    base = deta.Base(db_name)\n\n    # Create row in Deta Base\n    user = {\"username\": \"steve\", \"active\": False}\n    resp = await base.insert(user)\n    print(resp)\n    user_key = resp[\"key\"]\n\n    # Update row by key\n    resp = await base.update(user_key, set={\"active\": True})\n    print(resp)\n\n    # Get row by key\n    resp = await base.get(user_key)\n    print(resp)\n\n    # Delete row by key\n    resp = await base.delete(user_key)\n    print(resp)\n\n    # Create multiple rows in one request\n    users = [\n        {\"username\": \"jeff\", \"active\": True},\n        {\"username\": \"rob\", \"active\": False},\n        {\"username\": \"joe\", \"active\": True}\n    ]\n    resp = await base.put(users)\n    print(resp)\n\n    # Query data\n    query = [{\"active\": True}, {\"username?pfx\": \"j\"}]\n    result = await base.query(query=query, limit=10)\n    print(result)\n\n    # Close connection\n    await deta.close()\n\nloop = asyncio.get_event_loop()\nloop.run_until_complete(go())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleits%2Faiodeta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleits%2Faiodeta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleits%2Faiodeta/lists"}