{"id":31725188,"url":"https://github.com/efe/django-raphael","last_synced_at":"2025-10-09T05:21:42.496Z","repository":{"id":314345949,"uuid":"1055102972","full_name":"efe/django-raphael","owner":"efe","description":"A low-effort, fully asynchronous ORM for Django applications, powered by Tortoise ORM under the hood.","archived":false,"fork":false,"pushed_at":"2025-09-11T22:00:22.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-12T00:25:32.389Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/efe.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-11T19:15:58.000Z","updated_at":"2025-09-11T22:00:25.000Z","dependencies_parsed_at":"2025-09-12T00:25:40.291Z","dependency_job_id":"f0558748-2028-4a3c-8f16-a373f6b661ad","html_url":"https://github.com/efe/django-raphael","commit_stats":null,"previous_names":["efe/django-raphael"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/efe/django-raphael","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efe%2Fdjango-raphael","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efe%2Fdjango-raphael/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efe%2Fdjango-raphael/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efe%2Fdjango-raphael/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efe","download_url":"https://codeload.github.com/efe/django-raphael/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efe%2Fdjango-raphael/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000739,"owners_count":26082933,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-09T05:21:37.321Z","updated_at":"2025-10-09T05:21:42.488Z","avatar_url":"https://github.com/efe.png","language":"Python","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# django-raphael\n\nA low-effort, fully asynchronous ORM for Django applications, powered by [Tortoise ORM](https://tortoise.github.io/) under the hood. (draft)\n\n## Why?\n\nDjango’s async ORM currently runs asynchronous calls in [a separate thread](https://docs.djangoproject.com/en/5.2/topics/async/), which introduces a performance difference compared to a fully asynchronous ORM. django-raphael provides a bridge between Django models and a fully async ORM like Tortoise ORM, enabling developers to use async database operations without redefining models and while maintaining synchronization.\n\n## Usage\n\n```python\n# books/models.py\nfrom django_raphael.models import RaphaelMixin\n\nclass Book(RaphaelMixin, models.Model):\n    title = models.CharField(max_length=200)\n    author = models.CharField(max_length=100)\n```\n\n```python\n# books/views.py\n\nasync def retrieve_book(request, id: int):\n    book = await Book.aobjects.get(id=id)\n    return JsonResponse({\n        \"id\": book.id,\n        \"title\": book.title,\n        \"author\": book.author,\n    })\n\nasync def create_book(request):\n    book = await Book.aobjects.create(\n        title=request.body.get(\"title\"),\n        author=request.body.get(\"author\"),\n    )\n\n    return JsonResponse({\n        \"id\": book.id,\n        \"title\": book.title,\n        \"author\": book.author,\n    }, status=201)\n```\n\n- `book.aobjects` returns the Tortoise ORM model.\n\n## \"raphael?\"\n\nTortoise ORM does its thing behind the scenes and it reminds me of the Ninja Turtles. [Raphael](https://en.wikipedia.org/wiki/Raphael_(Teenage_Mutant_Ninja_Turtles)), the hot-headed one, feels like the perfect spirit animal for async Python’s feel.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefe%2Fdjango-raphael","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefe%2Fdjango-raphael","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefe%2Fdjango-raphael/lists"}