Cloud Deployment Manager reached end of support on March 31, 2026.
If you currently use Deployment Manager, please migrate to Infrastructure Manager or an alternative deployment technology.

For more information on the deprecation and shutdown, see Deployment Manager deprecation.

Importing Python Libraries

You can use Python libraries in your Python templates. Deployment Manager uploads and runs the Python code in your templates in a secure environment.

You can use libraries that are supported by Deployment Manager, listed below. To use a different Python library, import the full library source in your template.

Supported libraries

Deployment Manager supports specific Python libraries that you can use in your templates. These libraries include:

If you want to import libraries that are not explicitly supported, import the library using the filename. This is especially useful if you want to import your own helper methods. The same restrictions for system calls apply to custom libraries as well.

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 2026年08月26日 UTC.