Getting started with Django  |  Python  |  Google Cloud (2024)

Stay organized with collections Save and categorize content based on your preferences.

Django apps that run on Google Cloud are running on the sameinfrastructure that powers all of Google's products, which generally improvesthe application's ability to adapt to a variable workload.

Hosting platforms

These are the available options for deploying Django on Google Cloud:

For more details on the differences in these platforms, see App Hosting options on Google Cloud.

Databases

The Django object-relational mapper (ORM) works best with an SQL relationaldatabase.

If you are starting a new project, Cloud SQLis a good choice. You can deploy a PostgreSQL or MySQL database that's managed and scaled by Google, and supported by Django.

You can deploy Django with a Spanner backend using the python-spanner-django database backend.

Sometimes, there are compelling reasons to use a NoSQL database. Using the Django ORM with aNoSQL database is possible, with some limitations, but not officially supported by Django. There are a number of community-supported backend connectors Datastore, including djangae if you're using App Engine, or django-gcloud-connectors if you're using Cloud Run. If you choose to use MongoDB, you can deploy it using Cloud Marketplace and do your own management, or you can use the managed MongoDB hosting serviceprovided by mLab.

Caches

Memorystore offers managed hosting options for both Memcache and Redis. For App Engine, see the guide for migrating from Memcache.

Task queuing

Pub/Sub offers messaging for event-driven systems, and Google Tasks offers asynchronous task execution; see the guide for choosing between Google Tasks or Pub/Sub. For App Engine, see the guide for migrating from Task queues.

Support for task queuing through Cloud Tasks is available through a number of community-supported packages.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-04-05 UTC.

Getting started with Django  |  Python  |  Google Cloud (2024)
Top Articles
Latest Posts
Article information

Author: Tuan Roob DDS

Last Updated:

Views: 5606

Rating: 4.1 / 5 (62 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Tuan Roob DDS

Birthday: 1999-11-20

Address: Suite 592 642 Pfannerstill Island, South Keila, LA 74970-3076

Phone: +9617721773649

Job: Marketing Producer

Hobby: Skydiving, Flag Football, Knitting, Running, Lego building, Hunting, Juggling

Introduction: My name is Tuan Roob DDS, I am a friendly, good, energetic, faithful, fantastic, gentle, enchanting person who loves writing and wants to share my knowledge and understanding with you.