Cloud Deployment Manager dejará de estar disponible el 31 de diciembre de 2025. Si actualmente usas Deployment Manager, migra a Infrastructure Manager o a una tecnología de implementación alternativa antes del 31 de diciembre de 2025 para asegurarte de que tus servicios continúen sin interrupciones.
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Puedes utilizar las bibliotecas de Python en las plantillas de Python. Deployment Manager sube y ejecuta el código de Python en las plantillas en un entorno seguro.
Puedes utilizar bibliotecas que sean compatibles con Deployment Manager, y que se enumeran a continuación. Para utilizar una biblioteca de Python diferente, importa toda la fuente de la biblioteca en la plantilla.
Bibliotecas compatibles
Deployment Manager admite bibliotecas de Python específicas que puedes utilizar en las plantillas. Estas bibliotecas incluyen lo siguiente:
Si deseas importar bibliotecas que no se admiten de manera explícita, importa la biblioteca mediante el nombre de archivo. Esta opción resulta útil, en especial si deseas importar tus propios métodos auxiliares. Las mismas restricciones para las llamadas al sistema se aplican también a las bibliotecas personalizadas.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-03 (UTC)"],[[["\u003cp\u003ePython libraries can be used within Python templates in Deployment Manager, which runs the code in a secure environment.\u003c/p\u003e\n"],["\u003cp\u003eDeployment Manager supports specific Python libraries, such as \u003ccode\u003ebase64\u003c/code\u003e, \u003ccode\u003ecollections\u003c/code\u003e, \u003ccode\u003ejson\u003c/code\u003e, \u003ccode\u003emath\u003c/code\u003e, \u003ccode\u003eyaml\u003c/code\u003e, and others.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize unsupported libraries, you can import the full library source file directly into your template.\u003c/p\u003e\n"],["\u003cp\u003eSystem or network calls are strictly prohibited in templates, including any system call functionality within the supported libraries, and will result in rejection.\u003c/p\u003e\n"],["\u003cp\u003eCustom libraries are allowed but must also follow the restrictions preventing system or network calls.\u003c/p\u003e\n"]]],[],null,["# Importing Python Libraries\n\nYou can use Python libraries in your Python templates. Deployment Manager\nuploads and runs the Python code in your templates in a secure environment.\n\nYou can use libraries that are supported by Deployment Manager, listed below. To\nuse a different Python library, import the full library source in your template.\n\nSupported libraries\n-------------------\n\nDeployment Manager supports specific Python libraries that you can use in your\ntemplates. These libraries include:\n\n- [`base64`](https://docs.python.org/3/library/base64.html)\n- [`collections`](https://docs.python.org/3/library/collections.html)\n- [`encodings`](https://docs.python.org/3/library/codecs.html)\n- [`encodings.utf_8`](https://docs.python.org/3/library/codecs.html)\n- [`encodings.utf_16`](https://docs.python.org/3/library/codecs.html)\n- [`hashlib`](https://docs.python.org/3/library/hashlib.html)\n- [`json`](https://docs.python.org/3/library/json.html)\n- [`math`](https://docs.python.org/3/library/math.html)\n- [`random`](https://docs.python.org/3/library/random.html)\n- [`io`](https://docs.python.org/3/library/io.html)\n- [`sys`](https://docs.python.org/3/library/sys.html)\n- [`string`](https://docs.python.org/3/library/string.html)\n- [`time`](https://docs.python.org/3/library/time.html)\n- [`yaml`](https://github.com/yaml/pyyaml)\n- [`zipfile`](https://docs.python.org/3/library/zipfile.html)\n\n| **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.\n\nIf you want to import libraries that are not explicitly supported, import\nthe library using the filename. This is especially useful if you want to\nimport your own helper methods. The same restrictions for system calls apply to\ncustom libraries as well."]]