{"id":26257549,"url":"https://github.com/iyasha/django-documentdb","last_synced_at":"2026-01-28T22:33:54.183Z","repository":{"id":259486491,"uuid":"878635574","full_name":"iYasha/django-documentdb","owner":"iYasha","description":"DocumentDB/MongoDB backend for Django","archived":false,"fork":false,"pushed_at":"2024-11-10T18:22:21.000Z","size":410,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T19:22:25.478Z","etag":null,"topics":["django","documentdb","mongodb"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iYasha.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-10-25T18:56:42.000Z","updated_at":"2024-11-10T18:22:00.000Z","dependencies_parsed_at":"2024-10-25T23:28:24.319Z","dependency_job_id":"847a77d4-a89a-4c55-9612-ae1e55979445","html_url":"https://github.com/iYasha/django-documentdb","commit_stats":null,"previous_names":["iyasha/django-documentdb"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iYasha%2Fdjango-documentdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iYasha%2Fdjango-documentdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iYasha%2Fdjango-documentdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iYasha%2Fdjango-documentdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iYasha","download_url":"https://codeload.github.com/iYasha/django-documentdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251360991,"owners_count":21577363,"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":["django","documentdb","mongodb"],"created_at":"2025-03-13T21:21:10.546Z","updated_at":"2026-01-28T22:33:54.159Z","avatar_url":"https://github.com/iYasha.png","language":"Python","readme":"# DocumentDB/MongoDB backend for Django\n\nThis project, **django-documentdb**, is a fork of the original **django-mongodb** repository, which was developed and maintained by the MongoDB Python Team. The primary purpose of this fork is to enhance compatibility with **AWS DocumentDB**, a MongoDB-compatible database service provided by Amazon Web Services. To accommodate the differences between DocumentDB and MongoDB’s API support, specific adjustments have been implemented to ensure seamless functionality within DocumentDB.\n\nWe encourage users to provide feedback and report any issues as we continue to improve the library. You can share your thoughts, suggestions, or report problems on our [GitHub Issues page](https://github.com/iYasha/django-documentdb/issues)\n\n## Documentation\nFor full documentation, including installation, configuration, etc. Please see https://django-documentdb.readthedocs.io/\n\n## Installation\n\nTo install `django_documentdb`, use one of the following methods:\n\n### Using pip\n\nYou can install `django_documentdb` with:\n\n```bash\npip install django_documentdb\n```\n\n### Using Poetry\n\nIf you're using Poetry to manage your dependencies, you can add `django_documentdb` to your project with:\n\n```bash\npoetry add django_documentdb\n```\n\n## Notes on Django QuerySets\n\ndjango-documentdb uses own QuerySet implementation (`DocumentQuerySet`) if you inherit your models from `DocumentModel` class.\n\n### Example:\n\n```python\nfrom django_documentdb.models import DocumentModel\nfrom django_documentdb import fields\nfrom django.db import models\n\n\nclass TestModel(DocumentModel):\n    _id = fields.ObjectIdAutoField(primary_key=True)\n    text_value = models.CharField(max_length=100, null=True)\n    number_value = models.FloatField(null=True)\n\n    class Meta:\n        db_table = \"test_db\"\n```\n\n### Available options with `DocumentQuerySet`:\n\n* `QuerySet.explain()` supports the [`comment` and `verbosity` options](\n  https://www.mongodb.com/docs/manual/reference/command/explain/#command-fields).\n\n   Example: `QuerySet.explain(comment=\"...\", verbosity=\"...\")`\n\n   Valid values for `verbosity` are `\"queryPlanner\"` (default),\n   `\"executionStats\"`, and `\"allPlansExecution\"`.\n* `DocumentQuerySet.index_hint(index_name)` - allows to specify index hint for query.\n\n## Known issues and limitations\n\n- The following `QuerySet` methods aren't supported:\n  - `bulk_update()`\n  - `dates()`\n  - `datetimes()`\n  - `distinct()`\n  - `extra()`\n  - `prefetch_related()`\n\n- `QuerySet.delete()` and `update()` do not support queries that span multiple\n  collections.\n\n- `DateTimeField` doesn't support microsecond precision, and correspondingly,\n  `DurationField` stores milliseconds rather than microseconds.\n\n- The following database functions aren't supported:\n    - `Chr`\n    - `ExtractQuarter`\n    - `MD5`\n    - `Now`\n    - `Ord`\n    - `Pad`\n    - `Repeat`\n    - `Reverse`\n    - `Right`\n    - `SHA1`, `SHA224`, `SHA256`, `SHA384`, `SHA512`\n    - `Sign`\n    - `TruncDate`\n    - `TruncTime`\n\n- The `tzinfo` parameter of the `Trunc` database functions doesn't work\n  properly because MongoDB converts the result back to UTC.\n\n- When querying `JSONField`:\n  - There is no way to distinguish between a JSON \"null\" (represented by\n    `Value(None, JSONField())`) and a SQL null (queried using the `isnull`\n    lookup). Both of these queries return both of these nulls.\n  - Some queries with `Q` objects, e.g. `Q(value__foo=\"bar\")`, don't work\n    properly, particularly with `QuerySet.exclude()`.\n  - Filtering for a `None` key, e.g. `QuerySet.filter(value__j=None)`\n    incorrectly returns objects where the key doesn't exist.\n  - You can study the skipped tests in `DatabaseFeatures.django_test_skips` for\n    more details on known issues.\n\n- Due to the lack of ability to introspect MongoDB collection schema,\n  `migrate --fake-initial` isn't supported.\n\n## Forked Project\n\nThis project, **django-documentdb**, is a fork of the original **django-mongodb** library, which aimed to integrate MongoDB with Django. The fork was created to enhance compatibility with AWS DocumentDB, addressing the limitations of its API support while maintaining the core functionalities of the original library. We appreciate the work of the MongoDB Python Team and aim to build upon their foundation to better serve users needing DocumentDB integration.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyasha%2Fdjango-documentdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiyasha%2Fdjango-documentdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyasha%2Fdjango-documentdb/lists"}