Stay organized with collections
Save and categorize content based on your preferences.
The Django ORM is a powerful standalone component of the
Django web framework that maps Python objects
to relational data. It provides a Pythonic interface to the underlying database,
and includes tools for automatically generating schema changes and managing
schema version history.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Django ORM with Spanner\n\nThe Django ORM is a powerful standalone component of the\n[Django web framework](https://www.djangoproject.com/) that maps Python objects\nto relational data. It provides a Pythonic interface to the underlying database,\nand includes tools for automatically generating schema changes and managing\nschema version history.\n| **Note:** The PostgreSQL interface for Spanner doesn't support the Django ORM.\n\nThe [django-google-spanner](https://pypi.org/project/django-google-spanner/)\npackage is a third-party database backend for using Spanner with the\nDjango ORM, powered by the\n[Spanner Python client library](https://github.com/googleapis/python-spanner).\n\nWith this integration, Django applications can take advantage of\nSpanner's high availability and consistency at scale.\n\nInstall, configure, and use\n---------------------------\n\nRefer to the\n[django-google-spanner documentation](https://pypi.org/project/django-google-spanner/)\nfor instructions on installing and configuring your environment.\n\nWhat's next\n-----------\n\n- Read our [blog post](/blog/topics/developers-practitioners/django-orm-support-cloud-spanner-now-generally-available) for a walkthrough and insight into how the code is designed.\n- See [code examples](https://github.com/googleapis/python-spanner-django/tree/master/examples) using Django with Spanner.\n- Learn more about the [Django project](https://www.djangoproject.com/).\n- Learn more about [DB API](https://www.python.org/dev/peps/pep-0249/).\n- [File a GitHub issue](https://github.com/googleapis/python-spanner-django/issues) to report a bug or ask a question about using the Django ORM with Spanner."]]