{"id":28547813,"url":"https://github.com/ydb-platform/django-ydb-backend","last_synced_at":"2026-03-27T03:43:14.386Z","repository":{"id":276985774,"uuid":"930290026","full_name":"ydb-platform/django-ydb-backend","owner":"ydb-platform","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-04T08:11:18.000Z","size":128,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-04T15:23:33.133Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ydb-platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-02-10T11:51:25.000Z","updated_at":"2025-06-04T08:11:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"511d143c-5c5f-417b-b43a-849b0c06e021","html_url":"https://github.com/ydb-platform/django-ydb-backend","commit_stats":null,"previous_names":["ydb-platform/django-ydb-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ydb-platform/django-ydb-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydb-platform%2Fdjango-ydb-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydb-platform%2Fdjango-ydb-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydb-platform%2Fdjango-ydb-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydb-platform%2Fdjango-ydb-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ydb-platform","download_url":"https://codeload.github.com/ydb-platform/django-ydb-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydb-platform%2Fdjango-ydb-backend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264200757,"owners_count":23571831,"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":"2025-06-10T01:07:48.578Z","updated_at":"2026-03-27T03:43:09.345Z","avatar_url":"https://github.com/ydb-platform.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"django-ydb-backend\n===\n\nDjango YDB Backend\nOverview\nThis is a Django database backend for [YDB](https://ydb.tech/), a distributed SQL database system.\nThe backend allows Django applications to use YDB as their primary database while maintaining compatibility with Django's ORM layer.\n\n## Key Features\n- Full Django ORM support for basic CRUD operations\n- Compatible with Django migrations system (with YDB-specific adaptations)\n- Supports most common field types and query operations\n- Implements necessary Django database backend interfaces\n\n## Underlying Technology\n\n### DBAPI Layer.\nThis backend uses the official [YDB-DBAPI](https://github.com/ydb-platform/ydb-python-dbapi) interface. The SDK provides:\n- Connection pooling\n- Session management\n- Native support for YDB's distributed transactions\n- Efficient data type handling\n\n### Supported YDB Features\n**Table Operations**:\n- CREATE/DROP/ALTER TABLE\n- Secondary indexes (with some limitations)\n\n**Data Types**:\n- All primitive YDB types (Int32, Utf8, Bool, etc.)\n- Optional types (NULL support)\n- JSON support via JSONField\n\n**Query Capabilities**:\n- SELECT with WHERE, ORDER BY, LIMIT\n- Basic aggregations (COUNT, SUM, etc.)\n- INSERT/UPDATE/DELETE/UPSERT operations\n\n**Requirements:**\n- [Python](https://www.python.org/) \u003e= 3.8\n- [Django](https://docs.djangoproject.com/) \u003e= 3.2.0\n- [YDB-DBAPI](https://github.com/ydb-platform/ydb-python-dbapi) \u003e= 0.1.8\n\nGet started\n---\n\n```shell\n$ pip install django-ydb-backend\n```\n\nConfigurations\n---\n\nTo set up your Django project to use a YDB backend, you only need to modify a few of Django's built-in configuration settings. This project does not require any additional custom configuration options.\n(Summary: Just adjust standard Django settings for YDB—no extra YDB-specific configurations are needed.)\n\n### DATABASES\n\n- NAME (required): traditional Django databases use this as the database name.\n- ENGINE (required): required, set to `ydb_backend.backend`.\n- HOST (required): the hostname or IP address of the YDB server (e.g., \"localhost\").\n- PORT (required): The gRPC port YDB is running on (default is 2136).\n- DATABASE (required): The full path to your YDB database (e.g., \"/local\" for local testing or \"/my_production_db\").\n\n ```python\nDATABASES = {\n    \"default\": {\n        \"NAME\": \"ydb_db\",\n        \"ENGINE\": \"ydb_backend.backend\",\n        \"HOST\": \"localhost\",\n        \"PORT\": \"2136\",\n        \"DATABASE\": \"/local\",\n    }\n}\n ```\n\nTest\n---\n\nTo run test for this project:\n\n```shell\n$ git clone https://github.com/ydb-platform/django-ydb-backend.git\n$ cd django-ydb-backend\n# docker and docker-compose are required.\n$ docker-compose up\n$ python tests/runtests.py\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydb-platform%2Fdjango-ydb-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fydb-platform%2Fdjango-ydb-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydb-platform%2Fdjango-ydb-backend/lists"}