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:

- [`base64`](https://docs.python.org/3/library/base64.html)
- [`collections`](https://docs.python.org/3/library/collections.html)
- [`encodings`](https://docs.python.org/3/library/codecs.html)
- [`encodings.utf_8`](https://docs.python.org/3/library/codecs.html)
- [`encodings.utf_16`](https://docs.python.org/3/library/codecs.html)
- [`hashlib`](https://docs.python.org/3/library/hashlib.html)
- [`json`](https://docs.python.org/3/library/json.html)
- [`math`](https://docs.python.org/3/library/math.html)
- [`random`](https://docs.python.org/3/library/random.html)
- [`io`](https://docs.python.org/3/library/io.html)
- [`sys`](https://docs.python.org/3/library/sys.html)
- [`string`](https://docs.python.org/3/library/string.html)
- [`time`](https://docs.python.org/3/library/time.html)
- [`yaml`](https://github.com/yaml/pyyaml)
- [`zipfile`](https://docs.python.org/3/library/zipfile.html)

> [!CAUTION]
> **Caution:** Do not use system calls in your template. If a template contains any code that makes system or network calls, it is rejected. This includes any method that performs system calls using the supported libraries listed above. For example, `sys` contains a number of system calls that will automatically be rejected if you use them in your template.

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.